summaryrefslogtreecommitdiff
path: root/src/testdir/test_channel.py
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-07-30 21:56:10 +0200
committerBram Moolenaar <Bram@vim.org>2021-07-30 21:56:10 +0200
commit890ee4e2be1dca0c07a91f836e26baead952ae7c (patch)
tree90a453b775517094a6c8c2b3fc698248fc3103f7 /src/testdir/test_channel.py
parent4a15504e911bc90a29d862862f0b7a46d8acd12a (diff)
downloadvim-git-890ee4e2be1dca0c07a91f836e26baead952ae7c.tar.gz
patch 8.2.3253: channel test fails randomlyv8.2.3253
Problem: Channel test fails randomly. Solution: Add a sleep after sending the "echoerr" command. (Michael Soyka)
Diffstat (limited to 'src/testdir/test_channel.py')
-rw-r--r--src/testdir/test_channel.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/testdir/test_channel.py b/src/testdir/test_channel.py
index 9684bb933..36aad2b77 100644
--- a/src/testdir/test_channel.py
+++ b/src/testdir/test_channel.py
@@ -114,6 +114,11 @@ class ThreadedTCPRequestHandler(socketserver.BaseRequestHandler):
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))