chromium-bidi icon indicating copy to clipboard operation
chromium-bidi copied to clipboard

e2e test "test_browser_close_response_received" is flaky

Open sadym-chromium opened this issue 1 year ago • 1 comments

Example run: https://github.com/GoogleChromeLabs/chromium-bidi/actions/runs/8174232908/job/22348535594

The exception is in the test setup, so it can be unrelated to the specific test issue.

______ ERROR at setup of test_browser_close_response_received[websocket0] ______

event_loop = <_UnixSelectorEventLoop running=False closed=False debug=False>
request = <SubRequest 'websocket' for <Function test_browser_close_response_received[websocket0]>>
kwargs = {'_websocket_connection': <websockets.legacy.client.WebSocketClientProtocol object at 0x7f511df4e690>}
setup = <function _wrap_async_fixture.<locals>._async_fixture_wrapper.<locals>.setup at 0x7f511d54f880>

    @functools.wraps(fixture)
    def _async_fixture_wrapper(
        event_loop: asyncio.AbstractEventLoop, request: SubRequest, **kwargs: Any
    ):
        func = _perhaps_rebind_fixture_func(
            fixture, request.instance, fixturedef.unittest
        )
    
        async def setup():
            res = await func(**_add_kwargs(func, kwargs, event_loop, request))
            return res
    
>       return event_loop.run_until_complete(setup())

../../../.local/share/virtualenvs/chromium-bidi-DxTFQWxO/lib/python3.11/site-packages/pytest_asyncio/plugin.py:326: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/asyncio/base_events.py:641: in run_until_complete
    self.run_forever()
/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/asyncio/base_events.py:608: in run_forever
    self._run_once()
/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/asyncio/base_events.py:1898: in _run_once
    event_list = self._selector.select(timeout)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <selectors.EpollSelector object at 0x7f511d627ad0>, timeout = 20.0

    def select(self, timeout=None):
        if timeout is None:
            timeout = -1
        elif timeout <= 0:
            timeout = 0
        else:
            # epoll_wait() has a resolution of 1 millisecond, round away
            # from zero to wait *at least* timeout seconds.
            timeout = math.ceil(timeout * 1e3) * 1e-3
    
        # epoll_wait() expects `maxevents` to be greater than zero;
        # we want to make sure that `select()` can be called when no
        # FD is registered.
        max_ev = max(len(self._fd_to_key), 1)
    
        ready = []
        try:
>           fd_event_list = self._selector.poll(timeout, max_ev)
E           Failed: Timeout >10.0s

/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/selectors.py:468: Failed
---------------------------- Captured stderr setup -----------------------------
INFO:test_helpers:Executing command with method 'session.new' and params '{'capabilities': {'alwaysMatch': {}}}'...

+++++++++++++++++++++++++++++++++++ Timeout ++++++++++++++++++++++++++++++++++++

~~~~~~~~~~~~~~~~~~~~~ Stack of asyncio_0 (139986359809600) ~~~~~~~~~~~~~~~~~~~~~
  File "/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/threading.py", line 1002, in _bootstrap
    self._bootstrap_inner()
  File "/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
    self.run()
  File "/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/threading.py", line 982, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/concurrent/futures/thread.py", line 81, in _worker
    work_item = work_queue.get(block=True)

+++++++++++++++++++++++++++++++++++ Timeout ++++++++++++++++++++++++++++++++++++
------------------------------ Captured log setup ------------------------------
INFO     test_helpers:test_helpers.py:80 Executing command with method 'session.new' and params '{'capabilities': {'alwaysMatch': {}}}'...
--------------------------- snapshot report summary ----------------------------
2 snapshots passed.
=========================== short test summary info ============================
ERROR tests/browser/test_close.py::test_browser_close_response_received[websocket0] - Failed: Timeout >10.0s

sadym-chromium avatar Mar 07 '24 07:03 sadym-chromium

can be related to https://github.com/GoogleChromeLabs/chromium-bidi/issues/1717

sadym-chromium avatar Mar 07 '24 09:03 sadym-chromium