Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-29814

[JBJCA-1493] WorkManagerStartWorkTestCase failing on slower machines

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 8.1.0.GA-CR9, 8.1.0.GA
    • None
    • JCA
    • None

      We started seeing failures of WorkManagerStartWorkTestCase#testStartWorkFullSpecWithImmediateStartTimeout in our CI after upgrading to 3.0.8.Final in EAP.

      The test was modified in this commit

      The test passes locally, but that's just because the postRun check happens to run before the work instance manages to finish its run() method. On our medium jenkins workers this is not the case causing the test failures. Running in our CI with a larger HW configuration gets rid of the failure.

      According to the WorkManager.html#startWork docs, it should reject the work instance if it's not started IMMEDIATELY. I don' see why the test should expect

      assertFalse(work.hasPostRun())

      the previous test code seems correct to me

      workManager.startWork(work, WorkManager.IMMEDIATE, null, null);
      done.await();
      assertTrue(work.hasPostRun());
      

              msimka@redhat.com Martin Simka
              msimka@redhat.com Martin Simka
              Jan Blizňák Jan Blizňák
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: