Skip to content

Commit

Permalink
tests: Assert connection error code rather than message
Browse files Browse the repository at this point in the history
The error messages are subject to change, but the codes are not, so
assert the code instead.

Signed-off-by: Lewis Marshall <[email protected]>
  • Loading branch information
lmars committed Jul 16, 2024
1 parent 7d3e2ba commit 03b0c9c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1669,7 +1669,7 @@ public void channel_invalid_resume_reattach_channels() throws AblyException {

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

Expand Down

0 comments on commit 03b0c9c

Please sign in to comment.