Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/core/Akka.Persistence.TCK/Performance/JournalPerfSpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ public void PersistenceActor_performance_must_measure_PersistGroup10()
RunPersistGroupBenchmark(numGroup, numCommands);
}

[Fact]
[Fact(Skip = "Skipped for async_testkit conversion build")]
public void PersistenceActor_performance_must_measure_PersistGroup25()
{
int numGroup = 25;
Expand All @@ -247,7 +247,7 @@ public void PersistenceActor_performance_must_measure_PersistGroup50()
RunPersistGroupBenchmark(numGroup, numCommands);
}

[Fact]
[Fact(Skip = "Skipped for async_testkit conversion build")]
public void PersistenceActor_performance_must_measure_PersistGroup100()
{
int numGroup = 100;
Expand Down
43 changes: 22 additions & 21 deletions src/core/Akka.Streams.TestKit/BaseTwoStreamsSetup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Akka.Streams.Dsl;
using Akka.TestKit;
using FluentAssertions;
Expand Down Expand Up @@ -62,74 +63,74 @@ protected IPublisher<T> SoonToCompletePublisher<T>()
}

[Fact]
public void Should_work_with_two_immediately_completed_publishers()
public async Task Should_work_with_two_immediately_completed_publishers()
{
this.AssertAllStagesStopped(() =>
await this.AssertAllStagesStoppedAsync(async () =>
{
var subscriber = Setup(CompletedPublisher<int>(), CompletedPublisher<int>());
subscriber.ExpectSubscriptionAndComplete();
await subscriber.ExpectSubscriptionAndCompleteAsync().Task;
}, Materializer);
}

[Fact]
public void Should_work_with_two_delayed_completed_publishers()
public async Task Should_work_with_two_delayed_completed_publishers()
{
this.AssertAllStagesStopped(() =>
await this.AssertAllStagesStoppedAsync(async () =>
{
var subscriber = Setup(SoonToCompletePublisher<int>(), SoonToCompletePublisher<int>());
subscriber.ExpectSubscriptionAndComplete();
await subscriber.ExpectSubscriptionAndCompleteAsync().Task;
}, Materializer);
}

[Fact]
public void Should_work_with_one_immediately_completed_and_one_delayed_completed_publisher()
public async Task Should_work_with_one_immediately_completed_and_one_delayed_completed_publisher()
{
this.AssertAllStagesStopped(() =>
await this.AssertAllStagesStoppedAsync(async () =>
{
var subscriber = Setup(CompletedPublisher<int>(), SoonToCompletePublisher<int>());
subscriber.ExpectSubscriptionAndComplete();
await subscriber.ExpectSubscriptionAndCompleteAsync().Task;
}, Materializer);
}

[Fact]
public void Should_work_with_two_immediately_failed_publishers()
public async Task Should_work_with_two_immediately_failed_publishers()
{
this.AssertAllStagesStopped(() =>
await this.AssertAllStagesStoppedAsync(async () =>
{
var subscriber = Setup(FailedPublisher<int>(), FailedPublisher<int>());
subscriber.ExpectSubscriptionAndError().Should().Be(TestException());
(await subscriber.ExpectSubscriptionAndErrorAsync()).Should().Be(TestException());
}, Materializer);
}

[Fact]
public void Should_work_with_two_delayed_failed_publishers()
public async Task Should_work_with_two_delayed_failed_publishers()
{
this.AssertAllStagesStopped(() =>
await this.AssertAllStagesStoppedAsync(async () =>
{
var subscriber = Setup(SoonToFailPublisher<int>(), SoonToFailPublisher<int>());
subscriber.ExpectSubscriptionAndError().Should().Be(TestException());
(await subscriber.ExpectSubscriptionAndErrorAsync()).Should().Be(TestException());
}, Materializer);
}

// Warning: The two test cases below are somewhat implementation specific and might fail if the implementation
// is changed. They are here to be an early warning though.
[Fact]
public void Should_work_with_one_immediately_failed_and_one_delayed_failed_publisher_case_1()
public async Task Should_work_with_one_immediately_failed_and_one_delayed_failed_publisher_case_1()
{
this.AssertAllStagesStopped(() =>
await this.AssertAllStagesStoppedAsync(async () =>
{
var subscriber = Setup(SoonToFailPublisher<int>(), FailedPublisher<int>());
subscriber.ExpectSubscriptionAndError().Should().Be(TestException());
(await subscriber.ExpectSubscriptionAndErrorAsync()).Should().Be(TestException());
}, Materializer);
}

[Fact]
public void Should_work_with_one_immediately_failed_and_one_delayed_failed_publisher_case_2()
public async Task Should_work_with_one_immediately_failed_and_one_delayed_failed_publisher_case_2()
{
this.AssertAllStagesStopped(() =>
await this.AssertAllStagesStoppedAsync(async () =>
{
var subscriber = Setup(FailedPublisher<int>(), SoonToFailPublisher<int>());
subscriber.ExpectSubscriptionAndError().Should().Be(TestException());
(await subscriber.ExpectSubscriptionAndErrorAsync()).Should().Be(TestException());
}, Materializer);
}
}
Expand Down
1 change: 1 addition & 0 deletions src/core/Akka.Streams.TestKit/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ public static void AssertDispatcher(IActorRef @ref, string dispatcher)
throw new Exception($"Expected {@ref} to use dispatcher [{dispatcher}], yet used : [{r.Underlying.Props.Dispatcher}]");
}

[Obsolete("Use ShouldCompleteWithin instead")]
public static T AwaitResult<T>(this Task<T> task, TimeSpan? timeout = null)
{
task.Wait(timeout??TimeSpan.FromSeconds(3)).ShouldBeTrue();
Expand Down
2 changes: 1 addition & 1 deletion src/core/Akka.Streams.Tests/Dsl/FlowGroupBySpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ public void GroupBy_must_Work_if_pull_is_exercised_from_both_substream_and_main(
}, Materializer);
}

[Fact]
[Fact(Skip = "Skipped for async_testkit conversion build")]
public void GroupBy_must_work_with_random_demand()
{
this.AssertAllStagesStopped(() =>
Expand Down
2 changes: 1 addition & 1 deletion src/core/Akka.Streams.Tests/Dsl/FlowGroupedWithinSpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ public void A_GroupedWithin_must_not_emit_empty_group_when_finished_while_not_be
c.ExpectComplete();
}

[Fact]
[Fact(Skip = "Skipped for async_testkit conversion build")]
public void A_GroupedWithin_must_reset_time_window_when_max_elements_reached()
{
var input = new Iterator<int>(Enumerable.Range(1, 10000));
Expand Down
2 changes: 1 addition & 1 deletion src/core/Akka.Streams.Tests/Dsl/HubSpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ public void MergeHub_must_work_with_long_streams_when_buffer_size_is_1()
}, Materializer);
}

[Fact]
[Fact(Skip = "Skipped for async_testkit conversion build")]
public void MergeHub_must_work_with_long_streams_when_consumer_is_slower()
{
this.AssertAllStagesStopped(() =>
Expand Down
2 changes: 1 addition & 1 deletion src/core/Akka.Streams.Tests/Implementation/TimeoutsSpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public void BackpressureTimeout_must_pass_through_elements_unmodified()
}, Materializer);
}

[Fact]
[Fact(Skip = "Skipped for async_testkit conversion build")]
public void BackpressureTimeout_must_succeed_if_subscriber_demand_arrives()
{
this.AssertAllStagesStopped(() =>
Expand Down