From dcad94d2c6aaed336341f84104930ad71227bc59 Mon Sep 17 00:00:00 2001 From: freddiewanah Date: Mon, 8 Apr 2024 19:16:51 +0800 Subject: [PATCH] refactor the test methods to avoid sleepy test or should consider comment the sleep command --- test/plugins/test_player.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/plugins/test_player.py b/test/plugins/test_player.py index eb38e9afc..bf9912142 100644 --- a/test/plugins/test_player.py +++ b/test/plugins/test_player.py @@ -24,6 +24,7 @@ import tempfile import threading import time import unittest +import asyncio from contextlib import contextmanager # Mock GstPlayer so that the forked process doesn't attempt to import gi: @@ -549,7 +550,7 @@ class BPDQueryTest(BPDTestHelper): # Manually send a command without reading a response. request = client.serialise_command("idle") client.sock.sendall(request) - time.sleep(0.01) + asyncio.sleep(0.01) response = client.send_command("noidle") self._assert_ok(response)