Skip to content

Comments

build: parallelize the e2e bats tests#877

Closed
basvandijk wants to merge 2 commits intomasterfrom
basvandijk/parallel-e2e-bats-tests
Closed

build: parallelize the e2e bats tests#877
basvandijk wants to merge 2 commits intomasterfrom
basvandijk/parallel-e2e-bats-tests

Conversation

@basvandijk
Copy link
Contributor

@basvandijk basvandijk commented Jul 27, 2020

Running the e2e bats test sequentially took 15m on my laptop. We should run them all in parallel such that we don't have to wait so long on CI. In the following CI step execution plot you can see that the tests now run in parallel and take only ~3m:

tmp 6HUhR1K5dG

We do get a lot of "Address already in use" errors on darwin. Probably because the network is not sandboxed on darwin causing the many parallel tests to interfere with each other. These are essentially flaky tests because ideally the test should cope when an address is already in use. It should then just pick a new address.

Running the e2e bats test sequentially took 15m on my laptop. We
should run them all in parallel such that we don't have to wait so
long on CI.
@basvandijk basvandijk force-pushed the basvandijk/parallel-e2e-bats-tests branch from 651d173 to 52e773a Compare July 27, 2020 21:33
mergify bot pushed a commit that referenced this pull request Sep 30, 2020
…tstrap to pick random webserver ports (#920)

I'm going to merge these commits into #877

So far this PR does a couple things

- fixes the fact that ipv6 addresses could not be provided to `dfx start`
- fixes that both `dfx bootstrap` and `dfx start` could not handle the user providing port `0` i.e. telling dfx to pick a random port for the webserver
- writes the port used by the webserver to `.dfx/webserver-port` (similar to `.dfx/pid`) so that it can be queried by dfx (or by the bats test)

the second and third bullet will enable the bats tests to run in parallel in darwin (w/o network sandbox) since we'll tell dfx start or dfx bootstrap to use port `0`, the kernel will dynamically allocate a port, and the bats test can read `.dfx/webserver-port`
@basvandijk
Copy link
Contributor Author

This has been merged into #920.

@basvandijk basvandijk closed this Oct 1, 2020
@lwshang lwshang deleted the basvandijk/parallel-e2e-bats-tests branch July 29, 2022 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant