Skip to content

Commit

Permalink
Tests: Remove queue overrides / limit concurrency (#433)
Browse files Browse the repository at this point in the history
Ensure all backend variations are properly end-to-end tested
by removing in-memory queue override; this currently
requires limiting test concurrency to 1 because tests are
currently sharing backend services.
  • Loading branch information
jaymell authored May 6, 2022
1 parent 037e34c commit 25ff291
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion server/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Run tests with various configurations:

TEST_COMMAND="cargo test --all --all-features --all-targets"
TEST_COMMAND="cargo test --all --all-features --all-targets -- --test-threads=1"

# Common variables:
export DATABASE_URL="postgresql://postgres:postgres@localhost:5432/postgres"
Expand Down
7 changes: 1 addition & 6 deletions server/svix-server/tests/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,7 @@ pub fn get_default_test_config() -> ConfigurationInner {
let _ = dotenv::dotenv();
let cfg = svix_server::cfg::load().unwrap();

// Change the queue type to in-memory. This is necessary so test workers don't pick up messages
// from other tests whose threads then abort at the end of a test before associated database
// transactions are complete.
let mut cfg = cfg.as_ref().clone();
cfg.queue_type = svix_server::cfg::QueueType::Memory;
cfg
cfg.as_ref().clone()
}

pub fn start_svix_server() -> (TestClient, tokio::task::JoinHandle<()>) {
Expand Down

0 comments on commit 25ff291

Please sign in to comment.