Skip to content

Commit cdd3503

Browse files
authored
Revert "Do not call contributeTestData with WorkflowRun lock held (#738)"
This reverts commit 71188fe.
1 parent 71188fe commit cdd3503

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

src/main/java/hudson/tasks/junit/JUnitResultArchiver.java

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -291,15 +291,6 @@ public static TestResultSummary parseAndSummarize(
291291
task.isKeepTestNames())
292292
.summarizeResult(testResults, build, pipelineTestDetails, workspace, launcher, listener, storage);
293293
}
294-
var data = new ArrayList<TestResultAction.Data>();
295-
if (task.getTestDataPublishers() != null) {
296-
for (var tdp : task.getTestDataPublishers()) {
297-
var d = tdp.contributeTestData(build, workspace, launcher, listener, result);
298-
if (d != null) {
299-
data.add(d);
300-
}
301-
}
302-
}
303294

304295
synchronized (build) {
305296
// TODO can the build argument be omitted now, or is it used prior to the call to addAction?
@@ -329,7 +320,14 @@ public static TestResultSummary parseAndSummarize(
329320
}
330321
}
331322

332-
data.forEach(action::addData);
323+
if (task.getTestDataPublishers() != null) {
324+
for (TestDataPublisher tdp : task.getTestDataPublishers()) {
325+
TestResultAction.Data d = tdp.contributeTestData(build, workspace, launcher, listener, result);
326+
if (d != null) {
327+
action.addData(d);
328+
}
329+
}
330+
}
333331

334332
if (appending) {
335333
build.save();

0 commit comments

Comments
 (0)