From 7789651b8a9366b7018b7f49c78c5c0267f6190d Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Mon, 12 Jul 2021 18:45:46 +0200 Subject: [PATCH] Tests: Increase timeouts even more in CI Have I ever mentioned I hate this? --- tests/pexpects/bind_mode_events.py | 8 ++++++-- tests/pexpects/cancel_event.py | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/tests/pexpects/bind_mode_events.py b/tests/pexpects/bind_mode_events.py index 3860d2fbe..c7c673754 100644 --- a/tests/pexpects/bind_mode_events.py +++ b/tests/pexpects/bind_mode_events.py @@ -41,14 +41,18 @@ expect_prompt("\r\nmode changes: default insert default insert\r\n") send("set -e MODE_CHANGES\r") expect_prompt() +timeout = 0.15 +if "CI" in os.environ: + timeout = 1.0 + # Put some text on the command line and then go back to normal mode. send("echo stuff") sp.expect_str("echo stuff") send("\033") -sleep(0.150) +sleep(timeout) os.kill(sp.spawn.pid, signal.SIGINT) -sleep(0.150) +sleep(timeout) # We should be back in insert mode now. send("echo mode changes: $MODE_CHANGES\r") diff --git a/tests/pexpects/cancel_event.py b/tests/pexpects/cancel_event.py index 9be1aa8b1..56c10a99c 100644 --- a/tests/pexpects/cancel_event.py +++ b/tests/pexpects/cancel_event.py @@ -13,9 +13,13 @@ send, sendline, sleep, expect_str, expect_prompt = ( ) expect_prompt() +timeout = 0.15 +if "CI" in os.environ: + timeout = 1.0 + # Verify that cancel-commandline does what we expect - see #7384. send("not executed") -sleep(0.15) +sleep(timeout) os.kill(sp.spawn.pid, signal.SIGINT) sp.expect_str("not executed^C") expect_prompt(increment=False) @@ -23,7 +27,7 @@ expect_prompt(increment=False) sendline("function cancelhandler --on-event fish_cancel ; echo yay cancelled ; end") expect_prompt() send("still not executed") -sleep(0.15) +sleep(timeout) os.kill(sp.spawn.pid, signal.SIGINT) expect_str("still not executed^C") expect_prompt("yay cancelled", increment=False)