Skip to content

Commit

Permalink
Issue 3635: Sporadic test failure PravegaTablesStreamMetadataTasksTes…
Browse files Browse the repository at this point in the history
…t > checkTruncateCompleteTest (pravega#3636)

* Adds a call to join to existing test futures to guarantee that each future completes before the assertion. 

Signed-off-by: Shivesh Ranjan <[email protected]>
  • Loading branch information
shiveshr authored and fpj committed Apr 16, 2019
1 parent 5c4ce97 commit 9edd188
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1207,7 +1207,7 @@ public void checkUpdateCompleteTest() throws ExecutionException, InterruptedExce

VersionedMetadata<StreamConfigurationRecord> configurationRecord = streamStorePartialMock.getConfigurationRecord(SCOPE, test, null, executor).join();
assertTrue(configurationRecord.getObject().isUpdating());
streamStorePartialMock.completeUpdateConfiguration(SCOPE, test, configurationRecord, null, executor);
streamStorePartialMock.completeUpdateConfiguration(SCOPE, test, configurationRecord, null, executor).join();

assertFalse(streamMetadataTasks.isUpdated(SCOPE, test, configuration2, null).get());

Expand Down Expand Up @@ -1251,7 +1251,7 @@ public void checkTruncateCompleteTest() throws ExecutionException, InterruptedEx

VersionedMetadata<StreamTruncationRecord> truncationRecord = streamStorePartialMock.getTruncationRecord(SCOPE, test, null, executor).join();
assertTrue(truncationRecord.getObject().isUpdating());
streamStorePartialMock.completeTruncation(SCOPE, test, truncationRecord, null, executor);
streamStorePartialMock.completeTruncation(SCOPE, test, truncationRecord, null, executor).join();

assertFalse(streamMetadataTasks.isTruncated(SCOPE, test, map, null).get());

Expand Down

0 comments on commit 9edd188

Please sign in to comment.