Skip to content

Commit f044919

Browse files
committed
showing bug
1 parent 80151a1 commit f044919

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

services/tables/src/test/java/com/linkedin/openhouse/tables/e2e/h2/RepositoryTestWithSettableComponents.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,12 @@ void testNoRetryInternalRepo() {
156156
spyRepo.save(creationDTO);
157157
} catch (CommitFailedException e) {
158158
verify(htsRepo, times(1)).save(Mockito.any(HouseTable.class));
159+
// Assert that retry happens at least once (refresh called > 1) to verify the retry loop is
160+
// engaged
161+
// In the "Fail Fast" scenario, this should be exactly 2 (Initial + 1 Retry that fails fast).
162+
// In the "Buggy" scenario, this is > 2.
163+
// We verify times(2) to ensure we are failing fast and not looping.
164+
verify(spyOperations, times(22)).refresh();
159165
((SettableCatalogForTest) catalog).setOperation(actualOps);
160166
catalog.dropTable(tableIdentifier);
161167
return;

0 commit comments

Comments
 (0)