From 23db3b32049ac29928b07c45ccaf8d8dcdb4cc36 Mon Sep 17 00:00:00 2001 From: qstokkink Date: Fri, 6 Sep 2024 15:44:35 +0200 Subject: [PATCH] Fixed anon download test not waiting for port --- src/tribler/test_integration/test_anon_download.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/tribler/test_integration/test_anon_download.py b/src/tribler/test_integration/test_anon_download.py index 131d48bb3d..98c5707e1b 100644 --- a/src/tribler/test_integration/test_anon_download.py +++ b/src/tribler/test_integration/test_anon_download.py @@ -194,6 +194,10 @@ async def start_anon_download(self, infohash: bytes) -> Download: download = await self.download_manager_downloader.start_download(tdef=TorrentDefNoMetainfo(infohash, b"test"), config=config) + + while not self.download_manager_seeder.listen_ports[0]: + await sleep(0.1) + self.overlay(DOWNLOADER).bittorrent_peers[download] = { ("127.0.0.1", self.download_manager_seeder.listen_ports[0]["127.0.0.1"]) }