-
Notifications
You must be signed in to change notification settings - Fork 599
Closed
Labels
0.9.1Release v0.9.1Release v0.9.11.0.0Release v1.0.0Release v1.0.0improvementImprovements on everythingImprovements on everything
Description
What would you like to be improved?
In setUp()
of TestHadoopCatalogOperations
, we stub schema files in a fixed‐length loop:
Lines 244 to 249 in 121888c
for (int i = 10; i < 30; i++) { | |
doReturn(new SchemaIds(1L, 1L, (long) i)) | |
.when(spySchemaMetaService) | |
.getSchemaIdByMetalakeNameAndCatalogNameAndSchemaName( | |
Mockito.anyString(), Mockito.anyString(), Mockito.eq("schema" + i)); | |
} |
As we add new tests that require additional schemas to be stubbed (e.g. schema30
, schema31
, ...) , this manual update of the loop's upper bound is inefficient and throws misleading test failures.
How should we improve?
Move the schema-stubbing action to its corresponding test.
cc @mchades
mchades and Abyss-lord
Metadata
Metadata
Assignees
Labels
0.9.1Release v0.9.1Release v0.9.11.0.0Release v1.0.0Release v1.0.0improvementImprovements on everythingImprovements on everything