2016-01-12 45 views
13

我遇到了執行gradle clean test命令的問題。 我的應用程序正在使用activiti進行工作流程。 Git url:https://github.com/sanelib/eBOSS/tree/merge-before-dev 分支:「merge-before-dev」正在爲activiti worflow過程進行更多測試。但是它僅從「核心」模塊執行12次集成測試中的6次。如果我使用@Ignore進行隨機6次測試,那麼它會成功休息6.我已經將一些控制檯調試出來,發現它在啓動activiti進程時掛起。Activiti + Spring Boot + Gradle構建在執行gradle clean test時掛起

此來源還在/ scripts文件夾中包含了數據庫模式。如果您錯過了在您的環境中進行測試所需的任何文件,請告訴我。

有人可以看看這個,給我解決方案嗎?

+0

如果使用maxParallelForks = Runtime.runtime.availableProcessors()/ 2,那麼它就起作用。不明白爲什麼它會發生小測試。 –

+0

另外,如果我把forkEvery = 10與maxParallelForks = 1。它的工作原理。但由於這個原因,每10次測試後重新啓動一次,並導致更長的執行時間。 –

+0

我已經把項目切換到'merge-before-dev',從命令行運行'gradle clean test'並且一些測試完成了異常。這可以嗎? – Opal

回答

1

我還導致:23 tests completed, 14 failed :core:test FAILED

比我隨機挑選你的測試之一,它在隔離失敗也。它似乎並不是併發問題。

根本原因似乎是這樣的:

2016-02-05 20:56:16.556 WARN 16072 --- [   main] o.h.e.jdbc.internal.JdbcServicesImpl  : HHH000342: Could not obtain connection to query metadata : Cannot create PoolableConnectionFactory (Communications link failure 

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.) 

Place break-point on this line in Hibernate

所以它似乎是連接問題。