Merge branch '3.2.x' into 3.3.x

Closes gh-42266
This commit is contained in:
Andy Wilkinson
2024-09-11 15:15:17 +01:00

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -40,9 +40,10 @@ public class TestFailuresPlugin implements Plugin<Project> {
.getSharedServices()
.registerIfAbsent("testResultsOverview", TestResultsOverview.class, (spec) -> {
});
project.getTasks()
.withType(Test.class,
(test) -> test.addTestListener(new FailureRecordingTestListener(testResultsOverview, test)));
project.getTasks().withType(Test.class, (test) -> {
test.usesService(testResultsOverview);
test.addTestListener(new FailureRecordingTestListener(testResultsOverview, test));
});
}
private final class FailureRecordingTestListener implements TestListener {