Skip to content

Commit

Permalink
Updated test for RTN16k, added channelserial assertions for conn. rec…
Browse files Browse the repository at this point in the history
…overy
  • Loading branch information
sacOO7 committed Sep 18, 2023
1 parent 4857065 commit d0c20f8
Showing 1 changed file with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
using System;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using FluentAssertions;
using IO.Ably.Realtime;
using IO.Ably.Shared.Realtime;
using IO.Ably.Tests.Infrastructure;
using IO.Ably.Types;
using Xunit;
using Xunit.Abstractions;
Expand Down Expand Up @@ -69,6 +70,7 @@ public async Task DeprecatedRecoveryKeyProperty_ShouldBehaveSameAsCreateRecovery
[Trait("spec", "RTN16i")]
[Trait("spec", "RTN16f")]
[Trait("spec", "RTN16j")]
[Trait("spec", "RTN16k")]
public async Task RecoveryKey_MsgSerialShouldNotBeSentToAblyButShouldBeSetOnConnection()
{
var recoveryKey =
Expand All @@ -82,8 +84,16 @@ public async Task RecoveryKey_MsgSerialShouldNotBeSentToAblyButShouldBeSetOnConn
paramsDict.ContainsKey("recover").Should().BeTrue();
paramsDict["recover"].Should().Be("uniqueKey");
paramsDict.ContainsKey("msg_serial").Should().BeFalse();
await Task.Delay(2000);
client.Connection.MessageSerial.Should().Be(45);

await new ConditionalAwaiter(() => client.Connection.MessageSerial == 45);
client.Channels.Count().Should().Be(3);
var channelCounter = 1;
foreach (var realtimeChannel in client.Channels.OrderBy(channel => channel.Name))
{
realtimeChannel.Name.Should().Be($"channel{channelCounter}");
realtimeChannel.Properties.ChannelSerial.Should().Be($"{channelCounter}");
channelCounter++;
}
}

public ConnectionRecoverySpecs(ITestOutputHelper output)
Expand Down

0 comments on commit d0c20f8

Please sign in to comment.