From 0cce180d29f015a5f73a8862a9c0c1ea11dd769a Mon Sep 17 00:00:00 2001 From: marci4 Date: Tue, 31 Dec 2024 15:10:13 +0100 Subject: [PATCH] Log exception --- .../java_websocket/misc/OpeningHandshakeRejectionTest.java | 4 ++-- .../protocols/ProtocolHandshakeRejectionTest.java | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/test/java/org/java_websocket/misc/OpeningHandshakeRejectionTest.java b/src/test/java/org/java_websocket/misc/OpeningHandshakeRejectionTest.java index f154ec75..1a655fef 100644 --- a/src/test/java/org/java_websocket/misc/OpeningHandshakeRejectionTest.java +++ b/src/test/java/org/java_websocket/misc/OpeningHandshakeRejectionTest.java @@ -136,7 +136,7 @@ public void run() { } } } catch (Exception e) { - fail("There should be no exception"); + fail("There should be no exception", e); } } }); @@ -278,7 +278,7 @@ public void onError(Exception ex) { finalThread.join(); if (!threadReturned[0]) { - fail("Error"); + fail("Error. Thread did not yet return"); } } } diff --git a/src/test/java/org/java_websocket/protocols/ProtocolHandshakeRejectionTest.java b/src/test/java/org/java_websocket/protocols/ProtocolHandshakeRejectionTest.java index 31b180f5..de32897d 100644 --- a/src/test/java/org/java_websocket/protocols/ProtocolHandshakeRejectionTest.java +++ b/src/test/java/org/java_websocket/protocols/ProtocolHandshakeRejectionTest.java @@ -254,8 +254,7 @@ public void run() { } } } catch (Exception e) { - e.printStackTrace(); - fail("There should be no exception"); + fail("There should be no exception", e); } } });