Closed ktoso closed 2 years ago
Added CI pipeline to run integration tests.
@swift-server-bot test this please
Uncovering bugs in receptionist rewrite where ordering wasn't quite right anymore resulting in test hangs (and bad receptionist ordering bugs in the op-log).
Mostly stable locally but still stabilizing tests while here...
This replaces our previous "bunch of shell scripts" integration tests.
Resolves https://github.com/apple/swift-distributed-actors/issues/900
I actually found a bug while doing this so will solve https://github.com/apple/swift-distributed-actors/issues/1054 while doing this.
Ignore the ad-hoc JSON Coders here, those were to debug the issue.
This introduces a new way to write multi node tests which can span actual processes and automatically join a cluster. We can aggressively KILL those processes and assert on the outputs of such clusters.
We will also easily be able to deploy tests written using this infra to multiple actual physical nodes or docker containers -- similar to how Akka's multi-jvm tests were doing way back then. This will allow us to verify on real networks etc.
It also is amazing for reproducers -- we can exactly replicate behavior, without having to do the weird "make sure we resolve as remote" and other dances.
Screenshot just FYI how an output looks like -- speaking for myself, I can't get complicated things solved without such reliable test infra, so I'm more than happy it is back!
Running tests is done via
swift package --disable-sandbox multi-node -c debug test
(or justswift package --disable-sandbox multi-node test
to run in-c release
mode). The plugin automatically compiles and runs tests in individual processes.This is how an example test-case looks like: