akka.net icon indicating copy to clipboard operation
akka.net copied to clipboard

Make timeouts used in TestKit(Base) class configurable

Open b8rni opened this issue 1 year ago • 1 comments
trafficstars

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

b8rni avatar Jun 19 '24 08:06 b8rni

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 avatar Jun 20 '24 17:06 Aaronontheweb