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))
diff --git a/src/testdir/test_channel.vim b/src/testdir/test_channel.vim
index f2c0d17..fc82ada 100644
--- a/src/testdir/test_channel.vim
+++ b/src/testdir/test_channel.vim
@@ -253,11 +253,6 @@
func Test_communicate_ipv6()
CheckIPv6
- " FIXME: this test is very flaky on MS-Windows
- if has('win32')
- throw 'Skipped: test is very flaky with MS-Windows'
- endif
-
call Test_communicate()
endfunc