Skip to content
This repository was archived by the owner on Feb 6, 2026. It is now read-only.

chore: improve dal integration test performance - #8332

Merged
zacharyhamm merged 2 commits into
mainfrom
test-improvements
Jan 22, 2026
Merged

zacharyhamm merged 2 commits into
mainfrom
test-improvements

Conversation

@zacharyhamm

@zacharyhamm zacharyhamm commented Jan 22, 2026 •

Copy link
Copy Markdown
Contributor

Two changes here:

Adds arguments to the dal test macro that enable and disable specific
"servers" per test. By default, only the rebaser and pinga will be
started, and you can enable the rest with:

enable_veritech
enable_edda
enable_forklift

Note that I have not enabled edda for any test, and all tests pass, so
it looks like we don't have any real integration testing for edda at the
moment.

The one you'll want the most is enable_veritech, which you should be
sure to enable any time you will have to execute functions.

This took about 10-30 seconds off my test runs.

And

In read_wait_for_memory we spin checking if the requested object has
landed in the memory cache (via the events stream) and then we look at
disk and durable storage. This adds a 2+ second overhead for many
fetches, which either are not about to land in the memory cache because
they are for old objects which have been evicted, or because we just
don't propagate data fast enough across NATS for it to land.

Checking the normal read path before trying to spin has a huge
performance result for the integration tests, easily 100 seconds faster
in CI, and will likely have a positive impact throughout the stack.

@zacharyhamm

Copy link
Copy Markdown
Contributor Author

/try

@github-actions

github-actions Bot commented Jan 22, 2026 •

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or OpenSSF Scorecard issues found.

Scanned Files

None

@github-actions

github-actions Bot commented Jan 22, 2026 •

Copy link
Copy Markdown

Okay, starting a try! I'll update this comment once it's running...
🚀 Try running here! 🚀

@zacharyhamm

Copy link
Copy Markdown
Contributor Author

/try

@github-actions

github-actions Bot commented Jan 22, 2026 •

Copy link
Copy Markdown

Okay, starting a try! I'll update this comment once it's running...
🚀 Try running here! 🚀

@zacharyhamm

Copy link
Copy Markdown
Contributor Author

/try

@github-actions

github-actions Bot commented Jan 22, 2026 •

Copy link
Copy Markdown

Okay, starting a try! I'll update this comment once it's running...
🚀 Try running here! 🚀

@zacharyhamm

Copy link
Copy Markdown
Contributor Author

/try

@github-actions

github-actions Bot commented Jan 22, 2026 •

Copy link
Copy Markdown

Okay, starting a try! I'll update this comment once it's running...
🚀 Try running here! 🚀

Zachary Hamm added 2 commits January 22, 2026 16:51
Adds arguments to the dal test macro that enable and disable specific
"servers" per test. By default, only the rebaser and pinga will be
started, and you can enable the rest with:

  enable_veritech
  enable_edda
  enable_forklift

Note that I have not enabled edda for any test, and all tests pass, so
it looks like we don't have any real integration testing for edda at the
moment.

The one you'll want the most is enable_veritech, which you should be
sure to enable any time you will have to execute functions.

This took about 10-30 seconds off my test runs.
In read_wait_for_memory we spin checking if the requested object has
landed in the memory cache (via the events stream) and then we look at
disk and durable storage. This adds a 2+ second overhead for many
fetches, which either are not about to land in the memory cache because
they are for old objects which have been evicted, or because we just
don't propagate data fast enough across NATS for it to land.

Checking the normal read path before trying to spin has a huge
performance result for the integration tests, easily 100 seconds faster
in CI, and will likely have a positive impact throughout the stack.
@zacharyhamm zacharyhamm changed the title chore: only start required servers per test chore: improve dal integration test performance Jan 22, 2026
@zacharyhamm
zacharyhamm marked this pull request as ready for review January 22, 2026 22:57
@zacharyhamm

Copy link
Copy Markdown
Contributor Author

/try

@github-actions

github-actions Bot commented Jan 22, 2026 •

Copy link
Copy Markdown

Okay, starting a try! I'll update this comment once it's running...
🚀 Try running here! 🚀

use pretty_assertions_sorted::assert_eq;

#[test]
#[test(enable_veritech)]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay I've wanted this idea for like ~3-4 years and I am SO happy to finally see it! Yes yes yes!

Comment on lines +48 to +63
// Conditionally start servers based on macro arguments
if args.should_start_server("forklift") {
expander.setup_start_forklift_server();
}
if args.should_start_server("veritech") {
expander.setup_start_veritech_server();
}
if args.should_start_server("pinga") {
expander.setup_start_pinga_server();
}
if args.should_start_server("edda") {
expander.setup_start_edda_server();
}
if args.should_start_server("rebaser") {
expander.setup_start_rebaser_server();
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ended up being simple! Nice.

Comment on lines +33 to +55
const DEFAULT_SERVERS: &[&str] = &["rebaser", "pinga"];

impl Args {
/// Check if a specific server should be disabled
pub(crate) fn should_skip_server(&self, server_name: &str) -> bool {
let skip_ident = format!("skip_{server_name}");
self.vars.iter().any(|v| v == &skip_ident)
}

pub(crate) fn should_enable_server(&self, server_name: &str) -> bool {
let skip_ident = format!("enable_{server_name}");
self.vars.iter().any(|v| v == &skip_ident)
}

/// Check if a specific server should be started
pub(crate) fn should_start_server(&self, server_name: &str) -> bool {
if DEFAULT_SERVERS.contains(&server_name) {
!self.should_skip_server(server_name)
} else {
self.should_enable_server(server_name)
}
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah this is it. I never took the time to get deep into the idea, but I'm glad it was relatively small in the end.

@zacharyhamm
zacharyhamm added this pull request to the merge queue Jan 22, 2026
Merged via the queue into main with commit 4dfc790 Jan 22, 2026
28 checks passed
@zacharyhamm
zacharyhamm deleted the test-improvements branch January 22, 2026 23:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants