mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-19 02:44:17 +03:00
python3Packages.websockets: disable time-sentitive test
Without the change python3Packages.websockets fails tests on machines under load: python3.9-websockets> ERROR: test_keepalive_ping_with_no_ping_timeout (tests.legacy.test_protocol.ServerTests) python3.9-websockets> Traceback (most recent call last): python3.9-websockets> File "/build/source/tests/legacy/test_protocol.py", line 1270, in test_keepalive_ping_with_no_ping_timeout python3.9-websockets> ping_1_again, ping_2 = tuple(self.protocol.pings) python3.9-websockets> ValueError: too many values to unpack (expected 2) The change disables the test.
This commit is contained in:
parent
4861bef3c1
commit
775e3c8e2b
@ -23,11 +23,25 @@ buildPythonPackage rec {
|
||||
# Tests fail on Darwin with `OSError: AF_UNIX path too long`
|
||||
doCheck = !stdenv.isDarwin;
|
||||
|
||||
# Disable all tests that need to terminate within a predetermined amount of
|
||||
# time. This is nondeterministic.
|
||||
patchPhase = ''
|
||||
# Disable all tests that need to terminate within a predetermined amount of
|
||||
# time. This is nondeterministic.
|
||||
sed -i 's/with self.assertCompletesWithin.*:/if True:/' \
|
||||
tests/legacy/test_protocol.py
|
||||
|
||||
# Disables tests relying on tight timeouts to avoid failures like:
|
||||
# File "/build/source/tests/legacy/test_protocol.py", line 1270, in test_keepalive_ping_with_no_ping_timeout
|
||||
# ping_1_again, ping_2 = tuple(self.protocol.pings)
|
||||
# ValueError: too many values to unpack (expected 2)
|
||||
for t in \
|
||||
test_keepalive_ping_stops_when_connection_closing \
|
||||
test_keepalive_ping_does_not_crash_when_connection_lost \
|
||||
test_keepalive_ping \
|
||||
test_keepalive_ping_not_acknowledged_closes_connection \
|
||||
test_keepalive_ping_with_no_ping_timeout \
|
||||
; do
|
||||
sed -i "s/def $t(/def skip_$t(/" tests/legacy/test_protocol.py
|
||||
done
|
||||
'';
|
||||
|
||||
checkPhase = ''
|
||||
|
Loading…
Reference in New Issue
Block a user