royteeuwen opened a new pull request, #21: URL: https://github.com/apache/sling-org-apache-sling-scripting-javascript/pull/21
## Summary The repository-based tests (`RepositoryScriptingTestBase` and its subclasses `TestSetupTest`, `ScriptableMapTest`, `ScriptableNodeTest`, `ScriptableResourceTest`, `ScriptableVersionTest`) ran against the legacy `org.apache.sling.commons.testing` `RepositoryTestBase`, which starts a Jackrabbit 2 repository persisted via Apache Derby. This had two problems: - Derby rejects region-less JVM locales such as `en_001` (macOS "English — World") with `ERROR XBM0X`, failing every repository test on such machines (unfixed in Derby trunk). - `RepositoryTestBase` is JUnit 3 (`TestCase`) based, conflicting with the JUnit 5 migration from SLING-12510. ## Changes - Rebase `RepositoryScriptingTestBase` on sling-mock's `SlingContext` with `ResourceResolverType.JCR_OAK` (in-memory Oak), removing Derby from the test classpath. - Drop the `commons.testing` and `jackrabbit-core` test dependencies; add `org.apache.sling.testing.sling-mock-oak` for a Java 17 compatible Oak and exclude the stale Oak 1.22 that `sling-mock.core` pulls transitively. - Complete the JUnit 5 migration: remove all JUnit 3 `TestCase` inheritance and assertion usage. - Deactivate the `RhinoJavaScriptEngineFactory` in `tearDown` so Rhino's set-once `ContextFactory` application class loader is reset between tests. ## Verification `mvn clean verify` is green: 91 tests pass, no locale workaround required, RAT and bnd baseline checks pass. JIRA: https://issues.apache.org/jira/browse/SLING-13252 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
