Uploaded image for project: 'OpenAM'
  1. OpenAM
  2. OPENAM-12136

Scripting threadpool configuration updates can initialize the threadpool incorrectly

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.0.0
    • Component/s: scripting
    • Labels:
    • Needs backport:
      No
    • Needs QA verification:
      No
    • Functional tests:
      No
    • Are the reproduction steps defined?:
      Yes and I used the same an in the description

      Description

      Bug description

      When trying to compile OpenAM on Java 9, the following test failure can be seen:

      Tests run: 178, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 4.678 sec <<< FAILURE! - in TestSuite
      shouldReconfigureConfigurableExecutorService(org.forgerock.openam.scripting.ThreadPoolScriptEvaluatorTest)  Time elapsed: 0.013 sec  <<< FAILURE!
      org.junit.ComparisonFailure: expected:<[50]> but was:<[1]>
      	at org.forgerock.openam.scripting.ThreadPoolScriptEvaluatorTest.shouldReconfigureConfigurableExecutorService(ThreadPoolScriptEvaluatorTest.java:148)
      
      shouldReconfigureThreadPool(org.forgerock.openam.scripting.ThreadPoolScriptEvaluatorTest)  Time elapsed: 0 sec  <<< FAILURE!
      org.junit.ComparisonFailure: expected:<[50]> but was:<[1]>
      	at org.forgerock.openam.scripting.ThreadPoolScriptEvaluatorTest.shouldReconfigureThreadPool(ThreadPoolScriptEvaluatorTest.java:124)
      
      
      Results :
      
      Failed tests: 
        ThreadPoolScriptEvaluatorTest.shouldReconfigureConfigurableExecutorService:148 expected:<[50]> but was:<[1]>
        ThreadPoolScriptEvaluatorTest.shouldReconfigureThreadPool:124 expected:<[50]> but was:<[1]>
      

      This points out a genuine bug in the product: if the new pool size and the old pool size don't overlap, the pool can temporarily be initialized with an invalid dimension (min: 5, max: 2).

      How to reproduce the issue

      Try to compile the product with Java 9, or try to run it on Java 9, although the product is not yet compatible with Java 9

      Expected behaviour

      The product compiles without test failures.

      Current behaviour

      There are test failures.

        Attachments

          Activity

            People

            • Assignee:
              peter.major Peter Major [X] (Inactive)
              Reporter:
              peter.major Peter Major [X] (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: