Skip to content

Commit 3a9df0c

Browse files
committed
extend execution time in cancellation tests
1 parent c9acd48 commit 3a9df0c

File tree

2 files changed

+6
-7
lines changed
  • tests/GraphQL.Integration.Tests

2 files changed

+6
-7
lines changed

tests/GraphQL.Integration.Tests/QueryAndMutationTests/Base.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ query Long {
171171
// unblock the query
172172
chatQuery.LongRunningQueryBlocker.Set();
173173
// check execution time
174-
request.Invoking().ExecutionTime().Should().BeLessThan(500.Milliseconds());
174+
request.Invoking().ExecutionTime().Should().BeLessThan(1000.Milliseconds());
175175
request.Invoke().Result.Data.longRunning.Should().Be("finally returned");
176176

177177
// reset stuff
@@ -183,7 +183,7 @@ query Long {
183183
chatQuery.WaitingOnQueryBlocker.Wait(1000).Should().BeTrue("because the request should have reached the server by then");
184184
cts.Cancel();
185185
FluentActions.Awaiting(() => request.Invoking().Should().ThrowAsync<TaskCanceledException>("because the request was cancelled"))
186-
.ExecutionTime().Should().BeLessThan(500.Milliseconds());
186+
.ExecutionTime().Should().BeLessThan(1000.Milliseconds());
187187

188188
// let the server finish its query
189189
chatQuery.LongRunningQueryBlocker.Set();

tests/GraphQL.Integration.Tests/WebsocketTests/Base.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
using System.Collections.Concurrent;
33
using System.Diagnostics;
44
using System.Net.WebSockets;
5-
using System.Reactive.Linq;
65
using System.Threading;
76
using System.Threading.Tasks;
87
using FluentAssertions;
@@ -77,11 +76,11 @@ query Long {
7776
// start request
7877
request.Start();
7978
// wait until the query has reached the server
80-
chatQuery.WaitingOnQueryBlocker.Wait(500).Should().BeTrue("because the request should have reached the server by then");
79+
chatQuery.WaitingOnQueryBlocker.Wait(1000).Should().BeTrue("because the request should have reached the server by then");
8180
// unblock the query
8281
chatQuery.LongRunningQueryBlocker.Set();
8382
// check execution time
84-
request.Invoking().ExecutionTime().Should().BeLessThan(500.Milliseconds());
83+
request.Invoking().ExecutionTime().Should().BeLessThan(1000.Milliseconds());
8584
request.Invoke().Result.Data.longRunning.Should().Be("finally returned");
8685

8786
// reset stuff
@@ -90,10 +89,10 @@ query Long {
9089

9190
// cancellation test
9291
request.Start();
93-
chatQuery.WaitingOnQueryBlocker.Wait(500).Should().BeTrue("because the request should have reached the server by then");
92+
chatQuery.WaitingOnQueryBlocker.Wait(1000).Should().BeTrue("because the request should have reached the server by then");
9493
cts.Cancel();
9594
FluentActions.Awaiting(() => request.Invoking().Should().ThrowAsync<TaskCanceledException>("because the request was cancelled"))
96-
.ExecutionTime().Should().BeLessThan(500.Milliseconds());
95+
.ExecutionTime().Should().BeLessThan(1000.Milliseconds());
9796

9897
// let the server finish its query
9998
chatQuery.LongRunningQueryBlocker.Set();

0 commit comments

Comments
 (0)