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.