Gradle stuck for ca. 10 sec after test execution

(Peter G) #1


I moved some Gradle project to a different computer, and somehow ever since, the test run of the project seems to get stuck for no reason for about 10 seconds after the all tests have run. The debug log looks like the following (the problematic line seems to be “15:56:59.977 [DEBUG] [TestEventLogger] Test Run PASSED”):

15:56:59.745 [DEBUG] [TestEventLogger] Gradle Worker 1 PASSED
15:56:59.974 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: SUCCEEDED
15:56:59.975 [INFO] [org.gradle.process.internal.DefaultExecHandle] Process 'Gradle Worker 1' finished with exit value 0 (state: SUCCEEDED)
15:56:59.977 [DEBUG] [TestEventLogger]
 15:56:59.977 [DEBUG] [TestEventLogger] Test Run PASSED
15:57:10.156 [INFO] [org.gradle.api.internal.tasks.testing.junit.result.Binary2JUnitXmlReportGenerator] Finished generating test XML results (0.092 secs)
15:57:10.157 [INFO] [] Generating HTML test report...
15:57:10.237 [INFO] [] Finished generating test html results (0.08 secs)
15:57:10.237 [DEBUG] [org.gradle.logging.internal.DefaultLoggingConfigurer] Finished configuring with level: DEBUG, configurers: [org.gradle.logging.internal.OutputEventRenderer@16debe8, org.gradle.logging.internal.logback.LogbackLoggingConfigurer@579acd13, org.gradle.logging.internal.JavaUtilLoggingConfigurer@740dc753]
15:57:10.283 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':test'
15:57:10.283 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :test (Thread[main,5,main]) completed. Took 18.264 secs.
15:57:10.283 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :check (Thread[main,5,main]) started.
15:57:10.284 [LIFECYCLE] [org.gradle.TaskExecutionLogger] :check

Can anyone tell me, how to proceed to find the problem? It’s a java project, OpenJDK 1.7.0_45… Many thanks in advance for any help :slight_smile:

Greetings, Peter

(Attila Kelemen) #2

You might have written a lot to the standard output (or error) which is being added to the html (and xml) output. At least, this was the case for me. Maybe your other computer has a slower harddrive.

(Attila Kelemen) #3


Finished generating test XML results (0.092 secs)

this might not be the case for you but anyway, writting a lot to stdout can halt the test after completion for quite a lot of time (I have never checked the logs though where exactly this happens).

(Peter G) #4

Hmm, nevermind, today I can’t reproduce the problem anymore… Since I just installed the system, maybe it was something that only got configured on a restart… Now the new system is actually about 2 sec faster than the old one, which is very pleasing :slight_smile: Anyway, thanks for your suggestions, I will keep in mind to check this, if I run into the same problem again!!!

Greetings, Peter