diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7968e8e5..edf937da 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -59,7 +59,7 @@ jobs: name: tests-report_lin_${{matrix.pyver}} path: tests_log_linux_${{matrix.pyver}}.xml if: ${{ always() }} - timeout-minutes: 20 + timeout-minutes: 40 tests_windows: name: "Tests Windows" diff --git a/tests/tests_net_messages/test_benchmark.py b/tests/tests_net_messages/test_benchmark.py index 8ca36ffc..a597df4c 100644 --- a/tests/tests_net_messages/test_benchmark.py +++ b/tests/tests_net_messages/test_benchmark.py @@ -1,11 +1,9 @@ -import os import asyncio import random import string import time import threading -import multiprocessing -from unittest import IsolatedAsyncioTestCase, skip +from unittest import IsolatedAsyncioTestCase, skipIf from lifeblood.logging import get_logger, set_default_loglevel from lifeblood.nethelpers import get_localhost from lifeblood.net_messages.address import AddressChain, DirectAddress @@ -17,6 +15,11 @@ from typing import Callable, List, Type, Awaitable +SKIP_BENCHMARK = True +if not SKIP_BENCHMARK: + # just importing the module may be extremely slow on CI workers + import multiprocessing + set_default_loglevel('DEBUG') logger = get_logger('message_test') @@ -123,11 +126,11 @@ def get_message_count(self) -> int: class TestBenchmarkSendReceive(IsolatedAsyncioTestCase): - @skip("no reason to benchmark on slow machines") + @skipIf(SKIP_BENCHMARK, "no reason to benchmark on slow machines") async def test_threaded(self): await self.helper_test(ThreadedFoo) - @skip("no reason to benchmark on slow machines") + @skipIf(SKIP_BENCHMARK, "no reason to benchmark on slow machines") async def test_proc(self): await self.helper_test(ProcessedFoo)