Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make timeouts used in TestKit(Base) class configurable #7259

Open
b8rni opened this issue Jun 19, 2024 · 1 comment
Open

Make timeouts used in TestKit(Base) class configurable #7259

b8rni opened this issue Jun 19, 2024 · 1 comment
Labels
akka-testkit Akka.NET Testkit issues perf
Milestone

Comments

@b8rni
Copy link

b8rni commented Jun 19, 2024

Unit tests often fail with timeout errors because of parallel execution of independent unit tests regarding the TestKit class. If the system is under heavy load, then it seems that the timeouts are to close...

To reproduce the problem you can try to start a cpu stress test and execute the "Failing_Test" until an Exception will be thrown. Usually it takes less than 10 repetitions until an error will occur (on my dev system):

[Fact]
public async Task Failing_Test() {
var tasks = Enumerable.Range(0, 100).Select(_ => Task.Run(() => new TestKit()));

var actors = await Task.WhenAll(tasks);
foreach (var actor in actors) {
actor.Dispose();
}
}

Possible errors:

  1. image
  2. image

It would be nice if it would be possible to configure the following timeouts:

  1. image
  2. image
@Aaronontheweb
Copy link
Member

A bunch of these default timeouts are configurable in the testkit, but yes those two are not. We run into these same issues inside the Akka.NET test suite itself and I'm always interested in whatever we can do to fix them.

@Aaronontheweb Aaronontheweb added akka-testkit Akka.NET Testkit issues perf labels Jun 20, 2024
@Aaronontheweb Aaronontheweb modified the milestones: 1.5.25, 1.5.26, 1.5.27 Jun 20, 2024
@Aaronontheweb Aaronontheweb modified the milestones: 1.5.27, 1.5.28 Jul 25, 2024
@Aaronontheweb Aaronontheweb modified the milestones: 1.5.28, 1.5.29 Sep 4, 2024
@Aaronontheweb Aaronontheweb modified the milestones: 1.5.29, 1.5.30, 1.5.31 Oct 1, 2024
@Aaronontheweb Aaronontheweb modified the milestones: 1.5.31, 1.5.32 Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
akka-testkit Akka.NET Testkit issues perf
Projects
None yet
Development

No branches or pull requests

2 participants