Skip to content

Commit

Permalink
[64-74] SourceSpec (#6612)
Browse files Browse the repository at this point in the history
  • Loading branch information
eaba authored Mar 27, 2023
1 parent fab1288 commit 5e2b211
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/core/Akka.Streams.Tests/Dsl/SourceSpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ public void Failed_Source_must_emit_error_immediately()
}

[Fact]
public void Maybe_Source_must_complete_materialized_future_with_None_when_stream_cancels()
public async Task Maybe_Source_must_complete_materialized_future_with_None_when_stream_cancels()
{
this.AssertAllStagesStopped(async() =>
await this.AssertAllStagesStoppedAsync(async() =>
{
var neverSource = Source.Maybe<object>();
var pubSink = Sink.AsPublisher<object>(false);
Expand All @@ -117,9 +117,9 @@ public void Maybe_Source_must_complete_materialized_future_with_None_when_stream
}

[Fact]
public void Maybe_Source_must_allow_external_triggering_of_empty_completion()
public async Task Maybe_Source_must_allow_external_triggering_of_empty_completion()
{
this.AssertAllStagesStopped(async() =>
await this.AssertAllStagesStoppedAsync(async() =>
{
var neverSource = Source.Maybe<int>().Where(_ => false);
var counterSink = Sink.Aggregate<int, int>(0, (acc, _) => acc + 1);
Expand All @@ -137,9 +137,9 @@ public void Maybe_Source_must_allow_external_triggering_of_empty_completion()
}

[Fact]
public void Maybe_Source_must_allow_external_triggering_of_non_empty_completion()
public async Task Maybe_Source_must_allow_external_triggering_of_non_empty_completion()
{
this.AssertAllStagesStopped(async() =>
await this.AssertAllStagesStoppedAsync(async() =>
{
var neverSource = Source.Maybe<int>();
var counterSink = Sink.First<int>();
Expand All @@ -156,10 +156,9 @@ public void Maybe_Source_must_allow_external_triggering_of_non_empty_completion(
}

[Fact]
public void Maybe_Source_must_allow_external_triggering_of_OnError()
public async Task Maybe_Source_must_allow_external_triggering_of_OnError()
{
this.AssertAllStagesStopped(() =>
{
await this.AssertAllStagesStoppedAsync(() => {
var neverSource = Source.Maybe<int>();
var counterSink = Sink.First<int>();

Expand All @@ -172,6 +171,7 @@ public void Maybe_Source_must_allow_external_triggering_of_OnError()

counterFuture.Invoking(f => f.Wait(TimeSpan.FromSeconds(3))).Should().Throw<Exception>()
.WithMessage("Boom");
return Task.CompletedTask;
}, Materializer);
}

Expand Down

0 comments on commit 5e2b211

Please sign in to comment.