-
Notifications
You must be signed in to change notification settings - Fork 199
Description
I ran into a problem building on linux box and when I went and checked the behavior on the macos box I normally work on, I'm seeing this same failure to do a clean build of the current main in arquillian-test-spi:
[INFO] --- resources:3.3.1:testResources (default-testResources) @ arquillian-test-spi ---
[INFO] skip non existing resourceDirectory /Users/starksm/Dev/Arquillian/arquillian-core/test/spi/src/test/resources
[INFO]
[INFO] --- compiler:3.14.0:testCompile (default-testCompile) @ arquillian-test-spi ---
[INFO] Recompiling the module because of changed dependency.
[INFO] Compiling 7 source files with javac [debug deprecation target 1.8] to target/test-classes
[WARNING] bootstrap class path not set in conjunction with -source 8
[WARNING] /Users/starksm/Dev/Arquillian/arquillian-core/test/spi/src/test/java/org/jboss/arquillian/test/spi/ExceptionProxyTestCase.java:[142,48] toURL() in java.io.File has been deprecated
[WARNING] /Users/starksm/Dev/Arquillian/arquillian-core/test/spi/src/test/java/org/jboss/arquillian/test/spi/ExceptionProxyTestCase.java:[144,68] unchecked cast
required: java.lang.Class<org.jboss.arquillian.test.spi.IBean>
found: java.lang.Class<capture#1 of ?>
[WARNING] /Users/starksm/Dev/Arquillian/arquillian-core/test/spi/src/test/java/org/jboss/arquillian/test/spi/ExceptionProxyTestCase.java:[145,29] newInstance() in java.lang.Class has been deprecated
[INFO]
[INFO] --- compiler:3.14.0:testCompile (serveronly-compile) @ arquillian-test-spi ---
[INFO] Recompiling the module because of changed dependency.
[INFO] Compiling 2 source files with javac [debug deprecation target 1.8] to target/serveronly-classes
[WARNING] bootstrap class path not set in conjunction with -source 8
[INFO]
[INFO] --- surefire:3.5.2:test (default-test) @ arquillian-test-spi ---
[INFO] Using auto detected provider org.apache.maven.surefire.junit4.JUnit4Provider
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.jboss.arquillian.test.spi.ExceptionProxyTestCase
[ERROR] Tests run: 7, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.056 s <<< FAILURE! -- in org.jboss.arquillian.test.spi.ExceptionProxyTestCase
[ERROR] org.jboss.arquillian.test.spi.ExceptionProxyTestCase.handleExceptionClassNotOnClientClasspath -- Time elapsed: 0.003 s <<< ERROR!
java.lang.Error:
Unresolved compilation problems:
The import org.jboss.arquillian.test.spi.IBean cannot be resolved
IBean cannot be resolved to a type
No exception of type SomeNonClientSideException can be thrown; an exception type must be a subclass of Throwable
No exception of type SomeNonClientSideException can be thrown; an exception type must be a subclass of Throwable
at org.jboss.arquillian.test.spi.serveronly.SomeBean.<init>(SomeBean.java:3)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
at java.base/java.lang.reflect.ReflectAccess.newInstance(ReflectAccess.java:128)
at java.base/jdk.internal.reflect.ReflectionFactory.newInstance(ReflectionFactory.java:347)
at java.base/java.lang.Class.newInstance(Class.java:645)
at org.jboss.arquillian.test.spi.ExceptionProxyTestCase.causeServerException(ExceptionProxyTestCase.java:145)
at org.jboss.arquillian.test.spi.ExceptionProxyTestCase.handleExceptionClassNotOnClientClasspath(ExceptionProxyTestCase.java:127)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:316)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:240)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:214)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:155)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)
[INFO] Running org.jboss.arquillian.test.spi.ExceptionProxySerializationTestCase
[WARNING] Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0 s -- in org.jboss.arquillian.test.spi.ExceptionProxySerializationTestCase
[INFO]
[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR] ExceptionProxyTestCase.handleExceptionClassNotOnClientClasspath:127->causeServerException:145 » Unresolved compilation problems:
The import org.jboss.arquillian.test.spi.IBean cannot be resolved
IBean cannot be resolved to a type
No exception of type SomeNonClientSideException can be thrown; an exception type must be a subclass of Throwable
No exception of type SomeNonClientSideException can be thrown; an exception type must be a subclass of Throwable
[INFO]
[ERROR] Tests run: 8, Failures: 0, Errors: 1, Skipped: 1
This test is trying to validate that an exception thrown on the server but not available on the client does not prevent deserialization of the result exception proxy. It does this by using custom maven-compiler-plugin configs to simulate the server side classpath and the default client test classpath. When I was seeing this error, on both machines I happened to have the repo open in a vscode ide that was being used for code agent testing. Apparently this was compiling the org/jboss/arquillian/test/spi/serveronly/SomeBean.class into the target/test-classes instead of only target/serveronly-classes, and ends up causing class loading issues.