From 0825bd5d85e70ad569ad22f8de5bff511aa0ffdc Mon Sep 17 00:00:00 2001 From: TheMode Date: Wed, 15 Dec 2021 17:51:45 +0100 Subject: [PATCH] Fail on exception Signed-off-by: TheMode --- src/test/java/network/PacketWriteReadTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/java/network/PacketWriteReadTest.java b/src/test/java/network/PacketWriteReadTest.java index fe174c91d..d0b744724 100644 --- a/src/test/java/network/PacketWriteReadTest.java +++ b/src/test/java/network/PacketWriteReadTest.java @@ -24,6 +24,7 @@ import java.util.UUID; import java.util.concurrent.ThreadLocalRandom; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.fail; /** * Ensures that packet can be written and read correctly. @@ -69,7 +70,7 @@ public class PacketWriteReadTest { var createdPacket = readerConstructor.newInstance(reader); assertEquals(writeable, createdPacket); } catch (Exception e) { - e.printStackTrace(); + fail(writeable.toString(), e); } }