Fix MinecraftToDiscordChatMessageTest clearing TestHelper too early

This commit is contained in:
Vankka 2023-10-15 23:24:54 +03:00
parent 28dbbb8466
commit e0ec1aa31c
No known key found for this signature in database
GPG Key ID: 6E50CB7A29B96AD0

View File

@ -85,17 +85,17 @@ public class MinecraftToDiscordChatMessageTest {
new GlobalChannel(MockDiscordSRV.INSTANCE),
false
));
try {
future.get(40, TimeUnit.SECONDS);
} catch (ExecutionException e) {
Assertions.fail(e.getCause());
} catch (TimeoutException e) {
Assertions.fail("Failed to round trip message in 40 seconds", e);
}
} finally {
TestHelper.set(null);
}
try {
future.get(40, TimeUnit.SECONDS);
} catch (ExecutionException e) {
Assertions.fail(e.getCause());
} catch (TimeoutException e) {
Assertions.fail("Failed to round trip message in 40 seconds", e);
}
}
public static class Listener {