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

Fix TestBulkMigrator.testBulkMigrationStartStopProcessor randomness

    XMLWordPrintable

    Details

      Description

      Sometimes the TestBulkMigrator.testBulkMigrationStartStopProcessor can fail in dev profile with the error below:

      [2023-05-04T08:07:56.569Z] [ERROR] Tests run: 3, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 6.203 s <<< FAILURE! - in org.nuxeo.ecm.core.migrator.TestBulkMigrator
      [2023-05-04T08:07:56.569Z] [ERROR] testBulkMigrationStartStopProcessor(org.nuxeo.ecm.core.migrator.TestBulkMigrator)  Time elapsed: 1.203 s  <<< ERROR!
      [2023-05-04T08:07:56.569Z] java.lang.NumberFormatException: Cannot parse null string
      [2023-05-04T08:07:56.569Z] 	at java.base/java.lang.Long.parseLong(Long.java:674)
      [2023-05-04T08:07:56.569Z] 	at java.base/java.lang.Long.parseLong(Long.java:836)
      [2023-05-04T08:07:56.569Z] 	at org.nuxeo.runtime.migration.MigrationServiceImpl.getStatus(MigrationServiceImpl.java:387)
      [2023-05-04T08:07:56.569Z] 	at org.nuxeo.ecm.core.migrator.TestBulkMigrator.lambda$testBulkMigrationStartStopProcessor$4(TestBulkMigrator.java:146)
      [2023-05-04T08:07:56.569Z] 	at org.awaitility.core.CallableCondition$ConditionEvaluationWrapper.eval(CallableCondition.java:100)
      [2023-05-04T08:07:56.569Z] 	at org.awaitility.core.ConditionAwaiter$ConditionPoller.call(ConditionAwaiter.java:201)
      [2023-05-04T08:07:56.569Z] 	at org.awaitility.core.ConditionAwaiter$ConditionPoller.call(ConditionAwaiter.java:188)
      [2023-05-04T08:07:56.569Z] 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      [2023-05-04T08:07:56.569Z] 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
      [2023-05-04T08:07:56.569Z] 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
      [2023-05-04T08:07:56.569Z] 	at java.base/java.lang.Thread.run(Thread.java:833)
      

      This looks like a concurrent update on the KV, the computation/migration will set its status as finished while the test is retrieving the status.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                kleturc Kevin Leturc
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: