Skip to content

Commit c4cd320

Browse files
authored
Merge pull request #282 from plotly/andrew/test_timing
Andrew/test timing
2 parents f8b1472 + c45e301 commit c4cd320

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

tests/conftest.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import asyncio
22
import logging
33

4-
import choreographer as choreo
54
import logistro
65
import pytest
76
import pytest_asyncio
7+
8+
import choreographer as choreo
89
from choreographer import errors
910

1011
_logger = logistro.getLogger(__name__)
@@ -95,7 +96,7 @@ async def wrapped_test_fn(*args, **kwargs):
9596

9697
def pytest_configure():
9798
# change this by command line TODO
98-
pytest.default_timeout = 20 # type: ignore[reportAttributeAccessIssue]
99+
pytest.default_timeout = 24 # type: ignore[reportAttributeAccessIssue]
99100

100101

101102
# pytest shuts down its capture before logging/threads finish

tests/test_browser.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,10 @@ async def test_browser_send_command_with_perf(browser):
137137

138138
# Validate timing makes sense (write_start <= write_end <= read_end)
139139
write_start, write_end, read_end = perf
140-
assert write_start <= write_end <= read_end
140+
assert write_start <= write_end
141+
assert write_start <= read_end
142+
# read_end is tough because it happens on a different processor
143+
# and it might actually be somewhat skewed
141144

142145
perfs.append(perf)
143146
await asyncio.sleep(0.1)

0 commit comments

Comments
 (0)