patch 8.2.3253: channel test fails randomly
Problem: Channel test fails randomly.
Solution: Add a sleep after sending the "echoerr" command. (Michael Soyka)
diff --git a/src/testdir/test_channel.py b/src/testdir/test_channel.py
index 9684bb9..36aad2b 100644
--- a/src/testdir/test_channel.py
+++ b/src/testdir/test_channel.py
@@ -114,6 +114,11 @@
print("sending: {0}".format(cmd))
self.request.sendall(cmd.encode('utf-8'))
response = "ok"
+ # Wait a bit, so that the "ex" command is handled
+ # before the "ch_evalexpr() returns. Otherwise we are
+ # outside the try/catch when the "ex" command is
+ # handled.
+ time.sleep(0.02)
elif decoded[1] == 'bad command':
cmd = '["ex","foo bar"]'
print("sending: {0}".format(cmd))