From 3a7674c896847d18e598fa5da23d7426cb9be3d2 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Sun, 14 Mar 2021 09:10:25 +0100 Subject: [PATCH] python3Packages.urllib3: disable tests again --- .../python-modules/urllib3/default.nix | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/urllib3/default.nix b/pkgs/development/python-modules/urllib3/default.nix index ea554efe353d..fa323fb960ba 100644 --- a/pkgs/development/python-modules/urllib3/default.nix +++ b/pkgs/development/python-modules/urllib3/default.nix @@ -47,13 +47,22 @@ buildPythonPackage rec { trustme ]; - disabledTests = if stdenv.hostPlatform.isAarch64 then - [ - "test_connection_closed_on_read_timeout_preload_false" - "test_ssl_failed_fingerprint_verification" - ] - else - null; + # Tests in urllib3 are mostly timeout-based instead of event-based and + # are therefore inherently flaky. On your own machine, the tests will + # typically build fine, but on a loaded cluster such as Hydra random + # timeouts will occur. + # + # The urllib3 test suite has two different timeouts in their test suite + # (see `test/__init__.py`): + # - SHORT_TIMEOUT + # - LONG_TIMEOUT + # When CI is in the env, LONG_TIMEOUT will be significantly increased. + # Still, failures can occur and for that reason tests are disabled. + doCheck = false; + + preCheck = '' + export CI # Increases LONG_TIMEOUT + ''; pythonImportsCheck = [ "urllib3" ];