mirror of
https://github.com/clockworklabs/SpacetimeDB.git
synced 2026-07-04 03:32:57 -04:00
de42e341aa
# 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`](https://github.com/clockworklabs/SpacetimeDB/pull/5424/changes#diff-c9a6dc71550c7ccdd23b18de8ec8777aa6e2a34af2ddad0a5040537c8dffd1e6)
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.
23 lines
627 B
TOML
23 lines
627 B
TOML
[package]
|
|
name = "spacetimedb-runtime"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license-file = "LICENSE"
|
|
description = "Runtime and deterministic simulation utilities for SpacetimeDB"
|
|
rust-version.workspace = true
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
tokio.workspace = true
|
|
async-task = { version = "4.4", default-features = false, optional = true }
|
|
spin = { version = "0.9", default-features = false, features = ["mutex", "spin_mutex"], optional = true }
|
|
libc = { version = "0.2", optional = true }
|
|
|
|
[dev-dependencies]
|
|
futures.workspace = true
|
|
|
|
[features]
|
|
simulation = ["dep:async-task", "dep:spin", "dep:libc"]
|