Skip to content

Commit

Permalink
Unflake IndexingServiceTest
Browse files Browse the repository at this point in the history
The shouldReportCauseOfPopulationFailureIfPopulationFailsDuringRecovery
test specifically which would race with the populating index and
sometimes the POPULATING -> ONLINE flip would overwrite the
POPULATING -> FAILED flip that the test would do and in extension
sidestep the failure and let the test wait indefinitely for a
failure that would never happen.
  • Loading branch information
tinwelint committed Mar 1, 2019
1 parent 45d5ef3 commit 517e963
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1112,7 +1112,9 @@ public void awaitingPopulationOfRecoveredIndex( StoreIndexDescriptor descriptor

// Thread is just about to start checking index status. We flip to failed proxy to indicate population failure during recovery.
barrier.await();

// Wait for the index to come online, otherwise we'll race the failed flip below with its flip and sometimes the POPULATING -> ONLINE
// flip will win and make the index NOT fail and therefor hanging this test awaiting on the exceptionBarrier below
waitForIndexesToComeOnline( indexing, indexId );
IndexProxy indexProxy = indexing.getIndexProxy( indexRule.schema() );
assertThat( indexProxy, instanceOf( ContractCheckingIndexProxy.class ) );
ContractCheckingIndexProxy contractCheckingIndexProxy = (ContractCheckingIndexProxy) indexProxy;
Expand Down

0 comments on commit 517e963

Please sign in to comment.