Skip to content

Commit fa3caca

Browse files
author
Christoph Läubrich
committed
No need for latch anymore
1 parent 2a8febe commit fa3caca

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

platform-tests/src/test/java/org/junit/platform/reporting/open/xml/OpenTestReportGeneratingListenerTests.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
import java.nio.file.Files;
3838
import java.nio.file.Path;
3939
import java.util.Map;
40-
import java.util.concurrent.CountDownLatch;
4140
import java.util.concurrent.TimeUnit;
4241
import java.util.concurrent.atomic.AtomicReference;
4342

@@ -329,7 +328,6 @@ void writesXmlReportToSocket(@TempDir Path tempDirectory) throws Exception {
329328

330329
// Start a server socket to receive the XML
331330
var builder = new StringBuilder();
332-
var latch = new CountDownLatch(1);
333331

334332
try (var serverSocket = new ServerSocket(0, 50, InetAddress.getLoopbackAddress())) { // Use any available port
335333
int port = serverSocket.getLocalPort();
@@ -347,9 +345,6 @@ void writesXmlReportToSocket(@TempDir Path tempDirectory) throws Exception {
347345
catch (Exception e) {
348346
fail(e);
349347
}
350-
finally {
351-
latch.countDown();
352-
}
353348
});
354349
serverThread.setDaemon(true);
355350
serverThread.start();

0 commit comments

Comments
 (0)