Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-16256

ItInternalTableScanTest.testMultipleRowScan is flaky

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • None
    • 3.0.0-alpha4
    • 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

          Activity

            People

              alapin Alexander Lapin
              alapin Alexander Lapin
              Vladislav Pyatkov Vladislav Pyatkov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h
                  1h