-
Notifications
You must be signed in to change notification settings - Fork 45
add "live tests" #6427
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
add "live tests" #6427
Changes from all commits
0cd7235
ec5fadb
4544934
8f1cc51
340fc22
7c2c50c
210e4f6
365d13e
4712076
a27d14d
c4f9ee7
826b278
aed5ea2
9d959db
f051594
6dbf1ff
cf8fb0e
a9d0a32
80922f6
502d229
9288eb0
9bbb273
c7cd0ed
78f99db
e85d012
251e665
ab5448b
665bcc1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,9 @@ experimental = ["setup-scripts"] | |
[[profile.default.scripts]] | ||
# Exclude omicron-dev tests from crdb-seed as we explicitly want to simulate an | ||
# environment where the seed file doesn't exist. | ||
filter = 'rdeps(nexus-test-utils) - package(omicron-dev)' | ||
# Exclude omicron-live-tests because those don't need this and also don't have | ||
# it available in the environment in which they run. | ||
filter = 'rdeps(nexus-test-utils) - package(omicron-dev) - package(omicron-live-tests)' | ||
setup = 'crdb-seed' | ||
|
||
[profile.ci] | ||
|
@@ -21,18 +23,26 @@ fail-fast = false | |
# invocations of nextest happen. | ||
command = 'cargo run -p crdb-seed --profile test' | ||
|
||
[test-groups] | ||
# The ClickHouse cluster tests currently rely on a hard-coded set of ports for | ||
# the nodes in the cluster. We would like to relax this in the future, at which | ||
# point this test-group configuration can be removed or at least loosened to | ||
# support testing in parallel. For now, enforce strict serialization for all | ||
# tests with `replicated` in the name. | ||
[test-groups] | ||
clickhouse-cluster = { max-threads = 1 } | ||
# While most Omicron tests operate with their own simulated control plane, the | ||
# live-tests operate on a more realistic, shared control plane and test | ||
# behaviors that conflict with each other. They need to be run serially. | ||
live-tests = { max-threads = 1 } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is cool. I'd prefer we do that in a separate PR. |
||
|
||
[[profile.default.overrides]] | ||
filter = 'package(oximeter-db) and test(replicated)' | ||
test-group = 'clickhouse-cluster' | ||
|
||
[[profile.default.overrides]] | ||
filter = 'package(omicron-live-tests)' | ||
test-group = 'live-tests' | ||
|
||
[[profile.default.overrides]] | ||
# These tests can time out under heavy contention. | ||
filter = 'binary_id(omicron-nexus::test_all) and test(::schema::)' | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
|
||
//! Common xtask command helpers | ||
|
||
use anyhow::{bail, Context, Result}; | ||
use std::process::Command; | ||
|
||
/// Runs the given command, printing some basic debug information around it, and | ||
/// failing with an error message if the command does not exit successfully | ||
pub fn run_subcmd(mut command: Command) -> Result<()> { | ||
eprintln!( | ||
"running: {} {}", | ||
command.get_program().to_str().unwrap(), | ||
command | ||
.get_args() | ||
.map(|arg| format!("{:?}", arg.to_str().unwrap())) | ||
.collect::<Vec<_>>() | ||
.join(" ") | ||
); | ||
|
||
let exit_status = command | ||
.spawn() | ||
.context("failed to spawn child process")? | ||
.wait() | ||
.context("failed to wait for child process")?; | ||
|
||
if !exit_status.success() { | ||
bail!("failed: {}", exit_status); | ||
} | ||
|
||
Ok(()) | ||
} |
Uh oh!
There was an error while loading. Please reload this page.