Skip to content

Commit 2e1a137

Browse files
authored
[65-74] SubscriberSinkSpec (#6613)
* [65-74] `SubscriberSinkSpec` * Changes to `async/await`
1 parent 725f44b commit 2e1a137

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/core/Akka.Streams.Tests/Dsl/SubscriberSinkSpec.cs

+8-8
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//-----------------------------------------------------------------------
77

88
using System.Linq;
9+
using System.Threading.Tasks;
910
using Akka.Streams.Dsl;
1011
using Akka.Streams.TestKit;
1112
using Akka.TestKit;
@@ -25,19 +26,18 @@ public SubscriberSinkSpec(ITestOutputHelper helper = null) : base(helper)
2526
}
2627

2728
[Fact]
28-
public void A_Flow_with_SubscriberSink_must_publish_elements_to_the_subscriber()
29+
public async Task A_Flow_with_SubscriberSink_must_publish_elements_to_the_subscriber()
2930
{
30-
this.AssertAllStagesStopped(() =>
31-
{
31+
await this.AssertAllStagesStoppedAsync(async() => {
3232
var c = this.CreateManualSubscriberProbe<int>();
3333
Source.From(Enumerable.Range(1, 3)).To(Sink.FromSubscriber(c)).Run(Materializer);
3434

35-
var s = c.ExpectSubscription();
35+
var s = await c.ExpectSubscriptionAsync();
3636
s.Request(3);
37-
c.ExpectNext(1);
38-
c.ExpectNext(2);
39-
c.ExpectNext(3);
40-
c.ExpectComplete();
37+
await c.ExpectNextAsync(1);
38+
await c.ExpectNextAsync(2);
39+
await c.ExpectNextAsync(3);
40+
await c.ExpectCompleteAsync();
4141
}, Materializer);
4242
}
4343
}

0 commit comments

Comments
 (0)