clockworklabs / clockworklabs/SpacetimeDB
`test_hotswap_module` is (rarely) flaky
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 25.2k
- Forks
- 1.1k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 46
Description
I've never seen this before, so it seems uncommon, but this is from the merge queue CI for windows smoketests of #2568:
======================================================================
FAIL: test_hotswap_module (smoketests.tests.modules.HotswapModule.test_hotswap_module)
Tests hotswapping of modules.
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\a\SpacetimeDB\SpacetimeDB\smoketests\tests\modules.py", line 244, in test_hotswap_module
self.assertEqual(sub(), [
AssertionError: Lists differ: [{'pe[59 chars]'}]}}] != [{'pe[59 chars]'}]}}, {'person': {'deletes': [], 'inserts': [[25 chars]}]}}]
Second list contains 1 additional elements.
First extra element 1:
{'person': {'deletes': [], 'inserts': [{'id': 2, 'name': 'Cindy'}]}}
- [{'person': {'deletes': [], 'inserts': [{'id': 1, 'name': 'Horst'}]}}]
? ^
+ [{'person': {'deletes': [], 'inserts': [{'id': 1, 'name': 'Horst'}]}},
? ^
+ {'person': {'deletes': [], 'inserts': [{'id': 2, 'name': 'Cindy'}]}}]
Stdout:
initial update: {"person":{"deletes":[],"inserts":[]}}
I'm not sure if this is a race condition within the test or within the DB itself.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with smoketests/tests/modules.py at line 244 and the Windows smoketests setup for test_hotswap_module. Reproduce the intermittent failure and inspect whether the missing Cindy update comes from test timing or the database; done means the race is identified and the test or database behavior is reliably corrected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rust
- Domain
- databases, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100