Mercurial > vim
comparison src/testdir/test_channel.vim @ 19715:e73167dd8cac v8.2.0414
patch 8.2.0414: channel connect_waittime() test is flaky
Commit: https://github.com/vim/vim/commit/373a876d0cac5f8aff352e8ca42fdac88a1a7c3b
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Mar 19 19:44:32 2020 +0100
patch 8.2.0414: channel connect_waittime() test is flaky
Problem: Channel connect_waittime() test is flaky.
Solution: Set the test_is_flaky flag. Use test_is_flaky for more tests.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 19 Mar 2020 19:45:03 +0100 |
parents | 8744a50560cb |
children | b3e93a05c3ca |
comparison
equal
deleted
inserted
replaced
19714:0e0ef0f4009f | 19715:e73167dd8cac |
---|---|
21 let s:chopt = {} | 21 let s:chopt = {} |
22 | 22 |
23 " Run "testfunc" after starting the server and stop the server afterwards. | 23 " Run "testfunc" after starting the server and stop the server afterwards. |
24 func s:run_server(testfunc, ...) | 24 func s:run_server(testfunc, ...) |
25 call RunServer('test_channel.py', a:testfunc, a:000) | 25 call RunServer('test_channel.py', a:testfunc, a:000) |
26 | |
27 " communicating with a server can be flaky | |
28 let g:test_is_flaky = 1 | |
26 endfunc | 29 endfunc |
27 | 30 |
28 " Return a list of open files. | 31 " Return a list of open files. |
29 " Can be used to make sure no resources leaked. | 32 " Can be used to make sure no resources leaked. |
30 " Returns an empty list on systems where this is not supported. | 33 " Returns an empty list on systems where this is not supported. |
413 """"""""" | 416 """"""""" |
414 | 417 |
415 " Test that trying to connect to a non-existing port fails quickly. | 418 " Test that trying to connect to a non-existing port fails quickly. |
416 func Test_connect_waittime() | 419 func Test_connect_waittime() |
417 CheckFunction reltimefloat | 420 CheckFunction reltimefloat |
421 " this is timing sensitive | |
422 let g:test_is_flaky = 1 | |
418 | 423 |
419 call ch_log('Test_connect_waittime()') | 424 call ch_log('Test_connect_waittime()') |
420 let start = reltime() | 425 let start = reltime() |
421 let handle = ch_open('localhost:9876', s:chopt) | 426 let handle = ch_open('localhost:9876', s:chopt) |
422 if ch_status(handle) != "fail" | 427 if ch_status(handle) != "fail" |