Skip to content

DST test for Engine.#5424

Merged
Shubham8287 merged 32 commits into
masterfrom
shub/new-dst
Jul 1, 2026
Merged

DST test for Engine.#5424
Shubham8287 merged 32 commits into
masterfrom
shub/new-dst

Conversation

@Shubham8287

@Shubham8287 Shubham8287 commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Description of Changes

Sets the layout for DST tests and adds a basic test for spacetimedb-engine via engine mod.

Engine Test:

  • Generates random schemas with tables, indexes, unique constraints, primary keys, and sequence columns.
  • Drives randomized interactions: begin mutable tx, insert, delete, commit, and replay.
  • Uses an in-memory commitlog/durability implementation so replay can simulate shutdown/reopen without
    disk.
  • Define properties, check them while processing interactions.

Upnext:

  1. Fault-injection in commitlog.
  2. Multi connection support (async api call-ing is not needed for engine test as we expect caller/module to also be single-threaded).
  3. Increase API coverage of engine, especially schema migrations.
  4. Add more properties like check for sequences.
  5. simulated Snapshots.

Further more integration tests like standalone, replication can be added by implementing traits.rs similar to engine.

looking to get general feedback on overall design for test effectiveness and maintainability.

API and ABI breaking changes

NA

Expected complexity level and risk

It's a test addition.

@Shubham8287 Shubham8287 changed the title DST test for relationaldb. Jun 22, 2026
Comment thread crates/dst/src/sim/commitlog.rs
@Shubham8287 Shubham8287 self-assigned this Jun 24, 2026
@Shubham8287 Shubham8287 mentioned this pull request Jun 24, 2026
2 tasks

@jsdt jsdt left a comment

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.

This looks ok to me, though it's not obvious to me what sort of bugs this would be able to catch.

I wasn't able to run these on mac, but the codex fix to get it running is here

Comment thread crates/dst/src/engine/workload.rs
@Shubham8287

Copy link
Copy Markdown
Contributor Author

it's not obvious to me what sort of bugs this would be able to catch.

This PR is mostly the foundation, I have subsequent PR incoming with:

  • Migrations (The place where we see most of the datastor bugs).
  • Faulty commitlog.
  • Replication.
Comment thread .github/workflows/ci.yml

@bfops bfops left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

my code-owned changes lgtm

@Shubham8287 Shubham8287 added this pull request to the merge queue Jul 1, 2026
Merged via the queue into master with commit de42e34 Jul 1, 2026
38 of 39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4 participants