Closed Vlatombe closed 5 months ago
Added a unit test that fails with
java.lang.IllegalStateException: Duplicate key org.jenkinsci.plugins.parallel_test_executor.Test1#test1Case1 (attempted merging values org.jenkinsci.plugins.parallel_test_executor.Test1#test1Case1 and org.jenkinsci.plugins.parallel_test_executor.Test1#test1Case1)
with the previous implementation.
Follows up #279
This can happen if the same test case (class name + method name) appears in multiple branches of the same build.
For example, this happens for
InjectedTest
, which is set in the root package for any jenkins plugin. So if you have a multi-module build, using test case split would cause an exception becauseInjectedTest
is found once per module.The existing java test class implementation used
Map#putAll
to collect entries, which just overrides existing entries and doesn't cause an exception to be thrown in that case.Testing done