From 341aa98a968c7067e6e778683b67f71e4be30b76 Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Thu, 15 Oct 2026 00:03:06 +0200 Subject: [PATCH] test_friends: --hold for the guest role, report chunks once they arrive Co-Authored-By: Claude Opus 5.5 --- tools/test_friends.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/test_friends.py b/tools/test_friends.py index 482aea2de..97ef7a41c 100644 --- a/tools/test_friends.py +++ b/tools/test_friends.py @@ -259,13 +259,14 @@ def one_side(args, work): print(f'host: {game("friends status")}') else: join(game, args.code, 'Remote') - v = game.wait('status', lambda v: v['server']['joined'] and v['player'] is not None, 60, 'joined') + game.wait('status', lambda v: v['server']['joined'] and v['player'] is not None, 60, 'joined') game('chat hello across machines') - game.wait('status', lambda v: v['server']['chunks'] > 0, 30, 'chunks') + v = game.wait('status', lambda v: v['server']['chunks'] > 0, 30, 'chunks') print(f'guest joined: {v["server"]["address"]}, {v["server"]["chunks"]} chunks') game('key w down') time.sleep(1.0) game('key w up') + time.sleep(args.hold) game('disconnect') finally: game.stop() @@ -281,6 +282,7 @@ def main(): parser.add_argument('--code') parser.add_argument('--path', choices=['relay', 'direct']) parser.add_argument('--wait', type=float, default=600) + parser.add_argument('--hold', type=float, default=0, help='guest: stay this many seconds before leaving') parser.add_argument('--baseline', action='store_true', help='first run the same checks over plain LAN') args = parser.parse_args() args.client, args.resources = args.client.resolve(), args.resources.resolve()