From ce2856956990c5d2f6f26228ca9ef004afc15e47 Mon Sep 17 00:00:00 2001 From: crupest Date: Sat, 15 May 2021 22:43:25 +0800 Subject: test: Try to fix test failure due to delayed signalr message. --- BackEnd/Timeline.Tests/IntegratedTests/TimelineHubTest.cs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'BackEnd') diff --git a/BackEnd/Timeline.Tests/IntegratedTests/TimelineHubTest.cs b/BackEnd/Timeline.Tests/IntegratedTests/TimelineHubTest.cs index dc2ad614..05d4c28c 100644 --- a/BackEnd/Timeline.Tests/IntegratedTests/TimelineHubTest.cs +++ b/BackEnd/Timeline.Tests/IntegratedTests/TimelineHubTest.cs @@ -43,11 +43,13 @@ namespace Timeline.Tests.IntegratedTests using var client = await CreateClientAsUser(); await client.TestPostAsync($"timelines/{generator(1)}/posts", TimelinePostTest.CreateTextPostRequest("aaa")); + await Task.Delay(1); changed.Should().BeFalse(); await connection.InvokeAsync(nameof(TimelineHub.SubscribeTimelinePostChange), generator(1)); await client.TestPostAsync($"timelines/{generator(1)}/posts", TimelinePostTest.CreateTextPostRequest("bbb")); + await Task.Delay(1); changed.Should().BeTrue(); changed = false; @@ -55,6 +57,7 @@ namespace Timeline.Tests.IntegratedTests await connection.InvokeAsync(nameof(TimelineHub.UnsubscribeTimelinePostChange), generator(1)); await client.TestPostAsync($"timelines/{generator(1)}/posts", TimelinePostTest.CreateTextPostRequest("ccc")); + await Task.Delay(1); changed.Should().BeFalse(); } -- cgit v1.2.3