Uploaded image for project: 'IronJacamar'
  1. IronJacamar
  2. JBJCA-1493

WorkManagerStartWorkTestCase failing on slower machines

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.0.14.Final
    • 3.0.8.Final
    • Test suite
    • 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
              pmackay@redhat.com Peter Mackay
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: