英文:
JUnit Test failing only on Jenkins with NPE
问题
我有一个 JUnit 测试,在本地环境和一些 Jenkins 流水线上运行正常,但在某个流水线上失败(我们称之为 develop)。此外,如果我从相同的 Git 分支重新创建一个 Jenkins 流水线,测试将会通过。
如果我删除失败的流水线,并创建一个新的流水线,使用不同的名称(测试通过),但我将其重新命名为 develop(失败的那个名称),它又会再次失败。
我想这可能与 Jenkins 有关,因为它只在特定的流水线上发生,但是否有人之前遇到过这种情况呢?
英文:
I have a JUnit test which runs ok on local environment and even on some Jenkins pipelines, but on a certain pipeline fails(let's call it develop). Furthermore, if i recreate a jenkins pipeline from the same git branch, the test will pass.
If i delete the failing pipeline and i create a new one with a different name(on which the test is passing), but i rename it back to develop(the failing one), it starts to fail again.
I imagine this is somehow related to Jenkins since it is only occurring on certain pipelines, but has somebody encountered this before?
专注分享java语言的经验与见解,让所有开发者获益!
评论