comparison src/testdir/test_channel.vim @ 13650:87ffb7f85b28 v8.0.1697

patch 8.0.1697: various tests are still a bit flaky commit https://github.com/vim/vim/commit/769e9d21ac3e8dff43b9ef5e46cdc4523833b51e Author: Bram Moolenaar <Bram@vim.org> Date: Wed Apr 11 20:53:49 2018 +0200 patch 8.0.1697: various tests are still a bit flaky Problem: Various tests are still a bit flaky. Solution: Increase the default wait time to five seconds.
author Christian Brabandt <cb@256bit.org>
date Wed, 11 Apr 2018 21:00:07 +0200
parents 8723e4496dd1
children f309afff6f25
comparison
equal deleted inserted replaced
13649:074b4d214dd8 13650:87ffb7f85b28
1141 let options = {'out_mode': 'raw', 'out_io': 'buffer', 'out_name': 'testout'} 1141 let options = {'out_mode': 'raw', 'out_io': 'buffer', 'out_name': 'testout'}
1142 split testout 1142 split testout
1143 let job = job_start([s:python, '-c', 1143 let job = job_start([s:python, '-c',
1144 \ 'import sys; [sys.stdout.write(".") and sys.stdout.flush() for _ in range(10000)]'], options) 1144 \ 'import sys; [sys.stdout.write(".") and sys.stdout.flush() for _ in range(10000)]'], options)
1145 call assert_equal("run", job_status(job)) 1145 call assert_equal("run", job_status(job))
1146 call WaitFor('len(join(getline(1, "$"), "")) >= 10000', 3000) 1146 call WaitFor('len(join(getline(1, "$"), "")) >= 10000')
1147 try 1147 try
1148 let totlen = 0 1148 let totlen = 0
1149 for line in getline(1, '$') 1149 for line in getline(1, '$')
1150 call assert_equal('', substitute(line, '^\.*', '', '')) 1150 call assert_equal('', substitute(line, '^\.*', '', ''))
1151 let totlen += len(line) 1151 let totlen += len(line)
1504 endif 1504 endif
1505 1505
1506 let g:exit_cb_val = {'start': reltime(), 'end': 0, 'process': 0} 1506 let g:exit_cb_val = {'start': reltime(), 'end': 0, 'process': 0}
1507 let job = job_start([s:python, '-c', 'import time;time.sleep(0.5)'], {'exit_cb': 'MyExitTimeCb'}) 1507 let job = job_start([s:python, '-c', 'import time;time.sleep(0.5)'], {'exit_cb': 'MyExitTimeCb'})
1508 let g:exit_cb_val.process = job_info(job).process 1508 let g:exit_cb_val.process = job_info(job).process
1509 call WaitFor('type(g:exit_cb_val.end) != v:t_number || g:exit_cb_val.end != 0', 2000) 1509 call WaitFor('type(g:exit_cb_val.end) != v:t_number || g:exit_cb_val.end != 0')
1510 let elapsed = reltimefloat(g:exit_cb_val.end) 1510 let elapsed = reltimefloat(g:exit_cb_val.end)
1511 call assert_true(elapsed > 0.5) 1511 call assert_true(elapsed > 0.5)
1512 call assert_true(elapsed < 1.0) 1512 call assert_true(elapsed < 1.0)
1513 1513
1514 " case: unreferenced job, using timer 1514 " case: unreferenced job, using timer