From 83a98327bd77e3d9a341c8a7258efd9599d3de8f Mon Sep 17 00:00:00 2001 From: Kazuhiro Sera Date: Fri, 3 May 2024 14:06:50 +0900 Subject: [PATCH] Omit websocket_client / websockets tests --- .github/workflows/ci-build.yml | 1 + tests/slack_sdk/socket_mode/test_interactions_builtin.py | 6 ------ .../socket_mode/test_interactions_websocket_client.py | 3 +-- .../socket_mode/test_interactions_aiohttp.py | 7 ------- .../socket_mode/test_interactions_websockets.py | 3 +-- 5 files changed, 3 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index c01b0c4f..3c03239d 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -26,6 +26,7 @@ jobs: env: PYTHON_SLACK_SDK_MOCK_SERVER_MODE: 'threading' CI_LARGE_SOCKET_MODE_PAYLOAD_TESTING_DISABLED: '1' + CI_UNSTABLE_TESTS_SKIP_ENABLED: '1' FORCE_COLOR: '1' steps: - uses: actions/checkout@v4 diff --git a/tests/slack_sdk/socket_mode/test_interactions_builtin.py b/tests/slack_sdk/socket_mode/test_interactions_builtin.py index 7e3c588c..ada3e050 100644 --- a/tests/slack_sdk/socket_mode/test_interactions_builtin.py +++ b/tests/slack_sdk/socket_mode/test_interactions_builtin.py @@ -13,7 +13,6 @@ from slack_sdk import WebClient from slack_sdk.socket_mode import SocketModeClient -from tests.helpers import is_ci_unstable_test_skip_enabled from tests.slack_sdk.socket_mode.mock_socket_mode_server import ( start_socket_mode_server, socket_mode_envelopes, @@ -48,9 +47,6 @@ def test_buffer_size_validation(self): pass def test_interactions(self): - if is_ci_unstable_test_skip_enabled(): - return - default_recursion_limit = sys.getrecursionlimit() # will restore later # This built-in WebSocket client internally has recursive method calls of _fetch_messages method. # In this test, the method calls can result in the following error when giving a quite small buffer size. @@ -135,8 +131,6 @@ def socket_mode_request_handler(client: BaseSocketModeClient, request: SocketMod self.logger.info(f"Passed with buffer size: {buffer_size_list}") def test_send_message_while_disconnection(self): - if is_ci_unstable_test_skip_enabled(): - return t = Thread(target=start_socket_mode_server(self, 3011)) t.daemon = True t.start() diff --git a/tests/slack_sdk/socket_mode/test_interactions_websocket_client.py b/tests/slack_sdk/socket_mode/test_interactions_websocket_client.py index 463bd7ea..a1d27ad3 100644 --- a/tests/slack_sdk/socket_mode/test_interactions_websocket_client.py +++ b/tests/slack_sdk/socket_mode/test_interactions_websocket_client.py @@ -38,8 +38,6 @@ def tearDown(self): cleanup_mock_web_api_server(self) def test_interactions(self): - if is_ci_unstable_test_skip_enabled(): - return t = Thread(target=start_socket_mode_server(self, 3012)) t.daemon = True t.start() @@ -100,6 +98,7 @@ def socket_mode_request_handler(client: BaseSocketModeClient, request: SocketMod def test_send_message_while_disconnection(self): if is_ci_unstable_test_skip_enabled(): + # this test tends to fail on the GitHub Actions platform return t = Thread(target=start_socket_mode_server(self, 3012)) t.daemon = True diff --git a/tests/slack_sdk_async/socket_mode/test_interactions_aiohttp.py b/tests/slack_sdk_async/socket_mode/test_interactions_aiohttp.py index 8bb0a962..4af9d147 100644 --- a/tests/slack_sdk_async/socket_mode/test_interactions_aiohttp.py +++ b/tests/slack_sdk_async/socket_mode/test_interactions_aiohttp.py @@ -14,7 +14,6 @@ from slack_sdk.socket_mode.aiohttp import SocketModeClient from slack_sdk.web.async_client import AsyncWebClient -from tests.helpers import is_ci_unstable_test_skip_enabled from tests.slack_sdk.socket_mode.mock_socket_mode_server import ( start_socket_mode_server, start_socket_mode_server_with_disconnection, @@ -44,8 +43,6 @@ def tearDown(self): @async_test async def test_interactions(self): - if is_ci_unstable_test_skip_enabled(): - return t = Thread(target=start_socket_mode_server(self, 3001)) t.daemon = True t.start() @@ -108,8 +105,6 @@ async def socket_mode_listener( @async_test async def test_interactions_with_disconnection(self): - if is_ci_unstable_test_skip_enabled(): - return t = Thread(target=start_socket_mode_server_with_disconnection(self, 3001)) t.daemon = True t.start() @@ -196,8 +191,6 @@ async def socket_mode_listener( @async_test async def test_send_message_while_disconnection(self): - if is_ci_unstable_test_skip_enabled(): - return t = Thread(target=start_socket_mode_server(self, 3001)) t.daemon = True t.start() diff --git a/tests/slack_sdk_async/socket_mode/test_interactions_websockets.py b/tests/slack_sdk_async/socket_mode/test_interactions_websockets.py index 7f165af5..6cb354fb 100644 --- a/tests/slack_sdk_async/socket_mode/test_interactions_websockets.py +++ b/tests/slack_sdk_async/socket_mode/test_interactions_websockets.py @@ -42,8 +42,6 @@ def tearDown(self): @async_test async def test_interactions(self): - if is_ci_unstable_test_skip_enabled(): - return t = Thread(target=start_socket_mode_server(self, 3002)) t.daemon = True t.start() @@ -109,6 +107,7 @@ async def socket_mode_listener( @async_test async def test_send_message_while_disconnection(self): if is_ci_unstable_test_skip_enabled(): + # this test tends to fail on the GitHub Actions platform return t = Thread(target=start_socket_mode_server(self, 3001)) t.daemon = True