Skip to content

Commit

Permalink
Refactored presence internal map test for checking internal members
Browse files Browse the repository at this point in the history
  • Loading branch information
sacOO7 committed Sep 8, 2023
1 parent ae75505 commit 46aa89b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/IO.Ably.Tests.Shared/Realtime/PresenceSandboxSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;

using IO.Ably.Realtime;
Expand Down Expand Up @@ -423,7 +422,7 @@ async Task WaitForNoPresenceOnChannel(IRestChannel rChannel)
[Theory]
[ProtocolData]
[Trait("spec", "RTP17f")]
public async Task OnResumedAttach_ShouldReEnterMembersFromInternalMap(Protocol protocol)
public async Task OnAttach_ShouldEnterMembersFromInternalMap(Protocol protocol)
{
var channelName = "RTP17c2".AddRandomSuffix();
var setupClient = await GetRealtimeClient(protocol);
Expand Down Expand Up @@ -536,20 +535,21 @@ public async Task Presence_ShouldHaveInternalMapForCurrentConnectionId(Protocol
channelB.State.Should().Be(ChannelState.Attaching);
await channelB.WaitForAttachedState();
channelB.State.Should().Be(ChannelState.Attached);

// ENTER
PresenceMessage msgA = null, msgB = null;
await WaitForMultiple(2, partialDone =>
{
channelA.Presence.Subscribe(msg =>
{
msgA = msg;
channelA.Presence.Unsubscribe();
partialDone();
});

channelB.Presence.Subscribe(msg =>
{
msgB = msg;
channelB.Presence.Unsubscribe();
partialDone();
});

Expand Down

0 comments on commit 46aa89b

Please sign in to comment.