[ 
https://issues.apache.org/jira/browse/IGNITE-16256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17472655#comment-17472655
 ] 

Vladislav Pyatkov commented on IGNITE-16256:
--------------------------------------------

LGTM

> ItInternalTableScanTest.testMultipleRowScan is flaky
> ----------------------------------------------------
>
>                 Key: IGNITE-16256
>                 URL: https://issues.apache.org/jira/browse/IGNITE-16256
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Alexander Lapin
>            Assignee: Alexander Lapin
>            Priority: Blocker
>              Labels: ignite-3
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> {code:java}
> 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)
>  {code}
>  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
> {code:java}
>     @Override
>     public void onComplete() {
>         noMoreData.set(true);
>     }
> });
> assertTrue(waitForCondition(() -> retrievedItems.size() == 
> submittedItems.size(), 2_000));
> assertTrue(noMoreData.get(), "More data is not expected."); {code}
> following should be used:
> {code:java}
>     @Override
>     public void onComplete() {
>         subscriberAllDataAwaitLatch.countDown();
>     }
> });
> subscriberAllDataAwaitLatch.await();
> assertEquals(submittedItems.size(), retrievedItems.size()); {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to