diff --git a/src/HotChocolate/Core/test/Execution.Tests/Integration/DataLoader/DataLoaderTests.cs b/src/HotChocolate/Core/test/Execution.Tests/Integration/DataLoader/DataLoaderTests.cs index 59e9574b8e2..100e897a959 100644 --- a/src/HotChocolate/Core/test/Execution.Tests/Integration/DataLoader/DataLoaderTests.cs +++ b/src/HotChocolate/Core/test/Execution.Tests/Integration/DataLoader/DataLoaderTests.cs @@ -376,7 +376,6 @@ await executor.ExecuteAsync( public async Task NestedDataLoader() { var snapshot = new Snapshot(); - using var cts = new CancellationTokenSource(2000); snapshot.Add( await new ServiceCollection() @@ -385,9 +384,11 @@ public async Task NestedDataLoader() .AddType() .AddDataLoader() .AddDataLoader() - .ExecuteRequestAsync("query Foo { foo { id field } }", cancellationToken: cts.Token)); + .ExecuteRequestAsync( + "query Foo { foo { id field } }", + cancellationToken: TestContext.Current.CancellationToken)); - await snapshot.MatchMarkdownAsync(cts.Token); + await snapshot.MatchMarkdownAsync(TestContext.Current.CancellationToken); } [Fact]