Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-22704

Fix random UT failure on nuxeo-core WorkManagerTest.transientFilesWorkAreCleaned

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 9.2
    • Fix Version/s: 9.3
    • Component/s: Events / Works

      Description

      invoke on features error [Holder [type=class org.nuxeo.runtime.test.runner.MDCFeature], Holder [type=class org.nuxeo.runtime.test.runner.ConditionalIgnoreRule$Feature], Holder [type=class org.nuxeo.runtime.test.runner.RandomBug$Feature], Holder [type=class org.nuxeo.runtime.test.runner.RuntimeFeature], Holder [type=class org.nuxeo.runtime.test.runner.FileEventsTrackingFeature]]
      
      Stacktrace
      
      java.lang.AssertionError: invoke on features error [Holder [type=class org.nuxeo.runtime.test.runner.MDCFeature], Holder [type=class org.nuxeo.runtime.test.runner.ConditionalIgnoreRule$Feature], Holder [type=class org.nuxeo.runtime.test.runner.RandomBug$Feature], Holder [type=class org.nuxeo.runtime.test.runner.RuntimeFeature], Holder [type=class org.nuxeo.runtime.test.runner.FileEventsTrackingFeature]]
      	at org.nuxeo.runtime.test.runner.FeaturesLoader.apply(FeaturesLoader.java:123)
      	at org.nuxeo.runtime.test.runner.FeaturesLoader.apply(FeaturesLoader.java:113)
      	at org.nuxeo.runtime.test.runner.FeaturesRunner.afterMethodRun(FeaturesRunner.java:163)
      	at org.nuxeo.runtime.test.runner.FeaturesRunner$AfterMethodRunStatement.evaluate(FeaturesRunner.java:334)
      	at org.nuxeo.runtime.test.runner.FeaturesRunner$AfterTeardownStatement.evaluate(FeaturesRunner.java:351)
      	at org.nuxeo.runtime.test.runner.FeaturesRunner$RulesFactory$1.evaluate(FeaturesRunner.java:429)
      	at org.nuxeo.runtime.test.runner.RuntimeDeployment$DeploymentStatement.evaluate(RuntimeDeployment.java:299)
      	at org.nuxeo.runtime.test.runner.RuntimeFeature$2$1.evaluate(RuntimeFeature.java:137)
      	at org.nuxeo.runtime.test.runner.FeaturesRunner$RulesFactory$1.evaluate(FeaturesRunner.java:429)
      	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
      	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
      	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
      	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
      	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
      	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
      	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
      	at org.nuxeo.runtime.test.runner.FeaturesRunner$AfterClassStatement.evaluate(FeaturesRunner.java:235)
      	at org.nuxeo.runtime.test.runner.FeaturesRunner$RulesFactory$1.evaluate(FeaturesRunner.java:429)
      	at org.nuxeo.runtime.test.runner.FeaturesRunner$BeforeClassStatement.evaluate(FeaturesRunner.java:218)
      	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
      	at org.junit.runners.Suite.runChild(Suite.java:127)
      	at org.junit.runners.Suite.runChild(Suite.java:26)
      	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
      	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
      	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
      	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
      	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
      	at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
      	at org.junit.runner.JUnitCore.run(JUnitCore.java:138)
      	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.createRequestAndRun(JUnitCoreWrapper.java:113)
      	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.executeEager(JUnitCoreWrapper.java:85)
      	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:54)
      	at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:134)
      	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
      	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
      	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
      	Suppressed: java.lang.AssertionError: 
      Expected: is <false>
           but: was <true>
      		at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
      		at org.junit.Assert.assertThat(Assert.java:865)
      		at org.junit.Assert.assertThat(Assert.java:832)
      		at org.nuxeo.runtime.test.runner.FileEventsTrackingFeature.afterMethodRun(FileEventsTrackingFeature.java:75)
      		at org.nuxeo.runtime.test.runner.FeaturesRunner.lambda$afterMethodRun$3(FeaturesRunner.java:163)
      		at org.nuxeo.runtime.test.runner.FeaturesLoader.apply(FeaturesLoader.java:126)
      		... 39 more
      
      

      The unit test has a comment that warn about its randomness

        @Test
          public void transientFilesWorkAreCleaned() throws Exception {
              final File file = feature.resolveAndCreate(new File("pfouh"));
              service.schedule(new CreateFile(file));
              service.awaitCompletion(5, TimeUnit.SECONDS);
              // TODO randomly fails if not waiting for the create file task - why service.awaitCompletion isn't enough?
              Thread.sleep(10);
          }
      

      seen
      https://qa.nuxeo.org/jenkins/job/master/job/nuxeo-master-fullbuild-daily/421/testReport/junit/org.nuxeo.ecm.core.work/WorkManagerTest/transientFilesWorkAreCleaned/
      and
      https://qa.nuxeo.org/jenkins/job/TestAndPush/job/ondemand-testandpush-check-9.2/4/testReport/junit/org.nuxeo.ecm.core.work/WorkManagerTest/transientFilesWorkAreCleaned/

      Proposition is to ignore the test on 9.2, debug it on master

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 hours, 30 minutes
                  3h 30m