-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Test task and '-XstartOnFirstThread' makes gradle hang #864
Comments
Supporting evidence for migrating https://issues.gradle.org/browse/GRADLE-3290 to gradle/gradle#864
I started the test using
When I run this command manually, and press ⏎ I get this: Error occurred during initialization of VM
java.lang.ExceptionInInitializerError
at java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1451)
at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1436)
Caused by: java.lang.RuntimeException: Could not initialise system classpath.
at worker.org.gradle.process.internal.worker.child.BootstrapSecurityManager.checkPermission(BootstrapSecurityManager.java:81)
at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1294)
at java.lang.System.getProperty(System.java:717)
at sun.misc.Launcher.<clinit>(Launcher.java:59)
at java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1451)
at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1436)
Caused by: java.io.IOException: Unexpected value 10 received. It seems the stream was not encoded correctly.
at worker.org.gradle.process.internal.streams.EncodedStream$EncodedInput.hexToByte(EncodedStream.java:59)
at worker.org.gradle.process.internal.streams.EncodedStream$EncodedInput.read(EncodedStream.java:49)
at java.io.DataInputStream.readInt(DataInputStream.java:387)
at worker.org.gradle.process.internal.worker.child.BootstrapSecurityManager.checkPermission(BootstrapSecurityManager.java:67)
at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1294)
at java.lang.System.getProperty(System.java:717)
at sun.misc.Launcher.<clinit>(Launcher.java:59)
at java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1451)
at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1436) |
There is a Gradle bug (gradle/gradle#864) which prevents the "-XstartOnFirstThread" from working correctly and thus prevents SWT unit tests from function on Mac. Since we're unable to work around the Gradle issue, I've made this task exit with a descriptive error when run on Mac. The instructions detail how to suppress the SWT tests so that all other unit tests can be run. Relates to: #636
This issue has been automatically marked as stale because it has not had recent activity. Given the limited bandwidth of the team, it will be automatically closed if no further activity occurs. If you're interested in how we try to keep the backlog in a healthy state, please read our blog post on how we refine our backlog. If you feel this is something you could contribute, please have a look at our Contributor Guide. Thank you for your contribution. |
This issue has been automatically closed due to inactivity. If you can reproduce this on a recent version of Gradle or if you have a good use case for this feature, please feel free to reopen the issue with steps to reproduce, a quick explanation of your use case or a high-quality pull request. |
…ts which need -XstartOnFirstThread can work. Issue: gradle#864 Signed-off-by: Ned Twigg <ned.twigg@diffplug.com>
I submitted a PR which fixes this issue. |
Re-opening since there is an PR open to fix this. |
Expected Behavior
When test has specified the following arguments:
the JUnit test cases should be started on the first thread.
Current Behavior
The tests do not start on the first thread.
Context
This is required for SWT tests to run on mac.
As of May 2016, the Gradle test VM is started by
org.gradle.api.internal.tasks.testing.worker.ForkingTestClassProcessor
which usesorg.gradle.process.internal.worker.DefaultWorkerProcessBuilder
to create aWorkerProcess
and start it.All this is called from
org.gradle.api.internal.tasks.testing.detection.DefaultTestExecuter
.Steps to Reproduce (for bugs)
Your Environment
Any version of macOS.
The text was updated successfully, but these errors were encountered: