Exception thrown by failing unit tests but build marked as successful


(Etienne Studer) #1

Hi

We’ve had this problem for many versions: for some failing unit tests, the Test task aborts with the following error message BUT the builds continues to run and will say that it has run successfully. Note that this behavior is repeatable. Are there any plans to fix this?

A possibility is that the exception thrown in the unit test cannot be serialized by the Gradle worker - but that is just a very incompetent guess.

Regards, Etienne

[resolveVariableWithDotInNameOnExplicitWorkObject] … 145 more [16:27:01][:edoras-gear-core:test] Unexpected exception thrown. [16:27:01][:edoras-gear-core:test] org.gradle.messaging.remote.internal.MessageIOException: Could not read message from ‘/0:0:0:0:0:0:0:1:53150’. [16:27:01][:edoras-gear-core:test] at org.gradle.messaging.remote.internal.inet.SocketConnection.receive(SocketConnection.java:88) [16:27:01][:edoras-gear-core:test] at org.gradle.messaging.remote.internal.hub.MessageHub$ConnectionReceive.run(MessageHub.java:230) [16:27:01][:edoras-gear-core:test] at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66) [16:27:01][:edoras-gear-core:test] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) [16:27:01][:edoras-gear-core:test] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [16:27:01][:edoras-gear-core:test] at java.lang.Thread.run(Thread.java:662) [16:27:01][:edoras-gear-core:test] Caused by: java.io.StreamCorruptedException: unexpected block data [16:27:01][:edoras-gear-core:test] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1341) [16:27:01][:edoras-gear-core:test] at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1969) [16:27:01][:edoras-gear-core:test] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1893) [16:27:01][:edoras-gear-core:test] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1775) [16:27:01][:edoras-gear-core:test] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1327) [16:27:01][:edoras-gear-core:test] at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1969) [16:27:01][:edoras-gear-core:test] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1893) [16:27:01][:edoras-gear-core:test] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1775) [16:27:01][:edoras-gear-core:test] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1327) [16:27:01][:edoras-gear-core:test] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349) [16:27:01][:edoras-gear-core:test] at org.gradle.messaging.remote.internal.Message$ExceptionPlaceholder.read(Message.java:101) [16:27:01][:edoras-gear-core:test] at org.gradle.messaging.remote.internal.Message$ExceptionReplacingObjectInputStream.resolveObject(Message.java:166) [16:27:01][:edoras-gear-core:test] at java.io.ObjectInputStream.checkResolve(ObjectInputStream.java:1375) [16:27:01][:edoras-gear-core:test] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1327) [16:27:01][:edoras-gear-core:test] at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1683) [16:27:01][:edoras-gear-core:test] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1321) [16:27:01][:edoras-gear-core:test] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349) [16:27:01][:edoras-gear-core:test] at org.gradle.messaging.remote.internal.Message.receive(Message.java:38) [16:27:01][:edoras-gear-core:test] at org.gradle.messaging.serialize.kryo.JavaSerializer$JavaReader.read(JavaSerializer.java:50) [16:27:01][:edoras-gear-core:test] at org.gradle.messaging.remote.internal.hub.MethodInvocationSerializer$MethodInvocationReader.readArguments(MethodInvocationSerializer.java:112) [16:27:01][:edoras-gear-core:test] at org.gradle.messaging.remote.internal.hub.MethodInvocationSerializer$MethodInvocationReader.read(MethodInvocationSerializer.java:107) [16:27:01][:edoras-gear-core:test] at org.gradle.messaging.remote.internal.hub.MethodInvocationSerializer$MethodInvocationReader.read(MethodInvocationSerializer.java:87) [16:27:01][:edoras-gear-core:test] at org.gradle.messaging.serialize.kryo.TypeSafeSerializer$1.read(TypeSafeSerializer.java:37) [16:27:01][:edoras-gear-core:test] at org.gradle.messaging.remote.internal.hub.InterHubMessageSerializer$MessageReader.read(InterHubMessageSerializer.java:67) [16:27:01][:edoras-gear-core:test] at org.gradle.messaging.remote.internal.hub.InterHubMessageSerializer$MessageReader.read(InterHubMessageSerializer.java:53) [16:27:01][:edoras-gear-core:test] at org.gradle.messaging.remote.internal.inet.SocketConnection.receive(SocketConnection.java:83)


(Peter Niederwieser) #2

Does the test task really abort, in the sense that some tests won’t get run?

Raised as GRADLE-2881, in the hope that this will help to prioritize the known test serialization issues.