Skip to content

Commit

Permalink
Merge pull request #1291 from ably/delete-recover-test
Browse files Browse the repository at this point in the history
Delete unnecessary recover error test
  • Loading branch information
lmars authored Aug 20, 2024
2 parents 092240b + 3c10353 commit ad86379
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions src/IO.Ably.Tests.Shared/Realtime/ConnectionSandBoxSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1119,37 +1119,6 @@ public async Task WithDummyRecoverData_ShouldConnectAndSetAReasonOnTheConnection
client.Connection.ErrorReason.Code.Should().Be(ErrorCodes.InvalidFormatForConnectionId);
}

[Theory]
[ProtocolData]
[Trait("spec", "RTN16l")]
[Trait("spec", "RTN15c4")]
public async Task WithInvalidRecoverData_ShouldFailAndSetAReasonOnTheConnection(Protocol protocol)
{
var client = await GetRealtimeClient(protocol, (opts, _) =>
{
opts.Recover = "{\"connectionKey\":\"random_key\",\"msgSerial\":5,\"channelSerials\":{\"channel1\":\"98\",\"channel2\":\"32\",\"channel3\":\"09\"}}";
opts.AutoConnect = false;
});

ErrorInfo err = null;
client.Connection.On((args) =>
{
err = args.Reason;
if (args.Current == ConnectionState.Failed)
{
ResetEvent.Set();
}
});
client.Connect();

var result = ResetEvent.WaitOne(10000);
result.Should().BeTrue("Timeout");
err.Should().NotBeNull();
err.Code.Should().Be(ErrorCodes.InvalidFormatForConnectionId);
client.Connection.ErrorReason.Code.Should().Be(ErrorCodes.InvalidFormatForConnectionId);
client.Connection.State.Should().Be(ConnectionState.Failed);
}

[Theory]
[ProtocolData]
[Trait("issue", "65")]
Expand Down

0 comments on commit ad86379

Please sign in to comment.