From 920c158ece025fc35c7da1dc29564794b35d6fc0 Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Tue, 17 Oct 2023 18:38:56 -0400 Subject: [PATCH] test: fix macos functional test --- tests/functional/test_plex_plugin.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/functional/test_plex_plugin.py b/tests/functional/test_plex_plugin.py index 8c2d213c..3a420822 100644 --- a/tests/functional/test_plex_plugin.py +++ b/tests/functional/test_plex_plugin.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # standard imports import os +import time def _check_themes(movies): @@ -16,7 +17,15 @@ def test_plugin_los(plugin_logs): def test_plugin_log_file(plugin_log_file): - assert os.path.isfile(plugin_log_file), "Plugin log file not found: {}".format(plugin_log_file) + found = False + count = 0 + while not found and count < 60: # plugin takes a little while to start on macOS + count += 1 + if os.path.isfile(plugin_log_file): + found = True + else: + time.sleep(1) + assert found, "After 60 seconds, plugin log file not found: {}".format(plugin_log_file) def test_plugin_log_file_exceptions(plugin_log_file):