From 69072a5a254383f37545b4babfdeef76ecf986aa Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 6 Sep 2024 23:10:40 +0200 Subject: [PATCH] =?utf8?q?=E2=9C=85=20Make=20tests=20more=20realistic=20by?= =?utf8?q?=20running=20listeners=20in=20a=20different=20thread?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/test/java/net/pterodactylus/fcp/highlevel/FcpClientTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/net/pterodactylus/fcp/highlevel/FcpClientTest.java b/src/test/java/net/pterodactylus/fcp/highlevel/FcpClientTest.java index e86bb85..92a0e4b 100644 --- a/src/test/java/net/pterodactylus/fcp/highlevel/FcpClientTest.java +++ b/src/test/java/net/pterodactylus/fcp/highlevel/FcpClientTest.java @@ -528,7 +528,7 @@ public class FcpClientTest { @Override public void sendMessage(FcpMessage fcpMessage) { BiConsumer listenerNotifier = messageConsumer.apply(fcpMessage); - listeners.forEach(listener -> listenerNotifier.accept(listener, this)); + new Thread(() -> listeners.forEach(listener -> listenerNotifier.accept(listener, this))).start(); } }; } -- 2.7.4