SpacetimeDB icon indicating copy to clipboard operation
SpacetimeDB copied to clipboard

`test_hotswap_module` is (rarely) flaky

Open coolreader18 opened this issue 9 months ago • 1 comments

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.

coolreader18 avatar Apr 11 '25 17:04 coolreader18