Skip to content

Commit df25f84

Browse files
committed
Simplify retry scheme, windows is slow
1 parent c1c58ff commit df25f84

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/choreographer/browser_async.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
from .browsers._interface_type import BrowserImplInterface
3131
from .channels._interface_type import ChannelInterface
3232

33-
MAX_POPULATE_LOOPS = 6 # how many times to check for tab, race condition
33+
_N = MAX_POPULATE_LOOPS = 20
34+
3435

3536
_logger = logistro.getLogger(__name__)
3637

@@ -169,7 +170,7 @@ def run() -> subprocess.Popen[bytes] | subprocess.Popen[str]: # depends on args
169170
while not self.get_tab():
170171
_logger.debug("Populating Targets")
171172
await self.populate_targets()
172-
await asyncio.sleep(0.05 * counter)
173+
await asyncio.sleep(0.1)
173174
counter += 1
174175
if counter == MAX_POPULATE_LOOPS:
175176
break

tests/test_process.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ async def test_context(headless, sandbox, gpu):
3030
f"Sandbox: {sandbox},"
3131
f"Version: {platform.version().lower()}",
3232
)
33-
async with timeout(100000): # type: ignore[reportAttributeAccessIssue]
33+
async with timeout(pytest.default_timeout): # type: ignore[reportAttributeAccessIssue]
3434
async with choreo.Browser(
3535
headless=headless,
3636
enable_sandbox=sandbox,

0 commit comments

Comments
 (0)