After much frustrating debugging, I found the problem. The failing test run had the following in build.gradle:
test {
scanForTestClasses = false
workingDir “${testClassesDir}”
systemProperty ‘javax.wsdl.factory.WSDLFactoryCandidate’, ‘oracle.j2ee.ws.wsdl.factory.WSDLFactoryImpl’
include “**/oracle/j2ee/ws/wsdl/OraWSDLTestSuite.class”
}
Since testClassesDir is deprecated, this caused workingDir to be set to null. I failed to notice (for a very long time), the following output that finally made me realize what had happened:
Starting process ‘Gradle Test Executor 1’. Working directory: /weblogic/dev/src123100/webservices/src/base/orawsdl-api/null Command: /weblogic/dev/auto_download/x86_64/jdk180161b12/jdk1.8.0_161/bin/java -Djava.awt.headless=true -Djava.security.manager=worker.org.gradle.process.internal.worker.child.BootstrapSecurityManager -Djavax.wsdl.factory.WSDLFactoryCandidate=oracle.j2ee.ws.wsdl.factory.WSDLFactoryImpl -Dorg.gradle.native=false -XX:+HeapDumpOnOutOfMemoryError -Xmx1g -Dfile.encoding=ISO-8859-1 -Djava.io.tmpdir=/weblogic/dev/src123100/webservices/src/base/orawsdl-api/target/classes/java/test -Duser.country=US -Duser.language=en -Duser.variant -ea -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5006 -cp /scratch/jgish/gradle_cache/caches/4.7/workerMain/gradle-worker.jar worker.org.gradle.process.internal.worker.GradleWorkerMain ‘Gradle Test Executor 1’
The only errors I got were the messages above and stack traces that were totally misleading. Apparently an internal exception was swallowed and not reported.
Suggestion – I believe this all could be avoided if the gradle test builder would simply do a if (!workingDir.exists()) { fail }
Thanks,
Jim