akka.net
akka.net copied to clipboard
Make timeouts used in TestKit(Base) class configurable
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:
It would be nice if it would be possible to configure the following timeouts:
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.