diff --git a/Test/Flurl.Test/Http/TestingTests.cs b/Test/Flurl.Test/Http/TestingTests.cs index 2839c367..6221bdd6 100644 --- a/Test/Flurl.Test/Http/TestingTests.cs +++ b/Test/Flurl.Test/Http/TestingTests.cs @@ -284,8 +284,11 @@ public async Task doesnt_record_calls_made_with_HttpClient() { } } - [Test] // #366 (cannot repro) + [Test, Ignore("bug repro, not yet fixed")] // #366 & #398 public async Task can_use_response_queue_in_parallel() { + var cli = new FlurlClient("http://api.com"); + cli.Settings.BeforeCallAsync = call => Task.Delay(500); + for (var i = 0; i < 100; i++) { using (var test = new HttpTest()) { test @@ -301,19 +304,19 @@ public async Task can_use_response_queue_in_parallel() { .RespondWith("9"); var results = await Task.WhenAll( - "http://api.com".GetStringAsync(), - "http://api.com".GetStringAsync(), - "http://api.com".GetStringAsync(), - "http://api.com".GetStringAsync(), - "http://api.com".GetStringAsync(), - "http://api.com".GetStringAsync(), - "http://api.com".GetStringAsync(), - "http://api.com".GetStringAsync(), - "http://api.com".GetStringAsync(), - "http://api.com".GetStringAsync()); + cli.Request().GetStringAsync(), + cli.Request().GetStringAsync(), + cli.Request().GetStringAsync(), + cli.Request().GetStringAsync(), + cli.Request().GetStringAsync(), + cli.Request().GetStringAsync(), + cli.Request().GetStringAsync(), + cli.Request().GetStringAsync(), + cli.Request().GetStringAsync(), + cli.Request().GetStringAsync()); - CollectionAssert.IsEmpty(test.ResponseQueue); CollectionAssert.AllItemsAreUnique(results); + CollectionAssert.IsEmpty(test.ResponseQueue); } } }