diff --git a/ably/realtime_conn_spec_integration_test.go b/ably/realtime_conn_spec_integration_test.go index eb4be2fa..40a0f65a 100644 --- a/ably/realtime_conn_spec_integration_test.go +++ b/ably/realtime_conn_spec_integration_test.go @@ -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, c.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()) @@ -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",