Skip to content

perf(tests/rust): share tables at module level and remove in-test deletes#197

Open
pdf-amzn wants to merge 1 commit into
mainfrom
tests-rust-reuse-tables
Open

perf(tests/rust): share tables at module level and remove in-test deletes#197
pdf-amzn wants to merge 1 commit into
mainfrom
tests-rust-reuse-tables

Conversation

@pdf-amzn

@pdf-amzn pdf-amzn commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator
  • lsi.rs: share one LSI table and one hash-only GSI table across all
    tests using AsyncOnceCell; isolate via unique partition keys (7→2 tables)
  • test_base.rs: adaptive polling in wait_for_active/wait_for_deleted
    (100ms for ExtendDB, 1s for DynamoDB); add comment explaining why
    tests don't delete their own tables
  • gsi_more.rs: remove delete_table + wait_for_deleted after assertions
  • authorization.rs, backup_restore.rs, capacity_throttling.rs,
    query_more.rs: remove fire-and-forget delete_table calls

Table cleanup is handled by devtools/run-tests post-run script.
In CI, the PostgreSQL container is discarded after each run anyway.

Verified: 344 passed, 0 failed, 10 ignored (ExtendDB)
333 passed, 11 failed, 10 ignored (DynamoDB — pre-existing)

What

Reuses tables within a module across tests, in our Rust-based integration-test suite.

Why

Make tests faster, so people are more likely to run them.

Testing done

Ran these tests

Checklist

  • I have read CONTRIBUTING.md
  • All tests pass (cargo test --workspace)
  • [n/a] I have added or updated tests for new functionality
  • [n/a] I have updated documentation if behavior changed
  • [n/a] Breaking changes are noted below (if any)

This needs to be done in bulk later (and GitHub enforcement added:

  • Code is formatted (cargo fmt --check)
  • Clippy is clean (cargo clippy -- -W clippy::pedantic)

ADR / RFC: n/a


By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache License 2.0 and I agree to the Developer Certificate of
Origin (DCO). See CONTRIBUTING.md for details.

…etes

- lsi.rs: share one LSI table and one hash-only GSI table across all
  tests using AsyncOnceCell; isolate via unique partition keys (7→2 tables)
- test_base.rs: adaptive polling in wait_for_active/wait_for_deleted
  (100ms for ExtendDB, 1s for DynamoDB); add comment explaining why
  tests don't delete their own tables
- gsi_more.rs: remove delete_table + wait_for_deleted after assertions
- authorization.rs, backup_restore.rs, capacity_throttling.rs,
  query_more.rs: remove fire-and-forget delete_table calls

Table cleanup is handled by devtools/run-tests post-run script.
In CI, the PostgreSQL container is discarded after each run anyway.

Verified: 344 passed, 0 failed, 10 ignored (ExtendDB)
          333 passed, 11 failed, 10 ignored (DynamoDB — pre-existing)
@pdf-amzn pdf-amzn marked this pull request as ready for review July 2, 2026 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant