Skip to content

Commit

Permalink
Merge pull request #675 from ably/fix-connection-id-test
Browse files Browse the repository at this point in the history
tests: Don't assert connection key equality
  • Loading branch information
lmars authored Dec 2, 2024
2 parents a81632d + 1159986 commit 70acf92
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions ably/realtime_conn_spec_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1947,9 +1947,8 @@ func TestRealtimeConn_RTN16(t *testing.T) {
assert.NoError(t, err)

{ // RTN16f, RTN16j, RTN16d
assert.True(t, sameConnection(client.Connection.Key(), c.Connection.Key()),
assert.Equal(t, prevConnId, client.Connection.ID(),
"expected the same connection")
assert.Equal(t, prevConnId, c.Connection.ID())
assert.Nil(t, client.Connection.ErrorReason())
assert.Equal(t, prevMsgSerial, client.Connection.MsgSerial(),
"expected %d got %d", prevMsgSerial, client.Connection.MsgSerial())
Expand Down Expand Up @@ -2006,10 +2005,6 @@ func TestRealtimeConn_RTN16(t *testing.T) {
}
}

func sameConnection(a, b string) bool {
return strings.Split(a, "-")[0] == strings.Split(b, "-")[0]
}

func TestRealtimeConn_RTN23(t *testing.T) {
connDetails := ably.ConnectionDetails{
ConnectionKey: "foo",
Expand Down

0 comments on commit 70acf92

Please sign in to comment.