From 68b7eb26f3089b973ebfcd92913b4d93e94e673b Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Wed, 8 May 2019 15:19:48 +0200 Subject: [PATCH] Fix PacketWriterTest: Expect also InterruptedException which is thrown in case the queue was shut down. --- .../java/org/jivesoftware/smack/tcp/PacketWriterTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/smack-tcp/src/test/java/org/jivesoftware/smack/tcp/PacketWriterTest.java b/smack-tcp/src/test/java/org/jivesoftware/smack/tcp/PacketWriterTest.java index 6404fce68..cb84f16e8 100644 --- a/smack-tcp/src/test/java/org/jivesoftware/smack/tcp/PacketWriterTest.java +++ b/smack-tcp/src/test/java/org/jivesoftware/smack/tcp/PacketWriterTest.java @@ -99,11 +99,11 @@ public class PacketWriterTest { prematureUnblocked = true; } } - catch (SmackException.NotConnectedException e) { + catch (InterruptedException | SmackException.NotConnectedException e) { // This is the exception we expect. expectedThreadExceptionReference.set(e); } - catch (BrokenBarrierException | InterruptedException e) { + catch (BrokenBarrierException e) { unexpectedThreadExceptionReference.set(e); }