-
Notifications
You must be signed in to change notification settings - Fork 40
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
Merge integration tests together #497
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was way simpler than what I pictured. If you create a new file and forget to add it to the list, how do you find out? Will it fail to compile and run because super
isn't anything?
I believe cargo actually emits an error for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, love those speed up numbers
Thanks for the quick review! I'm going to go ahead and land this. It will conflict a bit with #492 -- I'm happy to help with that merge. |
I think we should revisit this. Today, an incremental compile of the integration test suite takes ~10 minutes. Because everything is now in a single translation unit, any update to tests or code under test results in 10 minutes in the penalty box. Even for changes to integration tests that just use Nexus via the API with no actual changes to Nexus itself, and using |
Hmm, yeah, those times suck. If you want to be doing I think if we separated them, these would get worse (potentially by quite a lot but I don't know):
I think this change would be pretty easy to reverse and measure the impact? |
This change moves all 19 of the existing integration tests into individual modules within a new "integration_test" module and includes that module from a single top-level integration test. This has two main benefits:
Here are some numbers from my test machine ivanova, which is an 8-core (16-thread) Matisse with 64 GiB of memory running helios-1.0.20742. I measured two things:
cargo test
after firstcargo clean
, thencargo test
. (That is, I threw the firstcargo test
away.) This is measuring the test suite time, ignoring build time.cargo test -p omicron-nexus
. This is after a throwaway run, since the first one of these will rebuild a bunch of deps due to different feature unification behavior when building an individual package.For "main", I used commit 0e9e790, which was the tip when I started.
The tip of "main" when I started was commit 0e9e790. I measured my changes on commit 46203b0.
Full test suite on "main":
Full test suite with my change:
Nexus-only test suite on "main":
Nexus-only test suite with my changes:
This is more than a 50% reduction in the test suite time. The observed benefit will depend on available cores. The user and system CPU time hasn't changed much, which I believe reflects that a lot of the serialization was on I/O.
I don't think there's much downside to this. The tests are still in separate files so we don't lose the separation in code structure.