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

improve test time #150

Merged
merged 8 commits into from Feb 8, 2023
Merged

improve test time #150

merged 8 commits into from Feb 8, 2023

Conversation

minrk
Copy link
Member

@minrk minrk commented Feb 7, 2023

  • thin build matrix (avoid running all backends in any given run)
  • show durations so we can see where the time is spent
  • add some concurrency for slow calls like sequential add_route
  • allow longer-running traefik/etcd/consul to avoid startup costs applied to every single test (note: only consul so far)

closes #148

by configuring the logger itself
Instead of running every test every time, select etcd/consul only some of the time
mainly in adding several routes, which can take a few seconds each,
but much faster when concurrent
@minrk
Copy link
Member Author

minrk commented Feb 7, 2023

This is already a huge improvement (~12 minutes overall instead of 60, not counting consul) and shows that something's up in consul, which is way slower than the rest.

config changes are helpful for tests
@minrk minrk force-pushed the faster-tests branch 2 times, most recently from df62773 to 2ea8f92 Compare February 7, 2023 14:13
consul startup/teardown is by far the most expensive, so re-use that one first
as covered in traefik

adds traefik_env config for additional passthrough
waiting for sockets may not be enough in slow environments
@minrk
Copy link
Member Author

minrk commented Feb 8, 2023

Consul was by far the slowest, so I decided to make consul persistent, which reduced the test runtime for consul from 26 minutes to 8.

Making traefik persistent will be a bit of work because there will be several instances on different ports, so I'd rather do that in a separate PR. I think this is ready to go as an incremental improvement.

@GeorgianaElena
Copy link
Member

Amazing @minrk ❤️ Thank you!

@GeorgianaElena GeorgianaElena merged commit f2102e6 into jupyterhub:main Feb 8, 2023
@minrk minrk deleted the faster-tests branch January 17, 2024 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

improve test time
2 participants