Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python3Packages.websockets: make tests deterministic #97850

Merged
merged 1 commit into from Sep 12, 2020

Conversation

gebner
Copy link
Member

@gebner gebner commented Sep 12, 2020

Motivation for this change

The tests fail on my raspberry pi:

FAIL: test_local_close_connection_lost_timeout_after_close (tests.test_protocol.ClientTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/source/tests/test_protocol.py", line 1474, in test_local_close_connection_lost_timeout_after_close
    self.loop.run_until_complete(self.protocol.close(reason="close"))
  File "/nix/store/rsyk9hlvxlpiy6g5riz937lk2jjq5fnf-python3-3.8.5/lib/python3.8/contextlib.py", line 120, in __exit__
    next(self.gen)
  File "/build/source/tests/test_protocol.py", line 300, in assertCompletesWithin
    self.assertLess(dt, max_time, f"Too slow: {dt} >= {max_time}")
AssertionError: 0.03923745600059192 not less than 0.039 : Too slow: 0.03923745600059192 >= 0.039
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@gebner gebner added the 9.needs: port to stable A PR needs a backport to the stable release. label Sep 12, 2020
@gebner
Copy link
Member Author

gebner commented Sep 12, 2020

Fails on hydra as well for this reason: https://hydra.nixos.org/build/126765786/nixlog/1

ZHF: #97479

@gebner
Copy link
Member Author

gebner commented Sep 12, 2020

Backported as 4d730ee

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants