From 9a6a7f486f070d30cb0c8ee1d73a97339703b423 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Tue, 30 Jan 2024 00:17:06 +0530 Subject: [PATCH] Refactored realtime delta decoder helpers --- lib/src/test/java/io/ably/lib/test/common/Helpers.java | 4 ++-- .../io/ably/lib/test/realtime/RealtimeDeltaDecoderTest.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/src/test/java/io/ably/lib/test/common/Helpers.java b/lib/src/test/java/io/ably/lib/test/common/Helpers.java index 8a9a7e38b..61db9db86 100644 --- a/lib/src/test/java/io/ably/lib/test/common/Helpers.java +++ b/lib/src/test/java/io/ably/lib/test/common/Helpers.java @@ -263,7 +263,7 @@ public MessageWaiter(Channel channel, String event) { */ public synchronized void waitFor(int count) { while(receivedMessages.size() < count) - try { wait(); } catch(InterruptedException e) {} + try { wait(); } catch(InterruptedException ignored) {} } /** @@ -274,7 +274,7 @@ public synchronized void waitFor(int count, long time) { long targetTime = System.currentTimeMillis() + time; long remaining = time; while(receivedMessages.size() < count && remaining > 0) { - try { wait(remaining); } catch(InterruptedException e) {} + try { wait(remaining); } catch(InterruptedException ignored) {} remaining = targetTime - System.currentTimeMillis(); } } diff --git a/lib/src/test/java/io/ably/lib/test/realtime/RealtimeDeltaDecoderTest.java b/lib/src/test/java/io/ably/lib/test/realtime/RealtimeDeltaDecoderTest.java index d0fe03531..78d2ea026 100644 --- a/lib/src/test/java/io/ably/lib/test/realtime/RealtimeDeltaDecoderTest.java +++ b/lib/src/test/java/io/ably/lib/test/realtime/RealtimeDeltaDecoderTest.java @@ -62,7 +62,7 @@ public void simple_delta_codec() { Message message = messageWaiter.receivedMessages.get(i); int messageIndex = Integer.parseInt(message.name); assertEquals("Verify message order", i, messageIndex); - assertEquals("Verify message data", true, testData[messageIndex].equals(message.data)); + assertEquals("Verify message data", testData[messageIndex], message.data); } } catch(Exception e) { fail(testName + ": Unexpected exception " + e.getMessage());