Mercurial > vim
comparison src/testdir/test_channel.vim @ 8438:541ca10b3bc7 v7.4.1510
commit https://github.com/vim/vim/commit/304563c0b3e24895322ce3a29378388665b4769b
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Mar 7 22:26:28 2016 +0100
patch 7.4.1510
Problem: Channel test fails on AppVeyor.
Solution: Wait longer than 10 msec if needed.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 07 Mar 2016 22:30:04 +0100 |
parents | 0e6fd2f802b3 |
children | 6c421014a0b3 |
comparison
equal
deleted
inserted
replaced
8437:cba3eee020fa | 8438:541ca10b3bc7 |
---|---|
393 endif | 393 endif |
394 call ch_setoptions(handle, {'mode': 'raw'}) | 394 call ch_setoptions(handle, {'mode': 'raw'}) |
395 | 395 |
396 " The message are sent raw, we do our own JSON strings here. | 396 " The message are sent raw, we do our own JSON strings here. |
397 call ch_sendraw(handle, "[1, \"hello!\"]", {'callback': 's:HandleRaw1'}) | 397 call ch_sendraw(handle, "[1, \"hello!\"]", {'callback': 's:HandleRaw1'}) |
398 sleep 10m | 398 for i in range(50) |
399 sleep 10m | |
400 if s:reply1 != '' | |
401 break | |
402 endif | |
403 endfor | |
399 call assert_equal("[1, \"got it\"]", s:reply1) | 404 call assert_equal("[1, \"got it\"]", s:reply1) |
400 call ch_sendraw(handle, "[2, \"echo something\"]", {'callback': 's:HandleRaw2'}) | 405 call ch_sendraw(handle, "[2, \"echo something\"]", {'callback': 's:HandleRaw2'}) |
401 call ch_sendraw(handle, "[3, \"wait a bit\"]", {'callback': 's:HandleRaw3'}) | 406 call ch_sendraw(handle, "[3, \"wait a bit\"]", {'callback': 's:HandleRaw3'}) |
402 sleep 10m | 407 for i in range(50) |
408 sleep 10m | |
409 if s:reply2 != '' | |
410 break | |
411 endif | |
412 endfor | |
403 call assert_equal("[2, \"something\"]", s:reply2) | 413 call assert_equal("[2, \"something\"]", s:reply2) |
404 " wait for up to 500 msec for the 200 msec delayed reply | 414 " wait for up to 500 msec for the 200 msec delayed reply |
405 for i in range(50) | 415 for i in range(50) |
406 sleep 10m | 416 sleep 10m |
407 if s:reply3 != '' | 417 if s:reply3 != '' |