Skip to content

Commit ef645a0

Browse files
authored
Merge branch 'main' into wsgi-dict-deprecation
2 parents c5134ac + 70a2f8a commit ef645a0

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

tests/testing_support/fixtures.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,16 @@ def _collector_agent_registration_fixture(request, settings_fixture):
333333

334334
@pytest.fixture
335335
def collector_available_fixture(request, collector_agent_registration):
336-
application = application_instance()
337-
active = application.active
338-
assert active
336+
application = collector_agent_registration
337+
settings = global_settings()
338+
339+
# Wait for the application to become active.
340+
timeout = (settings.startup_timeout or 0) + 10.0
341+
while not application.active and timeout > 0:
342+
time.sleep(0.1)
343+
timeout -= 0.1
344+
345+
assert application.active, f"Application failed to activate after {timeout} seconds."
339346

340347

341348
def raise_background_exceptions(timeout=5.0):

0 commit comments

Comments
 (0)