ROOT: skip environment lint, matches filter 'lint' py39: remove tox env folder /workspaces/goldi2/crosslab/clients/soa/python/.tox/py39 .pkg: remove tox env folder /workspaces/goldi2/crosslab/clients/soa/python/.tox/.pkg py39: install_deps> python -I -m pip install coverage pyee pytest pytest-aiohttp pytest-asyncio python-dateutil dependencies/api-client.tar.gz dependencies/python-test-helper.tar.gz .pkg: install_requires> python -I -m pip install 'setuptools>=61.0' .pkg: _optional_hooks> python /usr/local/lib/python3.10/dist-packages/pyproject_api/_backend.py True setuptools.build_meta .pkg: get_requires_for_build_sdist> python /usr/local/lib/python3.10/dist-packages/pyproject_api/_backend.py True setuptools.build_meta .pkg: get_requires_for_build_wheel> python /usr/local/lib/python3.10/dist-packages/pyproject_api/_backend.py True setuptools.build_meta .pkg: prepare_metadata_for_build_wheel> python /usr/local/lib/python3.10/dist-packages/pyproject_api/_backend.py True setuptools.build_meta .pkg: build_sdist> python /usr/local/lib/python3.10/dist-packages/pyproject_api/_backend.py True setuptools.build_meta py39: install_package_deps> python -I -m pip install 'aiortc>=1.10.1' crosslab_api_client py39: install_package> python -I -m pip install --force-reinstall --no-deps /workspaces/goldi2/crosslab/clients/soa/python/.tox/.tmp/package/62/crosslab_soa_client-0.2.8+dev.ee88c7e5.tar.gz py39: commands[0]> coverage run --source crosslab.soa_client -m pytest ============================= test session starts ============================== platform linux -- Python 3.9.21, pytest-8.4.1, pluggy-1.6.0 cachedir: .tox/py39/.pytest_cache rootdir: /workspaces/goldi2/crosslab/clients/soa/python configfile: pyproject.toml plugins: aiohttp-1.1.0, asyncio-1.1.0 asyncio: mode=strict, asyncio_default_fixture_loop_scope=function, asyncio_default_test_loop_scope=function collected 10 items tests/test_device_handler.py .. [ 20%] tests/test_local_connection.py .. [ 40%] tests/test_webrtc_connection.py ...F [ 80%] tests/test_websocket_connection.py .. [100%] =================================== FAILURES =================================== ___________________ test_webrtc_connection_video_only[False] ___________________ tiebreaker = False @pytest.mark.asyncio @pytest.mark.parametrize("tiebreaker", [True, False]) @timeout(5) async def test_webrtc_connection_video_only(tiebreaker: bool): asyncException = AsyncException() serviceConfig = { "serviceType": "http://example.com/data-only", "serviceId": "data", "remoteServiceId": "data", } player = MediaPlayer( os.path.join(os.path.dirname(os.path.abspath(__file__)), "test.mp4"), decode=True, ) track = player.video localService = ServiceStub("video", outTrack=track) remoteService = ServiceStub("video", receiveVideo=True) local = WebRTCPeerConnection() remote = WebRTCPeerConnection() local.on("error", lambda error: asyncException.set(error)) remote.on("error", lambda error: asyncException.set(error)) async def onLocalSignalingMessage(message: SignalingMessage): await remote.handleSignalingMessage( { "messageType": "signaling", "connectionUrl": "connection.url", "content": message["content"], "signalingType": message["signalingType"], } ) async def onRemoteSignalingMessage(message: SignalingMessage): await local.handleSignalingMessage( { "messageType": "signaling", "connectionUrl": "connection.url", "content": message["content"], "signalingType": message["signalingType"], } ) local.on("signaling", onLocalSignalingMessage) remote.on("signaling", onRemoteSignalingMessage) local.tiebreaker = tiebreaker remote.tiebreaker = not tiebreaker localReceiverDir = "sendrecv" if tiebreaker else "sendonly" remoteReceiverDir = "recvonly" if tiebreaker else "sendrecv" with NoReferenceLeaks("crosslab"): await localService.setupConnection(local, serviceConfig) await remoteService.setupConnection(remote, serviceConfig) try: await wait([local.connect(), remote.connect()], asyncException) assert local.pc.getTransceivers()[0].direction == localReceiverDir assert remote.pc.getTransceivers()[0].direction == remoteReceiverDir await wait( [remoteService.recvPacket.wait()], asyncException, ) assert len(remoteService.received_frame_pts) == 1 finally: await wait([local.close(), remote.close()], asyncException) await localService.teardownConnection(local) > await remoteService.teardownConnection(remote) tests/test_webrtc_connection.py:153: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py39/lib/python3.9/site-packages/test_helper/no_reference_leaks.py:67: in __exit__ raise exc_val tests/test_webrtc_connection.py:144: in test_webrtc_connection_video_only await wait( tests/helpers/async_exception.py:44: in wait result = await next(r) /usr/lib/python3.9/asyncio/tasks.py:607: in _wait_for_one f = await done.get() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def get(self): """Remove and return an item from the queue. If queue is empty, wait until an item is available. """ while self.empty(): getter = self._loop.create_future() self._getters.append(getter) try: > await getter E asyncio.exceptions.CancelledError /usr/lib/python3.9/asyncio/queues.py:166: CancelledError During handling of the above exception, another exception occurred: fut = > timeout = 5 async def wait_for(fut, timeout, *, loop=None): """Wait for the single Future or coroutine to complete, with timeout. Coroutine will be wrapped in Task. Returns result of the Future or coroutine. When a timeout occurs, it cancels the task and raises TimeoutError. To avoid the task cancellation, wrap it in shield(). If the wait is cancelled, the task is also cancelled. This function is a coroutine. """ if loop is None: loop = events.get_running_loop() else: warnings.warn("The loop argument is deprecated since Python 3.8, " "and scheduled for removal in Python 3.10.", DeprecationWarning, stacklevel=2) if timeout is None: return await fut if timeout <= 0: fut = ensure_future(fut, loop=loop) if fut.done(): return fut.result() await _cancel_and_wait(fut, loop=loop) try: return fut.result() except exceptions.CancelledError as exc: raise exceptions.TimeoutError() from exc waiter = loop.create_future() timeout_handle = loop.call_later(timeout, _release_waiter, waiter) cb = functools.partial(_release_waiter, waiter) fut = ensure_future(fut, loop=loop) fut.add_done_callback(cb) try: # wait until the future completes or the timeout try: await waiter except exceptions.CancelledError: if fut.done(): return fut.result() else: fut.remove_done_callback(cb) # We must ensure that the task is not running # after wait_for() returns. # See https://bugs.python.org/issue32751 await _cancel_and_wait(fut, loop=loop) raise if fut.done(): return fut.result() else: fut.remove_done_callback(cb) # We must ensure that the task is not running # after wait_for() returns. # See https://bugs.python.org/issue32751 await _cancel_and_wait(fut, loop=loop) # In case task cancellation failed with some # exception, we should re-raise it # See https://bugs.python.org/issue40607 try: > return fut.result() E asyncio.exceptions.CancelledError /usr/lib/python3.9/asyncio/tasks.py:490: CancelledError The above exception was the direct cause of the following exception: self = def runtest(self) -> None: synchronized_obj = wrap_in_sync(self.obj) with MonkeyPatch.context() as c: c.setattr(self, "obj", synchronized_obj) > super().runtest() .tox/py39/lib/python3.9/site-packages/pytest_asyncio/plugin.py:426: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py39/lib/python3.9/site-packages/pytest_asyncio/plugin.py:642: in inner _loop.run_until_complete(task) /usr/lib/python3.9/asyncio/base_events.py:647: in run_until_complete return future.result() .tox/py39/lib/python3.9/site-packages/test_helper/async_timeout.py:9: in wrapper return await asyncio.wait_for(func(*args, **kwargs), timeout=timeout) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ fut = > timeout = 5 async def wait_for(fut, timeout, *, loop=None): """Wait for the single Future or coroutine to complete, with timeout. Coroutine will be wrapped in Task. Returns result of the Future or coroutine. When a timeout occurs, it cancels the task and raises TimeoutError. To avoid the task cancellation, wrap it in shield(). If the wait is cancelled, the task is also cancelled. This function is a coroutine. """ if loop is None: loop = events.get_running_loop() else: warnings.warn("The loop argument is deprecated since Python 3.8, " "and scheduled for removal in Python 3.10.", DeprecationWarning, stacklevel=2) if timeout is None: return await fut if timeout <= 0: fut = ensure_future(fut, loop=loop) if fut.done(): return fut.result() await _cancel_and_wait(fut, loop=loop) try: return fut.result() except exceptions.CancelledError as exc: raise exceptions.TimeoutError() from exc waiter = loop.create_future() timeout_handle = loop.call_later(timeout, _release_waiter, waiter) cb = functools.partial(_release_waiter, waiter) fut = ensure_future(fut, loop=loop) fut.add_done_callback(cb) try: # wait until the future completes or the timeout try: await waiter except exceptions.CancelledError: if fut.done(): return fut.result() else: fut.remove_done_callback(cb) # We must ensure that the task is not running # after wait_for() returns. # See https://bugs.python.org/issue32751 await _cancel_and_wait(fut, loop=loop) raise if fut.done(): return fut.result() else: fut.remove_done_callback(cb) # We must ensure that the task is not running # after wait_for() returns. # See https://bugs.python.org/issue32751 await _cancel_and_wait(fut, loop=loop) # In case task cancellation failed with some # exception, we should re-raise it # See https://bugs.python.org/issue40607 try: return fut.result() except exceptions.CancelledError as exc: > raise exceptions.TimeoutError() from exc E asyncio.exceptions.TimeoutError /usr/lib/python3.9/asyncio/tasks.py:492: TimeoutError ----------------------------- Captured stderr call ----------------------------- handleSignalingMessage handleOptions handleSignalingMessage handleOptions makeOffer connectionstatechanged new new have-local-offer handleSignalingMessage handleOffer makeAnswer connectionstatechanged new new have-remote-offer connectionstatechanged new new stable connectionstatechanged new new stable handleSignalingMessage handleAnswer acceptAnswer connectionstatechanged connecting checking stable connectionstatechanged connecting checking stable connectionstatechanged connecting checking stable connectionstatechanged connecting checking stable connectionstatechanged connecting checking stable connectionstatechanged connecting completed stable connectionstatechanged connecting completed stable connectionstatechanged connected completed stable connectionstatechanged connected completed stable connectionstatechanged connected completed closed connectionstatechanged connected completed closed connectionstatechanged closed closed closed connectionstatechanged closed closed closed connectionstatechanged closed completed closed connectionstatechanged closed closed closed ------------------------------ Captured log call ------------------------------- DEBUG crosslab.soa_client.connection_webrtc:connection_webrtc.py:208 handleSignalingMessage DEBUG crosslab.soa_client.connection_webrtc:connection_webrtc.py:283 handleOptions DEBUG crosslab.soa_client.connection_webrtc:connection_webrtc.py:208 handleSignalingMessage DEBUG crosslab.soa_client.connection_webrtc:connection_webrtc.py:283 handleOptions DEBUG crosslab.soa_client.connection_webrtc:connection_webrtc.py:219 makeOffer INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged new new have-local-offer DEBUG crosslab.soa_client.connection_webrtc:connection_webrtc.py:208 handleSignalingMessage DEBUG crosslab.soa_client.connection_webrtc:connection_webrtc.py:257 handleOffer DEBUG crosslab.soa_client.connection_webrtc:connection_webrtc.py:232 makeAnswer INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged new new have-remote-offer ERROR asyncio:base_events.py:1753 Exception in callback AsyncIOEventEmitter._emit_run..callback() at /workspaces/goldi2/crosslab/clients/soa/python/.tox/py39/lib/python3.9/site-packages/pyee/asyncio.py:97 handle: .callback() at /workspaces/goldi2/crosslab/clients/soa/python/.tox/py39/lib/python3.9/site-packages/pyee/asyncio.py:97> Traceback (most recent call last): File "/usr/lib/python3.9/asyncio/events.py", line 80, in _run self._context.run(self._callback, *self._args) File "/workspaces/goldi2/crosslab/clients/soa/python/.tox/py39/lib/python3.9/site-packages/pyee/asyncio.py", line 105, in callback self.emit("error", exc) File "/workspaces/goldi2/crosslab/clients/soa/python/.tox/py39/lib/python3.9/site-packages/pyee/asyncio.py", line 70, in emit return super().emit(event, *args, **kwargs) File "/workspaces/goldi2/crosslab/clients/soa/python/.tox/py39/lib/python3.9/site-packages/pyee/base.py", line 223, in emit self._emit_handle_potential_error(event, args[0] if args else None) File "/workspaces/goldi2/crosslab/clients/soa/python/.tox/py39/lib/python3.9/site-packages/pyee/base.py", line 181, in _emit_handle_potential_error raise error File "/workspaces/goldi2/crosslab/clients/soa/python/.tox/py39/lib/python3.9/site-packages/crosslab/soa_client/connection_webrtc.py", line 115, in _on_track label = event.track.id AttributeError: 'RemoteStreamTrack' object has no attribute 'track' INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged new new stable INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged new new stable DEBUG crosslab.soa_client.connection_webrtc:connection_webrtc.py:208 handleSignalingMessage DEBUG crosslab.soa_client.connection_webrtc:connection_webrtc.py:264 handleAnswer DEBUG crosslab.soa_client.connection_webrtc:connection_webrtc.py:249 acceptAnswer INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged connecting checking stable INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged connecting checking stable INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged connecting checking stable ERROR asyncio:base_events.py:1753 Exception in callback AsyncIOEventEmitter._emit_run..callback() at /workspaces/goldi2/crosslab/clients/soa/python/.tox/py39/lib/python3.9/site-packages/pyee/asyncio.py:97 handle: .callback() at /workspaces/goldi2/crosslab/clients/soa/python/.tox/py39/lib/python3.9/site-packages/pyee/asyncio.py:97> Traceback (most recent call last): File "/usr/lib/python3.9/asyncio/events.py", line 80, in _run self._context.run(self._callback, *self._args) File "/workspaces/goldi2/crosslab/clients/soa/python/.tox/py39/lib/python3.9/site-packages/pyee/asyncio.py", line 105, in callback self.emit("error", exc) File "/workspaces/goldi2/crosslab/clients/soa/python/.tox/py39/lib/python3.9/site-packages/pyee/asyncio.py", line 70, in emit return super().emit(event, *args, **kwargs) File "/workspaces/goldi2/crosslab/clients/soa/python/.tox/py39/lib/python3.9/site-packages/pyee/base.py", line 223, in emit self._emit_handle_potential_error(event, args[0] if args else None) File "/workspaces/goldi2/crosslab/clients/soa/python/.tox/py39/lib/python3.9/site-packages/pyee/base.py", line 181, in _emit_handle_potential_error raise error File "/workspaces/goldi2/crosslab/clients/soa/python/.tox/py39/lib/python3.9/site-packages/crosslab/soa_client/connection_webrtc.py", line 115, in _on_track label = event.track.id AttributeError: 'RemoteStreamTrack' object has no attribute 'track' INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged connecting checking stable INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged connecting checking stable INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged connecting completed stable INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged connecting completed stable INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged connected completed stable INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged connected completed stable INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged connected completed closed INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged connected completed closed INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged closed closed closed INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged closed closed closed INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged closed completed closed INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged closed closed closed =============================== warnings summary =============================== tests/test_webrtc_connection.py::test_webrtc_connection_data_only[True] tests/test_webrtc_connection.py::test_webrtc_connection_data_only[True] tests/test_webrtc_connection.py::test_webrtc_connection_data_only[False] tests/test_webrtc_connection.py::test_webrtc_connection_data_only[False] tests/test_webrtc_connection.py::test_webrtc_connection_video_only[True] tests/test_webrtc_connection.py::test_webrtc_connection_video_only[True] tests/test_webrtc_connection.py::test_webrtc_connection_video_only[False] tests/test_webrtc_connection.py::test_webrtc_connection_video_only[False] /workspaces/goldi2/crosslab/clients/soa/python/.tox/py39/lib/python3.9/site-packages/aiortc/rtcdtlstransport.py:206: DeprecationWarning: Attempting to mutate a Context after a Connection was created. In the future, this will raise an exception ctx.set_tlsext_use_srtp(b":".join(x.openssl_profile for x in srtp_profiles)) tests/test_websocket_connection.py::test_websocket_connection_data_only[True] /workspaces/goldi2/crosslab/clients/soa/python/.tox/py39/lib/python3.9/site-packages/_pytest/fixtures.py:1181: PytestRemovedIn9Warning: 'test_websocket_connection_data_only[True]' requested an async fixture 'server', with no plugin or hook that handled it. This is usually an error, as pytest does not natively support it. This will turn into an error in pytest 9. See: https://docs.pytest.org/en/stable/deprecations.html#sync-test-depending-on-async-fixture warnings.warn( tests/test_websocket_connection.py::test_websocket_connection_data_only[True] /workspaces/goldi2/crosslab/clients/soa/python/.tox/py39/lib/python3.9/site-packages/pytest_asyncio/plugin.py:598: PytestDeprecationWarning: asyncio test 'test_websocket_connection_data_only[True]' requested async @pytest.fixture 'server' in strict mode. You might want to use @pytest_asyncio.fixture or switch to auto mode. This will become an error in future versions of flake8-asyncio. warnings.warn( tests/test_websocket_connection.py::test_websocket_connection_data_only[False] /workspaces/goldi2/crosslab/clients/soa/python/.tox/py39/lib/python3.9/site-packages/_pytest/fixtures.py:1181: PytestRemovedIn9Warning: 'test_websocket_connection_data_only[False]' requested an async fixture 'server', with no plugin or hook that handled it. This is usually an error, as pytest does not natively support it. This will turn into an error in pytest 9. See: https://docs.pytest.org/en/stable/deprecations.html#sync-test-depending-on-async-fixture warnings.warn( tests/test_websocket_connection.py::test_websocket_connection_data_only[False] /workspaces/goldi2/crosslab/clients/soa/python/.tox/py39/lib/python3.9/site-packages/pytest_asyncio/plugin.py:598: PytestDeprecationWarning: asyncio test 'test_websocket_connection_data_only[False]' requested async @pytest.fixture 'server' in strict mode. You might want to use @pytest_asyncio.fixture or switch to auto mode. This will become an error in future versions of flake8-asyncio. warnings.warn( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info ============================ FAILED tests/test_webrtc_connection.py::test_webrtc_connection_video_only[False] ================== 1 failed, 9 passed, 12 warnings in 21.33s =================== /usr/lib/python3.9/logging/__init__.py:2141: RuntimeWarning: coroutine 'CrosslabHandler.flush' was never awaited h.flush() RuntimeWarning: Enable tracemalloc to get the object allocation traceback py39: exit 1 (22.35 seconds) /workspaces/goldi2/crosslab/clients/soa/python> coverage run --source crosslab.soa_client -m pytest pid=9672 py39: FAIL ✖ in 48.45 seconds py310: remove tox env folder /workspaces/goldi2/crosslab/clients/soa/python/.tox/py310 py310: install_deps> python -I -m pip install coverage pyee pytest pytest-aiohttp pytest-asyncio python-dateutil dependencies/api-client.tar.gz dependencies/python-test-helper.tar.gz py310: install_package_deps> python -I -m pip install 'aiortc>=1.10.1' crosslab_api_client py310: install_package> python -I -m pip install --force-reinstall --no-deps /workspaces/goldi2/crosslab/clients/soa/python/.tox/.tmp/package/63/crosslab_soa_client-0.2.8+dev.ee88c7e5.tar.gz py310: commands[0]> coverage run --source crosslab.soa_client -m pytest ============================= test session starts ============================== platform linux -- Python 3.10.12, pytest-8.4.1, pluggy-1.6.0 cachedir: .tox/py310/.pytest_cache rootdir: /workspaces/goldi2/crosslab/clients/soa/python configfile: pyproject.toml plugins: aiohttp-1.1.0, asyncio-1.1.0 asyncio: mode=strict, asyncio_default_fixture_loop_scope=function, asyncio_default_test_loop_scope=function collected 10 items tests/test_device_handler.py .. [ 20%] tests/test_local_connection.py .. [ 40%] tests/test_webrtc_connection.py ...F [ 80%] tests/test_websocket_connection.py .. [100%] =================================== FAILURES =================================== ___________________ test_webrtc_connection_video_only[False] ___________________ tiebreaker = False @pytest.mark.asyncio @pytest.mark.parametrize("tiebreaker", [True, False]) @timeout(5) async def test_webrtc_connection_video_only(tiebreaker: bool): asyncException = AsyncException() serviceConfig = { "serviceType": "http://example.com/data-only", "serviceId": "data", "remoteServiceId": "data", } player = MediaPlayer( os.path.join(os.path.dirname(os.path.abspath(__file__)), "test.mp4"), decode=True, ) track = player.video localService = ServiceStub("video", outTrack=track) remoteService = ServiceStub("video", receiveVideo=True) local = WebRTCPeerConnection() remote = WebRTCPeerConnection() local.on("error", lambda error: asyncException.set(error)) remote.on("error", lambda error: asyncException.set(error)) async def onLocalSignalingMessage(message: SignalingMessage): await remote.handleSignalingMessage( { "messageType": "signaling", "connectionUrl": "connection.url", "content": message["content"], "signalingType": message["signalingType"], } ) async def onRemoteSignalingMessage(message: SignalingMessage): await local.handleSignalingMessage( { "messageType": "signaling", "connectionUrl": "connection.url", "content": message["content"], "signalingType": message["signalingType"], } ) local.on("signaling", onLocalSignalingMessage) remote.on("signaling", onRemoteSignalingMessage) local.tiebreaker = tiebreaker remote.tiebreaker = not tiebreaker localReceiverDir = "sendrecv" if tiebreaker else "sendonly" remoteReceiverDir = "recvonly" if tiebreaker else "sendrecv" > with NoReferenceLeaks("crosslab"): tests/test_webrtc_connection.py:136: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py310/lib/python3.10/site-packages/test_helper/no_reference_leaks.py:67: in __exit__ raise exc_val tests/test_webrtc_connection.py:144: in test_webrtc_connection_video_only await wait( tests/helpers/async_exception.py:44: in wait result = await next(r) /usr/lib/python3.10/asyncio/tasks.py:567: in _wait_for_one f = await done.get() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def get(self): """Remove and return an item from the queue. If queue is empty, wait until an item is available. """ while self.empty(): getter = self._get_loop().create_future() self._getters.append(getter) try: > await getter E asyncio.exceptions.CancelledError /usr/lib/python3.10/asyncio/queues.py:159: CancelledError During handling of the above exception, another exception occurred: fut = > timeout = 5 async def wait_for(fut, timeout): """Wait for the single Future or coroutine to complete, with timeout. Coroutine will be wrapped in Task. Returns result of the Future or coroutine. When a timeout occurs, it cancels the task and raises TimeoutError. To avoid the task cancellation, wrap it in shield(). If the wait is cancelled, the task is also cancelled. This function is a coroutine. """ loop = events.get_running_loop() if timeout is None: return await fut if timeout <= 0: fut = ensure_future(fut, loop=loop) if fut.done(): return fut.result() await _cancel_and_wait(fut, loop=loop) try: return fut.result() except exceptions.CancelledError as exc: raise exceptions.TimeoutError() from exc waiter = loop.create_future() timeout_handle = loop.call_later(timeout, _release_waiter, waiter) cb = functools.partial(_release_waiter, waiter) fut = ensure_future(fut, loop=loop) fut.add_done_callback(cb) try: # wait until the future completes or the timeout try: await waiter except exceptions.CancelledError: if fut.done(): return fut.result() else: fut.remove_done_callback(cb) # We must ensure that the task is not running # after wait_for() returns. # See https://bugs.python.org/issue32751 await _cancel_and_wait(fut, loop=loop) raise if fut.done(): return fut.result() else: fut.remove_done_callback(cb) # We must ensure that the task is not running # after wait_for() returns. # See https://bugs.python.org/issue32751 await _cancel_and_wait(fut, loop=loop) # In case task cancellation failed with some # exception, we should re-raise it # See https://bugs.python.org/issue40607 try: > return fut.result() E asyncio.exceptions.CancelledError /usr/lib/python3.10/asyncio/tasks.py:456: CancelledError The above exception was the direct cause of the following exception: self = def runtest(self) -> None: synchronized_obj = wrap_in_sync(self.obj) with MonkeyPatch.context() as c: c.setattr(self, "obj", synchronized_obj) > super().runtest() .tox/py310/lib/python3.10/site-packages/pytest_asyncio/plugin.py:426: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py310/lib/python3.10/site-packages/pytest_asyncio/plugin.py:642: in inner _loop.run_until_complete(task) /usr/lib/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() .tox/py310/lib/python3.10/site-packages/test_helper/async_timeout.py:9: in wrapper return await asyncio.wait_for(func(*args, **kwargs), timeout=timeout) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ fut = > timeout = 5 async def wait_for(fut, timeout): """Wait for the single Future or coroutine to complete, with timeout. Coroutine will be wrapped in Task. Returns result of the Future or coroutine. When a timeout occurs, it cancels the task and raises TimeoutError. To avoid the task cancellation, wrap it in shield(). If the wait is cancelled, the task is also cancelled. This function is a coroutine. """ loop = events.get_running_loop() if timeout is None: return await fut if timeout <= 0: fut = ensure_future(fut, loop=loop) if fut.done(): return fut.result() await _cancel_and_wait(fut, loop=loop) try: return fut.result() except exceptions.CancelledError as exc: raise exceptions.TimeoutError() from exc waiter = loop.create_future() timeout_handle = loop.call_later(timeout, _release_waiter, waiter) cb = functools.partial(_release_waiter, waiter) fut = ensure_future(fut, loop=loop) fut.add_done_callback(cb) try: # wait until the future completes or the timeout try: await waiter except exceptions.CancelledError: if fut.done(): return fut.result() else: fut.remove_done_callback(cb) # We must ensure that the task is not running # after wait_for() returns. # See https://bugs.python.org/issue32751 await _cancel_and_wait(fut, loop=loop) raise if fut.done(): return fut.result() else: fut.remove_done_callback(cb) # We must ensure that the task is not running # after wait_for() returns. # See https://bugs.python.org/issue32751 await _cancel_and_wait(fut, loop=loop) # In case task cancellation failed with some # exception, we should re-raise it # See https://bugs.python.org/issue40607 try: return fut.result() except exceptions.CancelledError as exc: > raise exceptions.TimeoutError() from exc E asyncio.exceptions.TimeoutError /usr/lib/python3.10/asyncio/tasks.py:458: TimeoutError ----------------------------- Captured stderr call ----------------------------- handleSignalingMessage handleOptions handleSignalingMessage handleOptions makeOffer connectionstatechanged new new have-local-offer handleSignalingMessage handleOffer makeAnswer connectionstatechanged new new have-remote-offer connectionstatechanged new new stable connectionstatechanged new new stable handleSignalingMessage handleAnswer acceptAnswer connectionstatechanged connecting checking stable connectionstatechanged connecting checking stable connectionstatechanged connecting checking stable connectionstatechanged connecting checking stable connectionstatechanged connecting checking stable connectionstatechanged connecting completed stable connectionstatechanged connecting completed stable connectionstatechanged connected completed stable connectionstatechanged connected completed stable connectionstatechanged connected completed closed connectionstatechanged connected completed closed connectionstatechanged closed closed closed connectionstatechanged closed closed closed connectionstatechanged closed completed closed connectionstatechanged closed closed closed ------------------------------ Captured log call ------------------------------- DEBUG crosslab.soa_client.connection_webrtc:connection_webrtc.py:208 handleSignalingMessage DEBUG crosslab.soa_client.connection_webrtc:connection_webrtc.py:283 handleOptions DEBUG crosslab.soa_client.connection_webrtc:connection_webrtc.py:208 handleSignalingMessage DEBUG crosslab.soa_client.connection_webrtc:connection_webrtc.py:283 handleOptions DEBUG crosslab.soa_client.connection_webrtc:connection_webrtc.py:219 makeOffer INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged new new have-local-offer DEBUG crosslab.soa_client.connection_webrtc:connection_webrtc.py:208 handleSignalingMessage DEBUG crosslab.soa_client.connection_webrtc:connection_webrtc.py:257 handleOffer DEBUG crosslab.soa_client.connection_webrtc:connection_webrtc.py:232 makeAnswer INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged new new have-remote-offer ERROR asyncio:base_events.py:1758 Exception in callback AsyncIOEventEmitter._emit_run..callback() at /workspaces/goldi2/crosslab/clients/soa/python/.tox/py310/lib/python3.10/site-packages/pyee/asyncio.py:97 handle: .callback() at /workspaces/goldi2/crosslab/clients/soa/python/.tox/py310/lib/python3.10/site-packages/pyee/asyncio.py:97> Traceback (most recent call last): File "/usr/lib/python3.10/asyncio/events.py", line 80, in _run self._context.run(self._callback, *self._args) File "/workspaces/goldi2/crosslab/clients/soa/python/.tox/py310/lib/python3.10/site-packages/pyee/asyncio.py", line 105, in callback self.emit("error", exc) File "/workspaces/goldi2/crosslab/clients/soa/python/.tox/py310/lib/python3.10/site-packages/pyee/asyncio.py", line 70, in emit return super().emit(event, *args, **kwargs) File "/workspaces/goldi2/crosslab/clients/soa/python/.tox/py310/lib/python3.10/site-packages/pyee/base.py", line 223, in emit self._emit_handle_potential_error(event, args[0] if args else None) File "/workspaces/goldi2/crosslab/clients/soa/python/.tox/py310/lib/python3.10/site-packages/pyee/base.py", line 181, in _emit_handle_potential_error raise error File "/workspaces/goldi2/crosslab/clients/soa/python/.tox/py310/lib/python3.10/site-packages/crosslab/soa_client/connection_webrtc.py", line 115, in _on_track label = event.track.id AttributeError: 'RemoteStreamTrack' object has no attribute 'track' INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged new new stable INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged new new stable DEBUG crosslab.soa_client.connection_webrtc:connection_webrtc.py:208 handleSignalingMessage DEBUG crosslab.soa_client.connection_webrtc:connection_webrtc.py:264 handleAnswer DEBUG crosslab.soa_client.connection_webrtc:connection_webrtc.py:249 acceptAnswer INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged connecting checking stable INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged connecting checking stable INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged connecting checking stable ERROR asyncio:base_events.py:1758 Exception in callback AsyncIOEventEmitter._emit_run..callback() at /workspaces/goldi2/crosslab/clients/soa/python/.tox/py310/lib/python3.10/site-packages/pyee/asyncio.py:97 handle: .callback() at /workspaces/goldi2/crosslab/clients/soa/python/.tox/py310/lib/python3.10/site-packages/pyee/asyncio.py:97> Traceback (most recent call last): File "/usr/lib/python3.10/asyncio/events.py", line 80, in _run self._context.run(self._callback, *self._args) File "/workspaces/goldi2/crosslab/clients/soa/python/.tox/py310/lib/python3.10/site-packages/pyee/asyncio.py", line 105, in callback self.emit("error", exc) File "/workspaces/goldi2/crosslab/clients/soa/python/.tox/py310/lib/python3.10/site-packages/pyee/asyncio.py", line 70, in emit return super().emit(event, *args, **kwargs) File "/workspaces/goldi2/crosslab/clients/soa/python/.tox/py310/lib/python3.10/site-packages/pyee/base.py", line 223, in emit self._emit_handle_potential_error(event, args[0] if args else None) File "/workspaces/goldi2/crosslab/clients/soa/python/.tox/py310/lib/python3.10/site-packages/pyee/base.py", line 181, in _emit_handle_potential_error raise error File "/workspaces/goldi2/crosslab/clients/soa/python/.tox/py310/lib/python3.10/site-packages/crosslab/soa_client/connection_webrtc.py", line 115, in _on_track label = event.track.id AttributeError: 'RemoteStreamTrack' object has no attribute 'track' INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged connecting checking stable INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged connecting checking stable INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged connecting completed stable INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged connecting completed stable INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged connected completed stable INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged connected completed stable INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged connected completed closed INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged connected completed closed INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged closed closed closed INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged closed closed closed INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged closed completed closed INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged closed closed closed =============================== warnings summary =============================== tests/test_webrtc_connection.py::test_webrtc_connection_data_only[True] tests/test_webrtc_connection.py::test_webrtc_connection_data_only[True] tests/test_webrtc_connection.py::test_webrtc_connection_data_only[False] tests/test_webrtc_connection.py::test_webrtc_connection_data_only[False] tests/test_webrtc_connection.py::test_webrtc_connection_video_only[True] tests/test_webrtc_connection.py::test_webrtc_connection_video_only[True] tests/test_webrtc_connection.py::test_webrtc_connection_video_only[False] tests/test_webrtc_connection.py::test_webrtc_connection_video_only[False] /workspaces/goldi2/crosslab/clients/soa/python/.tox/py310/lib/python3.10/site-packages/aiortc/rtcdtlstransport.py:206: DeprecationWarning: Attempting to mutate a Context after a Connection was created. In the future, this will raise an exception ctx.set_tlsext_use_srtp(b":".join(x.openssl_profile for x in srtp_profiles)) tests/test_websocket_connection.py::test_websocket_connection_data_only[True] /workspaces/goldi2/crosslab/clients/soa/python/.tox/py310/lib/python3.10/site-packages/_pytest/fixtures.py:1181: PytestRemovedIn9Warning: 'test_websocket_connection_data_only[True]' requested an async fixture 'server', with no plugin or hook that handled it. This is usually an error, as pytest does not natively support it. This will turn into an error in pytest 9. See: https://docs.pytest.org/en/stable/deprecations.html#sync-test-depending-on-async-fixture warnings.warn( tests/test_websocket_connection.py::test_websocket_connection_data_only[True] /workspaces/goldi2/crosslab/clients/soa/python/.tox/py310/lib/python3.10/site-packages/pytest_asyncio/plugin.py:598: PytestDeprecationWarning: asyncio test 'test_websocket_connection_data_only[True]' requested async @pytest.fixture 'server' in strict mode. You might want to use @pytest_asyncio.fixture or switch to auto mode. This will become an error in future versions of flake8-asyncio. warnings.warn( tests/test_websocket_connection.py::test_websocket_connection_data_only[False] /workspaces/goldi2/crosslab/clients/soa/python/.tox/py310/lib/python3.10/site-packages/_pytest/fixtures.py:1181: PytestRemovedIn9Warning: 'test_websocket_connection_data_only[False]' requested an async fixture 'server', with no plugin or hook that handled it. This is usually an error, as pytest does not natively support it. This will turn into an error in pytest 9. See: https://docs.pytest.org/en/stable/deprecations.html#sync-test-depending-on-async-fixture warnings.warn( tests/test_websocket_connection.py::test_websocket_connection_data_only[False] /workspaces/goldi2/crosslab/clients/soa/python/.tox/py310/lib/python3.10/site-packages/pytest_asyncio/plugin.py:598: PytestDeprecationWarning: asyncio test 'test_websocket_connection_data_only[False]' requested async @pytest.fixture 'server' in strict mode. You might want to use @pytest_asyncio.fixture or switch to auto mode. This will become an error in future versions of flake8-asyncio. warnings.warn( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info ============================ FAILED tests/test_webrtc_connection.py::test_webrtc_connection_video_only[False] ================== 1 failed, 9 passed, 12 warnings in 21.99s =================== /usr/lib/python3.10/logging/__init__.py:2182: RuntimeWarning: coroutine 'CrosslabHandler.flush' was never awaited h.flush() RuntimeWarning: Enable tracemalloc to get the object allocation traceback py310: exit 1 (23.16 seconds) /workspaces/goldi2/crosslab/clients/soa/python> coverage run --source crosslab.soa_client -m pytest pid=9895 py311: remove tox env folder /workspaces/goldi2/crosslab/clients/soa/python/.tox/py311 py310: FAIL ✖ in 39.22 seconds py311: install_deps> python -I -m pip install coverage pyee pytest pytest-aiohttp pytest-asyncio python-dateutil dependencies/api-client.tar.gz dependencies/python-test-helper.tar.gz py311: install_package_deps> python -I -m pip install 'aiortc>=1.10.1' crosslab_api_client py311: install_package> python -I -m pip install --force-reinstall --no-deps /workspaces/goldi2/crosslab/clients/soa/python/.tox/.tmp/package/64/crosslab_soa_client-0.2.8+dev.ee88c7e5.tar.gz py311: commands[0]> coverage run --source crosslab.soa_client -m pytest ============================= test session starts ============================== platform linux -- Python 3.11.11, pytest-8.4.1, pluggy-1.6.0 cachedir: .tox/py311/.pytest_cache rootdir: /workspaces/goldi2/crosslab/clients/soa/python configfile: pyproject.toml plugins: aiohttp-1.1.0, asyncio-1.1.0 asyncio: mode=Mode.STRICT, asyncio_default_fixture_loop_scope=function, asyncio_default_test_loop_scope=function collected 10 items tests/test_device_handler.py .. [ 20%] tests/test_local_connection.py .. [ 40%] tests/test_webrtc_connection.py ...F [ 80%] tests/test_websocket_connection.py .. [100%] =================================== FAILURES =================================== ___________________ test_webrtc_connection_video_only[False] ___________________ tiebreaker = False @pytest.mark.asyncio @pytest.mark.parametrize("tiebreaker", [True, False]) @timeout(5) async def test_webrtc_connection_video_only(tiebreaker: bool): asyncException = AsyncException() serviceConfig = { "serviceType": "http://example.com/data-only", "serviceId": "data", "remoteServiceId": "data", } player = MediaPlayer( os.path.join(os.path.dirname(os.path.abspath(__file__)), "test.mp4"), decode=True, ) track = player.video localService = ServiceStub("video", outTrack=track) remoteService = ServiceStub("video", receiveVideo=True) local = WebRTCPeerConnection() remote = WebRTCPeerConnection() local.on("error", lambda error: asyncException.set(error)) remote.on("error", lambda error: asyncException.set(error)) async def onLocalSignalingMessage(message: SignalingMessage): await remote.handleSignalingMessage( { "messageType": "signaling", "connectionUrl": "connection.url", "content": message["content"], "signalingType": message["signalingType"], } ) async def onRemoteSignalingMessage(message: SignalingMessage): await local.handleSignalingMessage( { "messageType": "signaling", "connectionUrl": "connection.url", "content": message["content"], "signalingType": message["signalingType"], } ) local.on("signaling", onLocalSignalingMessage) remote.on("signaling", onRemoteSignalingMessage) local.tiebreaker = tiebreaker remote.tiebreaker = not tiebreaker localReceiverDir = "sendrecv" if tiebreaker else "sendonly" remoteReceiverDir = "recvonly" if tiebreaker else "sendrecv" > with NoReferenceLeaks("crosslab"): tests/test_webrtc_connection.py:136: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py311/lib/python3.11/site-packages/test_helper/no_reference_leaks.py:67: in __exit__ raise exc_val tests/test_webrtc_connection.py:144: in test_webrtc_connection_video_only await wait( tests/helpers/async_exception.py:44: in wait result = await next(r) ^^^^^^^^^^^^^ /usr/lib/python3.11/asyncio/tasks.py:611: in _wait_for_one f = await done.get() ^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def get(self): """Remove and return an item from the queue. If queue is empty, wait until an item is available. """ while self.empty(): getter = self._get_loop().create_future() self._getters.append(getter) try: > await getter E asyncio.exceptions.CancelledError /usr/lib/python3.11/asyncio/queues.py:158: CancelledError The above exception was the direct cause of the following exception: self = def runtest(self) -> None: synchronized_obj = wrap_in_sync(self.obj) with MonkeyPatch.context() as c: c.setattr(self, "obj", synchronized_obj) > super().runtest() .tox/py311/lib/python3.11/site-packages/pytest_asyncio/plugin.py:426: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py311/lib/python3.11/site-packages/pytest_asyncio/plugin.py:642: in inner _loop.run_until_complete(task) /usr/lib/python3.11/asyncio/base_events.py:654: in run_until_complete return future.result() ^^^^^^^^^^^^^^^ .tox/py311/lib/python3.11/site-packages/test_helper/async_timeout.py:9: in wrapper return await asyncio.wait_for(func(*args, **kwargs), timeout=timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ fut = > timeout = 5 async def wait_for(fut, timeout): """Wait for the single Future or coroutine to complete, with timeout. Coroutine will be wrapped in Task. Returns result of the Future or coroutine. When a timeout occurs, it cancels the task and raises TimeoutError. To avoid the task cancellation, wrap it in shield(). If the wait is cancelled, the task is also cancelled. This function is a coroutine. """ loop = events.get_running_loop() if timeout is None: return await fut if timeout <= 0: fut = ensure_future(fut, loop=loop) if fut.done(): return fut.result() await _cancel_and_wait(fut, loop=loop) try: return fut.result() except exceptions.CancelledError as exc: raise exceptions.TimeoutError() from exc waiter = loop.create_future() timeout_handle = loop.call_later(timeout, _release_waiter, waiter) cb = functools.partial(_release_waiter, waiter) fut = ensure_future(fut, loop=loop) fut.add_done_callback(cb) try: # wait until the future completes or the timeout try: await waiter except exceptions.CancelledError: if fut.done(): return fut.result() else: fut.remove_done_callback(cb) # We must ensure that the task is not running # after wait_for() returns. # See https://bugs.python.org/issue32751 await _cancel_and_wait(fut, loop=loop) raise if fut.done(): return fut.result() else: fut.remove_done_callback(cb) # We must ensure that the task is not running # after wait_for() returns. # See https://bugs.python.org/issue32751 await _cancel_and_wait(fut, loop=loop) # In case task cancellation failed with some # exception, we should re-raise it # See https://bugs.python.org/issue40607 try: return fut.result() except exceptions.CancelledError as exc: > raise exceptions.TimeoutError() from exc E TimeoutError /usr/lib/python3.11/asyncio/tasks.py:502: TimeoutError ----------------------------- Captured stderr call ----------------------------- handleSignalingMessage handleOptions handleSignalingMessage handleOptions makeOffer connectionstatechanged new new have-local-offer handleSignalingMessage handleOffer makeAnswer connectionstatechanged new new have-remote-offer connectionstatechanged new new stable connectionstatechanged new new stable handleSignalingMessage handleAnswer acceptAnswer connectionstatechanged connecting checking stable connectionstatechanged connecting checking stable connectionstatechanged connecting checking stable connectionstatechanged connecting checking stable connectionstatechanged connecting checking stable connectionstatechanged connecting completed stable connectionstatechanged connecting completed stable connectionstatechanged connected completed stable connectionstatechanged connected completed stable connectionstatechanged connected completed closed connectionstatechanged connected completed closed connectionstatechanged closed closed closed connectionstatechanged closed closed closed connectionstatechanged closed completed closed connectionstatechanged closed closed closed ------------------------------ Captured log call ------------------------------- DEBUG crosslab.soa_client.connection_webrtc:connection_webrtc.py:208 handleSignalingMessage DEBUG crosslab.soa_client.connection_webrtc:connection_webrtc.py:283 handleOptions DEBUG crosslab.soa_client.connection_webrtc:connection_webrtc.py:208 handleSignalingMessage DEBUG crosslab.soa_client.connection_webrtc:connection_webrtc.py:283 handleOptions DEBUG crosslab.soa_client.connection_webrtc:connection_webrtc.py:219 makeOffer INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged new new have-local-offer DEBUG crosslab.soa_client.connection_webrtc:connection_webrtc.py:208 handleSignalingMessage DEBUG crosslab.soa_client.connection_webrtc:connection_webrtc.py:257 handleOffer DEBUG crosslab.soa_client.connection_webrtc:connection_webrtc.py:232 makeAnswer INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged new new have-remote-offer ERROR asyncio:base_events.py:1785 Exception in callback AsyncIOEventEmitter._emit_run..callback() at /workspaces/goldi2/crosslab/clients/soa/python/.tox/py311/lib/python3.11/site-packages/pyee/asyncio.py:97 handle: .callback() at /workspaces/goldi2/crosslab/clients/soa/python/.tox/py311/lib/python3.11/site-packages/pyee/asyncio.py:97> Traceback (most recent call last): File "/usr/lib/python3.11/asyncio/events.py", line 84, in _run self._context.run(self._callback, *self._args) File "/workspaces/goldi2/crosslab/clients/soa/python/.tox/py311/lib/python3.11/site-packages/pyee/asyncio.py", line 105, in callback self.emit("error", exc) File "/workspaces/goldi2/crosslab/clients/soa/python/.tox/py311/lib/python3.11/site-packages/pyee/asyncio.py", line 70, in emit return super().emit(event, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/workspaces/goldi2/crosslab/clients/soa/python/.tox/py311/lib/python3.11/site-packages/pyee/base.py", line 223, in emit self._emit_handle_potential_error(event, args[0] if args else None) File "/workspaces/goldi2/crosslab/clients/soa/python/.tox/py311/lib/python3.11/site-packages/pyee/base.py", line 181, in _emit_handle_potential_error raise error File "/workspaces/goldi2/crosslab/clients/soa/python/.tox/py311/lib/python3.11/site-packages/crosslab/soa_client/connection_webrtc.py", line 115, in _on_track label = event.track.id ^^^^^^^^^^^ AttributeError: 'RemoteStreamTrack' object has no attribute 'track' INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged new new stable INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged new new stable DEBUG crosslab.soa_client.connection_webrtc:connection_webrtc.py:208 handleSignalingMessage DEBUG crosslab.soa_client.connection_webrtc:connection_webrtc.py:264 handleAnswer DEBUG crosslab.soa_client.connection_webrtc:connection_webrtc.py:249 acceptAnswer INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged connecting checking stable INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged connecting checking stable INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged connecting checking stable ERROR asyncio:base_events.py:1785 Exception in callback AsyncIOEventEmitter._emit_run..callback() at /workspaces/goldi2/crosslab/clients/soa/python/.tox/py311/lib/python3.11/site-packages/pyee/asyncio.py:97 handle: .callback() at /workspaces/goldi2/crosslab/clients/soa/python/.tox/py311/lib/python3.11/site-packages/pyee/asyncio.py:97> Traceback (most recent call last): File "/usr/lib/python3.11/asyncio/events.py", line 84, in _run self._context.run(self._callback, *self._args) File "/workspaces/goldi2/crosslab/clients/soa/python/.tox/py311/lib/python3.11/site-packages/pyee/asyncio.py", line 105, in callback self.emit("error", exc) File "/workspaces/goldi2/crosslab/clients/soa/python/.tox/py311/lib/python3.11/site-packages/pyee/asyncio.py", line 70, in emit return super().emit(event, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/workspaces/goldi2/crosslab/clients/soa/python/.tox/py311/lib/python3.11/site-packages/pyee/base.py", line 223, in emit self._emit_handle_potential_error(event, args[0] if args else None) File "/workspaces/goldi2/crosslab/clients/soa/python/.tox/py311/lib/python3.11/site-packages/pyee/base.py", line 181, in _emit_handle_potential_error raise error File "/workspaces/goldi2/crosslab/clients/soa/python/.tox/py311/lib/python3.11/site-packages/crosslab/soa_client/connection_webrtc.py", line 115, in _on_track label = event.track.id ^^^^^^^^^^^ AttributeError: 'RemoteStreamTrack' object has no attribute 'track' INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged connecting checking stable INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged connecting checking stable INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged connecting completed stable INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged connecting completed stable INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged connected completed stable INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged connected completed stable INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged connected completed closed INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged connected completed closed INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged closed closed closed INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged closed closed closed INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged closed completed closed INFO crosslab.soa_client.connection_webrtc:connection_webrtc.py:64 connectionstatechanged closed closed closed =============================== warnings summary =============================== tests/test_webrtc_connection.py::test_webrtc_connection_data_only[True] tests/test_webrtc_connection.py::test_webrtc_connection_data_only[True] tests/test_webrtc_connection.py::test_webrtc_connection_data_only[False] tests/test_webrtc_connection.py::test_webrtc_connection_data_only[False] tests/test_webrtc_connection.py::test_webrtc_connection_video_only[True] tests/test_webrtc_connection.py::test_webrtc_connection_video_only[True] tests/test_webrtc_connection.py::test_webrtc_connection_video_only[False] tests/test_webrtc_connection.py::test_webrtc_connection_video_only[False] /workspaces/goldi2/crosslab/clients/soa/python/.tox/py311/lib/python3.11/site-packages/aiortc/rtcdtlstransport.py:206: DeprecationWarning: Attempting to mutate a Context after a Connection was created. In the future, this will raise an exception ctx.set_tlsext_use_srtp(b":".join(x.openssl_profile for x in srtp_profiles)) tests/test_websocket_connection.py::test_websocket_connection_data_only[True] /workspaces/goldi2/crosslab/clients/soa/python/.tox/py311/lib/python3.11/site-packages/_pytest/fixtures.py:1181: PytestRemovedIn9Warning: 'test_websocket_connection_data_only[True]' requested an async fixture 'server', with no plugin or hook that handled it. This is usually an error, as pytest does not natively support it. This will turn into an error in pytest 9. See: https://docs.pytest.org/en/stable/deprecations.html#sync-test-depending-on-async-fixture warnings.warn( tests/test_websocket_connection.py::test_websocket_connection_data_only[True] /workspaces/goldi2/crosslab/clients/soa/python/.tox/py311/lib/python3.11/site-packages/pytest_asyncio/plugin.py:598: PytestDeprecationWarning: asyncio test 'test_websocket_connection_data_only[True]' requested async @pytest.fixture 'server' in strict mode. You might want to use @pytest_asyncio.fixture or switch to auto mode. This will become an error in future versions of flake8-asyncio. warnings.warn( tests/test_websocket_connection.py::test_websocket_connection_data_only[False] /workspaces/goldi2/crosslab/clients/soa/python/.tox/py311/lib/python3.11/site-packages/_pytest/fixtures.py:1181: PytestRemovedIn9Warning: 'test_websocket_connection_data_only[False]' requested an async fixture 'server', with no plugin or hook that handled it. This is usually an error, as pytest does not natively support it. This will turn into an error in pytest 9. See: https://docs.pytest.org/en/stable/deprecations.html#sync-test-depending-on-async-fixture warnings.warn( tests/test_websocket_connection.py::test_websocket_connection_data_only[False] /workspaces/goldi2/crosslab/clients/soa/python/.tox/py311/lib/python3.11/site-packages/pytest_asyncio/plugin.py:598: PytestDeprecationWarning: asyncio test 'test_websocket_connection_data_only[False]' requested async @pytest.fixture 'server' in strict mode. You might want to use @pytest_asyncio.fixture or switch to auto mode. This will become an error in future versions of flake8-asyncio. warnings.warn( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info ============================ FAILED tests/test_webrtc_connection.py::test_webrtc_connection_video_only[False] ================== 1 failed, 9 passed, 12 warnings in 33.25s =================== /usr/lib/python3.11/logging/__init__.py:2185: RuntimeWarning: coroutine 'CrosslabHandler.flush' was never awaited h.flush() RuntimeWarning: Enable tracemalloc to get the object allocation traceback py311: exit 1 (35.03 seconds) /workspaces/goldi2/crosslab/clients/soa/python> coverage run --source crosslab.soa_client -m pytest pid=10125 py312: remove tox env folder /workspaces/goldi2/crosslab/clients/soa/python/.tox/py312 py311: FAIL ✖ in 57.7 seconds py312: skipped because could not find python interpreter with spec(s): py312 py312: SKIP ⚠ in 0.09 seconds py313: remove tox env folder /workspaces/goldi2/crosslab/clients/soa/python/.tox/py313 py313: skipped because could not find python interpreter with spec(s): py313 py313: SKIP ⚠ in 0.02 seconds coverage: remove tox env folder /workspaces/goldi2/crosslab/clients/soa/python/.tox/coverage coverage: install_deps> python -I -m pip install coverage coverage: commands[0]> coverage combine Combined data file .coverage.0128de5a604a.10125.XGTrwgwx Combined data file .coverage.0128de5a604a.9672.XRjdxDGx Combined data file .coverage.0128de5a604a.9895.XUBcQKkx coverage: commands[1]> coverage report Name Stmts Miss Cover ---------------------------------------------------------------------------- src/crosslab/soa_client/__init__.py 0 0 100% src/crosslab/soa_client/connection.py 64 9 86% src/crosslab/soa_client/connection_local.py 43 29 33% src/crosslab/soa_client/connection_webrtc.py 205 25 88% src/crosslab/soa_client/connection_websocket.py 90 67 26% src/crosslab/soa_client/device_handler.py 147 56 62% src/crosslab/soa_client/logging.py 47 24 49% src/crosslab/soa_client/message_handling.py 0 0 100% src/crosslab/soa_client/messages.py 46 0 100% src/crosslab/soa_client/service.py 17 3 82% src/crosslab/soa_client/test_helper/__init__.py 2 0 100% src/crosslab/soa_client/test_helper/connection_stub.py 28 20 29% src/crosslab/soa_client/test_helper/service_stub.py 96 2 98% ---------------------------------------------------------------------------- TOTAL 785 235 70% coverage: commands[2]> coverage xml Wrote XML report to coverage.xml py39: FAIL code 1 (48.45=setup[26.11]+cmd[22.35] seconds) py310: FAIL code 1 (39.22=setup[16.05]+cmd[23.16] seconds) py311: FAIL code 1 (57.70=setup[22.67]+cmd[35.03] seconds) py312: SKIP (0.09 seconds) py313: SKIP (0.02 seconds) coverage: OK (4.50=setup[3.77]+cmd[0.17,0.28,0.28] seconds) evaluation failed :( (150.09 seconds)