Commit de42e34
authored
DST test for Engine. (#5424)
# 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.1 parent 500a870 commit de42e34
22 files changed
Lines changed: 2340 additions & 79 deletions
File tree
- .github/workflows
- crates
- datastore
- dst
- src
- engine
- sim
- durability
- engine
- runtime
- src
- sim/time
- snapshot
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
338 | 338 | | |
339 | 339 | | |
340 | 340 | | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | 341 | | |
345 | 342 | | |
346 | 343 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
44 | | - | |
| 42 | + | |
45 | 43 | | |
46 | 44 | | |
47 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
0 commit comments