parsec-cloud icon indicating copy to clipboard operation
parsec-cloud copied to clipboard

Flaky test `tests/test_time_provider.py::test_sleep_in_nursery[raw]`

Open FirelightFlagboy opened this issue 3 years ago • 0 comments

 =================================== FAILURES ===================================
__________________________ test_sleep_in_nursery[raw] __________________________
[gw1] linux -- Python 3.9.14 /home/runner/.cache/pypoetry/virtualenvs/parsec-cloud-dZ-E5qY_-py3.9/bin/python
trio.MultiError: Cancelled(), Cancelled()

Details of embedded exception 1:

  Traceback (most recent call last):
    File "/home/runner/.cache/pypoetry/virtualenvs/parsec-cloud-dZ-E5qY_-py3.9/lib/python3.9/site-packages/trio/_timeouts.py", line 106, in fail_at
      yield scope
    File "/home/runner/work/parsec-cloud/parsec-cloud/tests/test_time_provider.py", line 189, in test_sleep_in_nursery
      await wait_for_sleeping_stat(tp, 0)
    File "/home/runner/.cache/pypoetry/virtualenvs/parsec-cloud-dZ-E5qY_-py3.9/lib/python3.9/site-packages/trio/_core/_run.py", line 813, in __aexit__
      raise combined_error_from_nursery
    File "/home/runner/work/parsec-cloud/parsec-cloud/tests/test_time_provider.py", line 187, in test_sleep_in_nursery
      await wait_for_sleeping_stat(tp, 2)
    File "/home/runner/work/parsec-cloud/parsec-cloud/tests/test_time_provider.py", line 15, in wait_for_sleeping_stat
      await trio.sleep(0)
    File "/home/runner/.cache/pypoetry/virtualenvs/parsec-cloud-dZ-E5qY_-py3.9/lib/python3.9/site-packages/trio/_timeouts.py", line 74, in sleep
      await trio.lowlevel.checkpoint()
    File "/home/runner/.cache/pypoetry/virtualenvs/parsec-cloud-dZ-E5qY_-py3.9/lib/python3.9/site-packages/trio/_core/_run.py", line 2353, in checkpoint
      await _core.wait_task_rescheduled(lambda _: _core.Abort.SUCCEEDED)
    File "/home/runner/.cache/pypoetry/virtualenvs/parsec-cloud-dZ-E5qY_-py3.9/lib/python3.9/site-packages/trio/_core/_traps.py", line 166, in wait_task_rescheduled
      return (await _async_yield(WaitTaskRescheduled(abort_func))).unwrap()
    File "/home/runner/.cache/pypoetry/virtualenvs/parsec-cloud-dZ-E5qY_-py3.9/lib/python3.9/site-packages/outcome/_impl.py", line 138, in unwrap
      raise captured_error
    File "/home/runner/.cache/pypoetry/virtualenvs/parsec-cloud-dZ-E5qY_-py3.9/lib/python3.9/site-packages/trio/_core/_run.py", line 1173, in raise_cancel
      raise Cancelled._create()
  trio.Cancelled: Cancelled

Details of embedded exception 2:

  Traceback (most recent call last):
    File "/home/runner/.cache/pypoetry/virtualenvs/parsec-cloud-dZ-E5qY_-py3.9/lib/python3.9/site-packages/trio/_timeouts.py", line 106, in fail_at
      yield scope
    File "/home/runner/work/parsec-cloud/parsec-cloud/tests/test_time_provider.py", line 189, in test_sleep_in_nursery
      await wait_for_sleeping_stat(tp, 0)
    File "/home/runner/.cache/pypoetry/virtualenvs/parsec-cloud-dZ-E5qY_-py3.9/lib/python3.9/site-packages/trio/_core/_run.py", line 813, in __aexit__
      raise combined_error_from_nursery
    File "/home/runner/work/parsec-cloud/parsec-cloud/tests/test_time_provider.py", line 187, in test_sleep_in_nursery
      await wait_for_sleeping_stat(tp, 2)
    File "/home/runner/work/parsec-cloud/parsec-cloud/tests/test_time_provider.py", line 15, in wait_for_sleeping_stat
      await trio.sleep(0)
    File "/home/runner/.cache/pypoetry/virtualenvs/parsec-cloud-dZ-E5qY_-py3.9/lib/python3.9/site-packages/trio/_timeouts.py", line 74, in sleep
      await trio.lowlevel.checkpoint()
    File "/home/runner/.cache/pypoetry/virtualenvs/parsec-cloud-dZ-E5qY_-py3.9/lib/python3.9/site-packages/trio/_core/_run.py", line 2353, in checkpoint
      await _core.wait_task_rescheduled(lambda _: _core.Abort.SUCCEEDED)
    File "/home/runner/.cache/pypoetry/virtualenvs/parsec-cloud-dZ-E5qY_-py3.9/lib/python3.9/site-packages/trio/_core/_traps.py", line 166, in wait_task_rescheduled
      return (await _async_yield(WaitTaskRescheduled(abort_func))).unwrap()
    File "/home/runner/.cache/pypoetry/virtualenvs/parsec-cloud-dZ-E5qY_-py3.9/lib/python3.9/site-packages/outcome/_impl.py", line 138, in unwrap
      raise captured_error
    File "/home/runner/.cache/pypoetry/virtualenvs/parsec-cloud-dZ-E5qY_-py3.9/lib/python3.9/site-packages/trio/_core/_run.py", line 1173, in raise_cancel
      raise Cancelled._create()
  trio.Cancelled: Cancelled

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "/home/runner/.cache/pypoetry/virtualenvs/parsec-cloud-dZ-E5qY_-py3.9/lib/python3.9/site-packages/trio/_timeouts.py", line 106, in fail_at
      yield scope
    File "/home/runner/work/parsec-cloud/parsec-cloud/tests/test_time_provider.py", line 189, in test_sleep_in_nursery
      await wait_for_sleeping_stat(tp, 0)
    File "/home/runner/.cache/pypoetry/virtualenvs/parsec-cloud-dZ-E5qY_-py3.9/lib/python3.9/site-packages/trio/_core/_run.py", line 813, in __aexit__
      raise combined_error_from_nursery
    File "/home/runner/.cache/pypoetry/virtualenvs/parsec-cloud-dZ-E5qY_-py3.9/lib/python3.9/site-packages/trio/_core/_run.py", line 934, in _nested_child_finished
      await checkpoint()
    File "/home/runner/.cache/pypoetry/virtualenvs/parsec-cloud-dZ-E5qY_-py3.9/lib/python3.9/site-packages/trio/_core/_run.py", line 2353, in checkpoint
      await _core.wait_task_rescheduled(lambda _: _core.Abort.SUCCEEDED)
    File "/home/runner/.cache/pypoetry/virtualenvs/parsec-cloud-dZ-E5qY_-py3.9/lib/python3.9/site-packages/trio/_core/_traps.py", line 166, in wait_task_rescheduled
      return (await _async_yield(WaitTaskRescheduled(abort_func))).unwrap()
    File "/home/runner/.cache/pypoetry/virtualenvs/parsec-cloud-dZ-E5qY_-py3.9/lib/python3.9/site-packages/outcome/_impl.py", line 138, in unwrap
      raise captured_error
    File "/home/runner/.cache/pypoetry/virtualenvs/parsec-cloud-dZ-E5qY_-py3.9/lib/python3.9/site-packages/trio/_core/_run.py", line 1173, in raise_cancel
      raise Cancelled._create()
  trio.Cancelled: Cancelled

During handling of the above exception, another exception occurred:

value = <trio.Nursery object at 0x7f7073244910>

    async def yield_(value=None):
>       return await _yield_(value)

../../../.cache/pypoetry/virtualenvs/parsec-cloud-dZ-E5qY_-py3.9/lib/python3.9/site-packages/async_generator/_impl.py:106: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../.cache/pypoetry/virtualenvs/parsec-cloud-dZ-E5qY_-py3.9/lib/python3.9/site-packages/async_generator/_impl.py:99: in _yield_
    return (yield _wrap(value))
tests/test_time_provider.py:189: in test_sleep_in_nursery
    await wait_for_sleeping_stat(tp, 0)
/opt/hostedtoolcache/Python/3.9.14/x64/lib/python3.9/contextlib.py:137: in __exit__
    self.gen.throw(typ, value, traceback)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

deadline = 171241.72590534255

    @contextmanager
    def fail_at(deadline):
        """Creates a cancel scope with the given deadline, and raises an error if it
        is actually cancelled.
    
        This function and :func:`move_on_at` are similar in that both create a
        cancel scope with a given absolute deadline, and if the deadline expires
        then both will cause :exc:`Cancelled` to be raised within the scope. The
        difference is that when the :exc:`Cancelled` exception reaches
        :func:`move_on_at`, it's caught and discarded. When it reaches
        :func:`fail_at`, then it's caught and :exc:`TooSlowError` is raised in its
        place.
    
        Raises:
          TooSlowError: if a :exc:`Cancelled` exception is raised in this scope
            and caught by the context manager.
    
        """
    
        with move_on_at(deadline) as scope:
            yield scope
        if scope.cancelled_caught:
>           raise TooSlowError
E           trio.TooSlowError

../../../.cache/pypoetry/virtualenvs/parsec-cloud-dZ-E5qY_-py3.9/lib/python3.9/site-packages/trio/_timeouts.py:108: TooSlowError
============================= slowest 10 durations =============================
1.01s call     tests/test_time_provider.py::test_sleep_in_nursery[raw]
0.73s call     tests/test_cli.py::test_pki_enrollment[mock_parsec_ext]
0.19s call     tests/test_cli.py::test_bootstrap_sequester
0.04s setup    tests/test_cli.py::test_share_workspace[NONE]
0.03s setup    tests/test_cli.py::test_share_workspace[OWNER]
0.02s call     tests/test_time_provider.py::test_sleep_with_mock
0.02s call     tests/test_cli.py::test_reencrypt_workspace
0.02s setup    tests/test_logging.py::test_sentry_structlog_integration
0.02s setup    tests/test_logging.py::test_sentry_stdlib_integration
0.02s call     tests/test_cli.py::test_share_workspace[OWNER]
=========================== short test summary info ============================
FAILED tests/test_time_provider.py::test_sleep_in_nursery[raw] - trio.TooSlow...
!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!! xdist.dsession.Interrupted: stopping after 1 failures !!!!!!!!!!!!!
================== 1 failed, 106 passed, 12 skipped in 17.16s ==================

https://github.com/Scille/parsec-cloud/actions/runs/3240517897/jobs/5311238818

FirelightFlagboy avatar Oct 13 '22 07:10 FirelightFlagboy