You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Python prompt tests count requests that other local processes send to the capture server #114
sdks/python/tests/test_prompts.py::test_concurrent_calls_share_one_fetch and test_get_prompt_keeps_a_prompt_for_the_ttl_then_refreshes_it_in_the_background fail intermittently on a busy macOS machine ('assert 2 == 1', 'assert 3 == 2'). The failures also occur without the last commits of the fix of #97 (#112). The extra captured request has the headers 'user-agent': 'node' and 'sec-fetch-mode': 'cors', so a Node process, not get_prompt (urllib), sends it to the ephemeral port of the CaptureServer.
Make the tests count only their own requests, for example by the authorization header or by a path with a random part, so that a different local process cannot change the count. Then run the file 20 times in a loop and expect no failure.
Activity