diff --git a/src/core/Akka.Streams.Tests/Dsl/SubscriberSinkSpec.cs b/src/core/Akka.Streams.Tests/Dsl/SubscriberSinkSpec.cs index ce5e5b158ef..06c975a51e7 100644 --- a/src/core/Akka.Streams.Tests/Dsl/SubscriberSinkSpec.cs +++ b/src/core/Akka.Streams.Tests/Dsl/SubscriberSinkSpec.cs @@ -6,6 +6,7 @@ //----------------------------------------------------------------------- using System.Linq; +using System.Threading.Tasks; using Akka.Streams.Dsl; using Akka.Streams.TestKit; using Akka.TestKit; @@ -25,19 +26,18 @@ public SubscriberSinkSpec(ITestOutputHelper helper = null) : base(helper) } [Fact] - public void A_Flow_with_SubscriberSink_must_publish_elements_to_the_subscriber() + public async Task A_Flow_with_SubscriberSink_must_publish_elements_to_the_subscriber() { - this.AssertAllStagesStopped(() => - { + await this.AssertAllStagesStoppedAsync(async() => { var c = this.CreateManualSubscriberProbe(); Source.From(Enumerable.Range(1, 3)).To(Sink.FromSubscriber(c)).Run(Materializer); - var s = c.ExpectSubscription(); + var s = await c.ExpectSubscriptionAsync(); s.Request(3); - c.ExpectNext(1); - c.ExpectNext(2); - c.ExpectNext(3); - c.ExpectComplete(); + await c.ExpectNextAsync(1); + await c.ExpectNextAsync(2); + await c.ExpectNextAsync(3); + await c.ExpectCompleteAsync(); }, Materializer); } }