Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkCiliaVincenti committed Oct 13, 2024
1 parent 04a0ab8 commit e8b4f89
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions OpenWeatherMap.Cache.Tests/Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public async Task TestConcurrency()
for (int i = 1; i <= tries; i++)
{
tasks = Enumerable.Range(0, concurrency)
.Select(async (i) =>
.Select(i =>
{
var location = new Models.Location(48.6371, -122.1237);
var readings = openWeatherMapCache.GetReadings(location);
Expand All @@ -55,7 +55,7 @@ public async Task TestConcurrency()
{
Interlocked.Increment(ref totalFromAPI);
}
await Task.Delay(0);
return Task.CompletedTask;
}).ToList().AsParallel();
await Task.WhenAll(tasks);

Expand Down Expand Up @@ -103,7 +103,6 @@ public async Task TestConcurrencyAsync()
{
Interlocked.Increment(ref totalFromAPI);
}
await Task.Delay(0);
}).ToList().AsParallel();
await Task.WhenAll(tasks);

Expand Down

0 comments on commit e8b4f89

Please sign in to comment.