Skip to content

Commit e92e843

Browse files
authored
fix(pytest): Sleep in sporadically failing test_slot_migration_oom pytest (#5214)
Add additional sleep between waiting for cluster status and SLOT-MIGRATION-STATUS request. There is rare test timing issue when we set status to FATAL but error message is still not available. Closes #5208 Signed-off-by: mkaruza <[email protected]>
1 parent 0e8d766 commit e92e843

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/dragonfly/cluster_test.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3276,6 +3276,10 @@ async def test_slot_migration_oom(df_factory):
32763276
await wait_for_status(nodes[0].admin_client, nodes[1].id, "FATAL", 300)
32773277
await wait_for_status(nodes[1].admin_client, nodes[0].id, "FATAL")
32783278

3279+
# There's a rare timing issue if we don't wait here. Status can be set to FATAL
3280+
# but error message is not still set for slot migration.
3281+
await asyncio.sleep(1)
3282+
32793283
# Node_0 slot-migration-status
32803284
status = await nodes[0].admin_client.execute_command(
32813285
"DFLYCLUSTER", "SLOT-MIGRATION-STATUS", nodes[1].id

0 commit comments

Comments
 (0)