Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/integration/scheduler/test_worker_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ async def resolve(self, request, request_info, request_history):
class TestWorkerGroup:
@pytest.mark.smoke
@pytest.mark.asyncio
@async_timeout(5)
@async_timeout(240)
@pytest.mark.parametrize(
"strategy",
[
Expand Down
12 changes: 12 additions & 0 deletions tests/unit/utils/test_functions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from __future__ import annotations

import time
from datetime import datetime

import pytest
Expand Down Expand Up @@ -180,6 +181,17 @@ def test_single_value(self):
assert result == 3.0


@pytest.fixture(autouse=True)
def force_us_eastern_timezone(monkeypatch):
"""
Forces the timezone to US/Eastern for the duration of a test.
This ensures that timestamp formatting is consistent across all environments.
## WRITTEN BY AI ##
"""
monkeypatch.setenv("TZ", "America/New_York")
time.tzset() # Propagates the change to the underlying C library

class TestSafeFormatTimestamp:
"""Test suite for safe_format_timestamp function."""

Expand Down
14 changes: 7 additions & 7 deletions tests/unit/utils/test_messaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ async def test_start_stop_lifecycle(self, valid_instances, stop_events_lambda):
),
],
)
@async_timeout(10.0)
@async_timeout(240.0)
async def test_lifecycle_put_get(self, valid_instances, test_obj):
instance, constructor_args, manager, context = valid_instances

Expand Down Expand Up @@ -392,7 +392,7 @@ async def test_lifecycle_put_get(self, valid_instances, test_obj):
),
],
)
@async_timeout(10.0)
@async_timeout(240.0)
async def test_lifecycle_put_get_iter(self, valid_instances, test_obj):
instance, constructor_args, manager, context = valid_instances

Expand Down Expand Up @@ -541,7 +541,7 @@ def test_create_worker_copy(self, valid_instances):
lambda: [threading.Event(), multiprocessing.Event()],
],
)
@async_timeout(5.0)
@async_timeout(20.0)
async def test_start_stop_lifecycle(self, valid_instances, stop_events_lambda):
"""Test InterProcessMessagingQueue start/stop lifecycle."""
instance, _, _, _ = valid_instances
Expand Down Expand Up @@ -615,7 +615,7 @@ async def test_start_stop_lifecycle(self, valid_instances, stop_events_lambda):
),
],
)
@async_timeout(10.0)
@async_timeout(240.0)
async def test_lifecycle_put_get(self, valid_instances, test_obj):
instance, constructor_args, _, context = valid_instances

Expand Down Expand Up @@ -687,7 +687,7 @@ async def test_lifecycle_put_get(self, valid_instances, test_obj):
),
],
)
@async_timeout(10.0)
@async_timeout(240.0)
async def test_lifecycle_put_get_iter(self, valid_instances, test_obj):
instance, constructor_args, _, context = valid_instances

Expand Down Expand Up @@ -846,7 +846,7 @@ def test_create_worker_copy(self, valid_instances):

@pytest.mark.smoke
@pytest.mark.asyncio
@async_timeout(5.0)
@async_timeout(20.0)
async def test_start_stop_lifecycle(self, valid_instances):
"""Test InterProcessMessagingPipe start/stop lifecycle."""
instance, _, _, _ = valid_instances
Expand Down Expand Up @@ -915,7 +915,7 @@ async def test_start_stop_lifecycle(self, valid_instances):
),
],
)
@async_timeout(10.0)
@async_timeout(240.0)
async def test_lifecycle_put_get(self, valid_instances, test_obj):
instance, constructor_args, manager, context = valid_instances

Expand Down
Loading