Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-2603

Intermittent test failure: AsyncAPITest

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Major Major
    • 5.2.0.Final
    • 5.2.0.Final
    • None

      AsyncAPITest.testAsyncMethodWithLifespanAndMaxIdle has this logic:

            // putIfAbsent lifespan only
            f = c.putAsync("k", "v3");
            assertNull(f.get());
            f = c.putIfAbsentAsync("k", "v4", 1000, TimeUnit.MILLISECONDS);
            markStartTime();
            assert f != null;
            assert !f.isCancelled();
            assertEquals("v3", f.get()); //here's the problem!!
      

      the test assumes that the first put(v3_ executes before the second one (v4) which is not correct.

              mircea.markus Mircea Markus (Inactive)
              mircea.markus Mircea Markus (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: