junit allowEmptyResults:true导致从xx.xx.xx.xx:xx的JNLP4-connect连接上的远程调用失败:

时间:2019-08-19 15:01:13

标签: jenkins junit jenkins-pipeline jenkins-plugins jenkins-declarative-pipeline

在管道脚本[Jenkinsfile]中设置junit allowEmptyResults:true导致从xx.xx.xx.xx:xx的JNLP4-connect连接上进行远程调用,即使节点从未断开也失败

Environment : Windows server 2012 r2
java Version 1.8.131
junit plugin version : 1.24
jenkins version : 2.121.3

jenkins slave is running as service.

xml report generated is proper, validated xml and it is proper
If I remove junit allowEmptyResults: true,
and keep junit '**/runtest-report.xml' it works as expected

but in some cases there's chances that empty results are created and need to bypass/handle that case too.

Here's pipeline snippet

archiveArtifacts allowEmptyArchive:true,工件:' / test / / .log, / test / / .html, /测试//*.bmp、/测试//configs.diff、**/runtest-report*.json、**/runtest-report*.xml'             println“在Windows上记录测试结果”

        junit allowEmptyResults: true,testResults: '**/runtest-report.xml'

Error Message

[Pipeline] End of Pipeline
Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from xx.xx.xx.xx:xx
        at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1741)
        at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357)
        at hudson.remoting.Channel.call(Channel.java:955)
        at hudson.FilePath.act(FilePath.java:1036)
        at hudson.FilePath.act(FilePath.java:1025)
        at hudson.tasks.junit.JUnitParser.parseResult(JUnitParser.java:114)
        at hudson.tasks.junit.JUnitResultArchiver.parse(JUnitResultArchiver.java:136)
        at hudson.tasks.junit.JUnitResultArchiver.parseAndAttach(JUnitResultArchiver.java:166)
        at hudson.tasks.junit.pipeline.JUnitResultsStepExecution.run(JUnitResultsStepExecution.java:50)
        at hudson.tasks.junit.pipeline.JUnitResultsStepExecution.run(JUnitResultsStepExecution.java:23)
        at

0 个答案:

没有答案