Mercurial > vim
comparison src/testdir/test_channel.vim @ 26610:95a267994eac v8.2.3834
patch 8.2.3834: Test_out_cb often fails on Mac
Commit: https://github.com/vim/vim/commit/deda6441e457072df39cdc8744dcd685d77fa273
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Dec 17 11:44:33 2021 +0000
patch 8.2.3834: Test_out_cb often fails on Mac
Problem: Test_out_cb often fails on Mac.
Solution: Increase the timeout with every retry.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 17 Dec 2021 12:45:05 +0100 |
parents | a5a772dace5b |
children | 85b07a942518 |
comparison
equal
deleted
inserted
replaced
26609:657addfd8645 | 26610:95a267994eac |
---|---|
1237 | 1237 |
1238 " Receive a json object split in pieces | 1238 " Receive a json object split in pieces |
1239 let g:Ch_outobj = '' | 1239 let g:Ch_outobj = '' |
1240 call ch_sendraw(job, "echosplit [0, {\"one\": 1,| \"tw|o\": 2, \"three\": 3|}]\n") | 1240 call ch_sendraw(job, "echosplit [0, {\"one\": 1,| \"tw|o\": 2, \"three\": 3|}]\n") |
1241 " For unknown reasons this can be very slow on Mac. | 1241 " For unknown reasons this can be very slow on Mac. |
1242 if has('mac') | 1242 " Increase the timeout on every run. |
1243 if g:run_nr == 1 | |
1244 let timeout = 5000 | |
1245 elseif g:run_nr == 2 | |
1246 let timeout = 10000 | |
1247 elseif g:run_nr == 3 | |
1243 let timeout = 20000 | 1248 let timeout = 20000 |
1244 else | 1249 else |
1245 let timeout = 5000 | 1250 let timeout = 40000 |
1246 endif | 1251 endif |
1247 call WaitForAssert({-> assert_equal({'one': 1, 'two': 2, 'three': 3}, g:Ch_outobj)}, timeout) | 1252 call WaitForAssert({-> assert_equal({'one': 1, 'two': 2, 'three': 3}, g:Ch_outobj)}, timeout) |
1248 finally | 1253 finally |
1249 call job_stop(job) | 1254 call job_stop(job) |
1250 endtry | 1255 endtry |