Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests fail due to class loading issue - GraalVM cannot be used. #716

Closed
hmf opened this issue Oct 16, 2019 · 0 comments · Fixed by #2561
Closed

Tests fail due to class loading issue - GraalVM cannot be used. #716

hmf opened this issue Oct 16, 2019 · 0 comments · Fixed by #2561
Milestone

Comments

@hmf
Copy link

hmf commented Oct 16, 2019

I have forked the a Maven project that demonstrates the use of the GraalVM. It also includes a set of tests that confirm that the GraalVM JS engine is faster than the Nashorn engine. These tests work correctly.

I set-up the same project using Mill. The example executes correctly - Nashorn is nearly twice as slow as Graal.js. However the tests fail due to class loading. In order for this to work we need to pass parameters to the JVM and add the libraries to the classpath. Due to issue #690 I created both a JUnit version and a uTest version. The former uses the same directory structure as the original project (intended for contribution), the latter uses the Mill standard directory structure.

I tried to track the issue that leads me to the test call. which then executes a subprocess call that ends in the call to TestRunner. I see that this last execution takes the classpath passed to it as an argument and sets it according. However when I print the classpath (see this example), it does not list the required libraries. Nevertheless I have confirmed that the classpath argument is passed on correctly.

Because the problem manifests itself in both test frameworks I suspect the problem is in the TestRunner and not for example in the JUnitRunner.

I have also seen issues #302 and #370 that seem to be related. These class loading issues seem to be tricky and at this point I do not know what other steps can be taken to diagnose and solve the problem.

Any suggestions are welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants