运行Gradle测试时管道破裂错误

我在gradle中运行测试时遇到问题。我知道我的gradle配置可以在其他机器上运行,但是不幸的是我的不行。我们有junit

test和testNG,当尝试执行时,它们都产生如下的stacktrace:

Could not write standard input into: Gradle Worker 1.

java.io.IOException: The pipe is being closed

at java.io.FileOutputStream.writeBytes(Native Method)

at java.io.FileOutputStream.write(FileOutputStream.java:318)

at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)

at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)

at org.gradle.process.internal.streams.ExecOutputHandleRunner.run(ExecOutputHandleRunner.java:53)

at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

at java.lang.Thread.run(Thread.java:722)

它将连续产生此错误并带有不同的编号(Gradle Worker 2,Gradle Worker 3等)。有没有人遇到过类似的问题?

我正在使用gradle 1.6。

编辑:我忘了告诉我我正在使用gradle包装器

编辑:更改为版本1.12后,我收到错误:

Caused by: org.gradle.api.InvalidUserDataException: Could not create task '(custome taks name)': Unknown argument(s) in task definition: [mustRunAfter]

11:20:17.990 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.TaskFactory.validateArgs(TaskFactory.java:147)

11:20:17.991 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.TaskFactory.checkTaskArgsAndCreateDefaultValues(TaskFactory.java:134)

11:20:17.991 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.TaskFactory.createTask(TaskFactory.java:72)

编辑:好的,我想我已经找到了导致此问题的原因- 。当我禁用它时,脚本会向前移动一点,但以:

org.gradle.messaging.remote.internal.ConnectException: Could not connect to server [e42b57ea-ced6-4bb6-9369-3186ab4983d6 port:63631, addresses:[/127.0.0.1, /0:0:0:0:0:0:0:1]]. Tried addresses: [/127.0.0.1, /0:0:0:0:0:0:0:1].

at org.gradle.messaging.remote.internal.inet.TcpOutgoingConnector.connect(TcpOutgoingConnector.java:62)

at org.gradle.messaging.remote.internal.hub.MessageHubBackedClient.getConnection(MessageHubBackedClient.java:35)

at org.gradle.process.internal.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:54)

at org.gradle.process.internal.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:35)

at org.gradle.process.internal.child.ImplementationClassLoaderWorker.execute(ImplementationClassLoaderWorker.java:85)

at org.gradle.process.internal.child.ImplementationClassLoaderWorker.execute(ImplementationClassLoaderWorker.java:41)

at org.gradle.process.internal.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:43)

at org.gradle.process.internal.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:32)

at org.gradle.process.internal.launcher.BootstrapClassLoaderWorker.call(BootstrapClassLoaderWorker.java:46)

at org.gradle.process.internal.launcher.BootstrapClassLoaderWorker.call(BootstrapClassLoaderWorker.java:32)

at jarjar.org.gradle.process.internal.launcher.GradleWorkerMain.run(GradleWorkerMain.java:32)

at jarjar.org.gradle.process.internal.launcher.GradleWorkerMain.main(GradleWorkerMain.java:37)

Caused by: java.net.ConnectException: Connection refused: connect

用谷歌搜索这个错误给我什么(只有一些老gradle 1.1错误信息)。有人遇到这种问题吗?

回答:

哇,经过一整天的努力,我想我终于找到了引起问题的原因。犯了罪的是杀毒软件-COMODO。卸载并安装另一个后,一切都开始正常运行。因此,所有Gradle用户-

。意识到 :)

以上是 运行Gradle测试时管道破裂错误 的全部内容, 来源链接: utcz.com/qa/417858.html

回到顶部