test: Add a DST and tests reproducing found failures (#110)

Co-authored-by: Marcelo Soares <marcelo.me.soares@gmail.com>
This commit is contained in:
Kasper Overgård Nielsen 2026-09-04 18:09:20 +02:00 • committed by GitHub
commit c78af247fe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -115,6 +115,17 @@ melos:
melos exec --scope="serverpod_offline_sync" -- dart test test/ --reporter=failures-only &&
melos exec --scope="serverpod_offline_sync_server" -- dart test test/ --reporter=failures-only --concurrency=1 &&
melos exec --scope="serverpod_offline_sync_test_server" -- dart test test/ --reporter=failures-only --concurrency=1
test-dst:
# The deterministic simulation suite, which `test` skips: it is slow and
# seeds from the clock, so it searches fresh schedules on every run and
# can fail for a defect unrelated to the change that triggered it.
#
# Widen the search with DST_SEEDS and DST_ROUNDS; a failure prints the
# command that replays it. Concurrency is pinned to one so the reported
# failures cannot interleave, which matters when reading a wide sweep.
run: >-
melos exec --scope="serverpod_offline_sync_test_server" --
dart test -P dst --reporter=failures-only --concurrency=1
reset:
exec: rm -f test.db*
publish-check: