From 5b1eeea43090f7fb33761b60ced6c349af7e07ef Mon Sep 17 00:00:00 2001 From: "Bernd (Hermes)" Date: Tue, 28 Jul 2026 18:43:36 +0200 Subject: [PATCH] test_03: increase /reset wait from 3s to 5s to prevent cursor contamination The /reset response ('Konversation zurueckgesetzt...') was arriving after the keyword post, landing after source_cursor and being picked up by wait_for_bot_message as a move-request candidate. The assertion then failed because the /reset response contains no routing keywords. Fix: wait 5s (was 3s) so the bot has time to process /reset AND send its response before the keyword post. source_cursor from the keyword post_message return then sits AFTER the /reset response, and wait_for_bot_message correctly ignores it. --- tests/live_rc/test_03_move_request.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/live_rc/test_03_move_request.py b/tests/live_rc/test_03_move_request.py index 302717b..ce5dcc6 100644 --- a/tests/live_rc/test_03_move_request.py +++ b/tests/live_rc/test_03_move_request.py @@ -93,8 +93,13 @@ def test_03_move_request( "Test 03: sent /reset to source room (msg %s) — clearing sticky topics", _reset_msg_id[:12], ) - # Give the bot 3 seconds to process /reset before posting the keyword - time.sleep(3.0) + # Give the bot 5 seconds to process /reset AND send its response + # before posting the keyword. The /reset response ("Konversation + # zurückgesetzt...") must arrive BEFORE the keyword post so that + # source_cursor (from the keyword post_message return) sits AFTER + # the /reset response. Otherwise wait_for_bot_message picks up the + # /reset response as a "move-request" and the assertion fails. + time.sleep(5.0) # Step 1: Post keyword message in source room. # SKIP separate get_latest_timestamp — use the timestamp from post_message