diff options
author | crupest <crupest@outlook.com> | 2021-05-15 22:43:25 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-05-15 22:43:25 +0800 |
commit | ce2856956990c5d2f6f26228ca9ef004afc15e47 (patch) | |
tree | d71c41ad62b32e40b74bbcff7c5b0b9448b37b2d /BackEnd/Timeline.Tests/IntegratedTests/TimelineHubTest.cs | |
parent | d832591db5ddc594a97cc8a75739e0868094e3ec (diff) | |
download | timeline-ce2856956990c5d2f6f26228ca9ef004afc15e47.tar.gz timeline-ce2856956990c5d2f6f26228ca9ef004afc15e47.tar.bz2 timeline-ce2856956990c5d2f6f26228ca9ef004afc15e47.zip |
test: Try to fix test failure due to delayed signalr message.
Diffstat (limited to 'BackEnd/Timeline.Tests/IntegratedTests/TimelineHubTest.cs')
-rw-r--r-- | BackEnd/Timeline.Tests/IntegratedTests/TimelineHubTest.cs | 3 |
1 files changed, 3 insertions, 0 deletions
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();
}
|