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

Fix randomness of TestNuxeoLauncher#testRegisterTrialIsDeprecated

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 11.1, 2021.0
    • Component/s: Launcher

      Description

      TestNuxeoLauncher#testRegisterTrialIsDeprecated randomly fail with message below:

      08:44:19 [ERROR] Tests run: 5, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 53.35 s <<< FAILURE! - in org.nuxeo.launcher.TestNuxeoLauncher
      08:44:19 [ERROR] testRegisterTrialIsDeprecated(org.nuxeo.launcher.TestNuxeoLauncher)  Time elapsed: 2.442 s  <<< FAILURE!
      08:44:19 java.lang.AssertionError: 
      08:44:19 
      08:44:19 Expected: (an instance of java.lang.UnsupportedOperationException and exception with message a string containing "deprecated" and exception with message a string containing "https://connect.nuxeo.com/register")
      08:44:19      but: an instance of java.lang.UnsupportedOperationException <org.junit.runners.model.TestTimedOutException: test timed out after 1000 milliseconds> is a org.junit.runners.model.TestTimedOutException
      08:44:19 Stacktrace was: org.junit.runners.model.TestTimedOutException: test timed out after 1000 milliseconds
      08:44:19     at app//org.nuxeo.connect.update.standalone.StandaloneUpdateService.createXmap(StandaloneUpdateService.java:137)
      08:44:19     at app//org.nuxeo.connect.update.standalone.StandaloneUpdateService.initialize(StandaloneUpdateService.java:170)
      08:44:19     at app//org.nuxeo.launcher.connect.ConnectBroker.<init>(ConnectBroker.java:137)
      08:44:19     at app//org.nuxeo.launcher.NuxeoLauncher.createLauncher(NuxeoLauncher.java:2425)
      08:44:19     at app//org.nuxeo.launcher.TestNuxeoLauncher.testRegisterTrialIsDeprecated(TestNuxeoLauncher.java:195)
      

      After asking NOS, we identify presence of a useless timeout on test which fails the test if there's load on CI. Originally, NXP-22550 put a timeout on this test because System.in could have been called in the code. This isn't the case anymore as the command is deprecated, so we can safely remove the timeout.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 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 - 30 minutes
                  30m