Skip to content

Commit 0db7c10

Browse files
committed
tests: Assert connection error code rather than message
The error messages are subject to change, but the codes are not, so assert the code instead. Signed-off-by: Lewis Marshall <[email protected]>
1 parent 2ac824d commit 0db7c10

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/src/test/java/io/ably/lib/test/realtime/RealtimeChannelTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1669,7 +1669,7 @@ public void channel_invalid_resume_reattach_channels() throws AblyException {
16691669

16701670
ErrorInfo resumeError = connectionWaiter.waitFor(ConnectionState.connected);
16711671
assertNotNull(resumeError);
1672-
assertTrue(resumeError.message.contains("Invalid connection key"));
1672+
assertEquals("Verify error code indicates invalid connection key", resumeError.code, 80018);
16731673
assertSame(resumeError, ably.connection.connectionManager.getStateErrorInfo());
16741674
assertNotEquals("A new connection was created", originalConnectionId, ably.connection.id);
16751675

0 commit comments

Comments
 (0)