Details
-
Bug
-
Status: Resolved
-
Blocker
-
Resolution: Fixed
-
None
-
None
Description
org.opentest4j.AssertionFailedError: More data is not expected. ==> expected: <true> but was: <false> at org.apache.ignite.distributed.ItInternalTableScanTest.requestNtest(ItInternalTableScanTest.java:592) at org.apache.ignite.distributed.ItInternalTableScanTest.testMultipleRowScan(ItInternalTableScanTest.java:248)
Test seems to be incorrect because there's a race between submitting all data to retrievedItems list and calling Subscriber.onComplete(). In other words instead of
@Override public void onComplete() { noMoreData.set(true); } }); assertTrue(waitForCondition(() -> retrievedItems.size() == submittedItems.size(), 2_000)); assertTrue(noMoreData.get(), "More data is not expected.");
following should be used:
@Override
public void onComplete() {
subscriberAllDataAwaitLatch.countDown();
}
});
subscriberAllDataAwaitLatch.await();
assertEquals(submittedItems.size(), retrievedItems.size());
Attachments
Issue Links
- links to