有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java junit。框架断言失败错误:导入失败:在允许的根之外访问文件

junit测试在我的本地OS X上运行良好,但在Jenkins中“允许的根”会出现错误。我试过chmod-R 777*,但没用。问题:有没有一个标志可以传递给JUnit,以明确指定允许的根

1) testExcludes1(com.twitter.intellij.pants.integration.OSSPantsScalaExamplesIntegrationTest)
                 junit.framework.AssertionFailedError: Import failed: File accessed outside allowed roots: file:///export/hdb3/jenkins/workspace/intellij_plugin_ci_trigger@2/.cache/pants/pants;
                 Allowed roots: [/export/hdb3/jenkins/workspace/intellij_plugin_ci_trigger@2/.pants.d/intellij/plugins-sandbox/test, /tmp/unitTest_excludes1_569/testExcludes10, /var/lib/jenkins, /export/hdb3/jenkins/workspace/intellij_plugin_ci_trigger@2/.pants.d/resources/services, /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.91.x86_64/jre, /tmp]

共 (1) 个答案