From 146929fe5481b43abe41779330ae8f6f215fad85 Mon Sep 17 00:00:00 2001 From: Ebere Abanonu Date: Thu, 6 Apr 2023 16:49:19 +0100 Subject: [PATCH] [38-74] `FlowWhereSpec` (#6585) * [38-74] `FlowWhereSpec` * Changes to `async` TestKit --- .../Akka.Streams.Tests/Dsl/FlowWhereSpec.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/core/Akka.Streams.Tests/Dsl/FlowWhereSpec.cs b/src/core/Akka.Streams.Tests/Dsl/FlowWhereSpec.cs index 33a151a0c5f..c71ab6d920c 100644 --- a/src/core/Akka.Streams.Tests/Dsl/FlowWhereSpec.cs +++ b/src/core/Akka.Streams.Tests/Dsl/FlowWhereSpec.cs @@ -9,6 +9,7 @@ using System.Collections.Generic; using System.Linq; using System.Threading; +using System.Threading.Tasks; using Akka.Streams.Dsl; using Akka.Streams.Supervision; using Akka.Streams.TestKit; @@ -46,7 +47,7 @@ public void A_Where_must_filter() } [Fact] - public void A_Where_must_not_blow_up_with_high_request_counts() + public async Task A_Where_must_not_blow_up_with_high_request_counts() { var settings = ActorMaterializerSettings.Create(Sys).WithInputBuffer(1, 1); var materializer = ActorMaterializer.Create(Sys, settings); @@ -60,18 +61,17 @@ public void A_Where_must_not_blow_up_with_high_request_counts() for (var i = 1; i <= 1000; i++) subscription.Request(int.MaxValue); - probe.ExpectNext(1); - probe.ExpectComplete(); + await probe.ExpectNextAsync(1); + await probe.ExpectCompleteAsync(); } [Fact] - public void A_Where_must_continue_if_error() + public async Task A_Where_must_continue_if_error() { - this.AssertAllStagesStopped(() => - { + await this.AssertAllStagesStoppedAsync(async() => { var ex = new TestException("Test"); - Source.From(Enumerable.Range(1, 3)) + await Source.From(Enumerable.Range(1, 3)) .Where(x => { if (x == 2) @@ -81,8 +81,8 @@ public void A_Where_must_continue_if_error() .WithAttributes(ActorAttributes.CreateSupervisionStrategy(Deciders.ResumingDecider)) .RunWith(this.SinkProbe(), Materializer) .Request(3) - .ExpectNext( 1, 3) - .ExpectComplete(); + .ExpectNext(1, 3) + .ExpectCompleteAsync(); }, Materializer); }