comparison src/testdir/test_channel.vim @ 8500:1227dc21865b v7.4.1540

commit https://github.com/vim/vim/commit/ac42afd10b96424b89762871905e3e785cdfba3d Author: Bram Moolenaar <Bram@vim.org> Date: Sat Mar 12 13:48:49 2016 +0100 patch 7.4.1540 Problem: Channel test is a bit flaky. Solution: Increase expected wait time.
author Christian Brabandt <cb@256bit.org>
date Sat, 12 Mar 2016 14:00:05 +0100
parents daebcbd87bd3
children ee5cb2e9ed5a
comparison
equal deleted inserted replaced
8499:10606ea16a0b 8500:1227dc21865b
440 let handle = ch_open('localhost:9867', {'waittime': 500}) 440 let handle = ch_open('localhost:9867', {'waittime': 500})
441 if ch_status(handle) != "fail" 441 if ch_status(handle) != "fail"
442 " Oops, port does exists. 442 " Oops, port does exists.
443 call ch_close(handle) 443 call ch_close(handle)
444 else 444 else
445 " Failed connection should wait about 500 msec. 445 " Failed connection should wait about 500 msec. Can be longer if the
446 " computer is busy with other things.
446 let elapsed = reltime(start) 447 let elapsed = reltime(start)
447 call assert_true(reltimefloat(elapsed) > 0.3) 448 call assert_true(reltimefloat(elapsed) > 0.3)
448 call assert_true(reltimefloat(elapsed) < 1.0) 449 call assert_true(reltimefloat(elapsed) < 1.5)
449 endif 450 endif
450 catch 451 catch
451 if v:exception !~ 'Connection reset by peer' 452 if v:exception !~ 'Connection reset by peer'
452 call assert_false(1, "Caught exception: " . v:exception) 453 call assert_false(1, "Caught exception: " . v:exception)
453 endif 454 endif