Skip to content

Commit

Permalink
Fix connect tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pglombardo committed May 16, 2024
1 parent 64e57aa commit 365db2a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Tests/HiveMQtt.Test/HiveMQClient/ConnectTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public async Task TestConnectEventsAsync()

// Wait for event handlers to finish
await taskCompletionSource.Task.WaitAsync(TimeSpan.FromSeconds(5)).ConfigureAwait(false);
await Task.Delay(1000).ConfigureAwait(false);

// Assert that all Events were called
Assert.True(client.LocalStore.ContainsKey("BeforeConnectHandlerCalled"));
Expand Down Expand Up @@ -107,6 +108,7 @@ public async Task Test_AfterDisconnectEvent_Async()

// Wait for event handlers to finish
await taskCompletionSource.Task.WaitAsync(TimeSpan.FromSeconds(5)).ConfigureAwait(false);
await Task.Delay(1000).ConfigureAwait(false);

// Assert that all Events were called
Assert.True(client.LocalStore.ContainsKey("AfterDisconnectHandlerCalled"));
Expand Down

0 comments on commit 365db2a

Please sign in to comment.