To: vim_dev@googlegroups.com Subject: Patch 7.4.1289 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.1289 Problem: Channel test fails on MS-Windows, connect() takes too long. Solution: Adjust the test for MS-Windows using "waittime". Files: src/channel.c, src/testdir/test_channel.vim *** ../vim-7.4.1288/src/channel.c 2016-02-07 21:59:17.539916046 +0100 --- src/channel.c 2016-02-07 22:10:07.849087207 +0100 *************** *** 468,474 **** #endif } ! if (errno == ECONNREFUSED) { sock_close(sd); if ((sd = (sock_T)socket(AF_INET, SOCK_STREAM, 0)) == (sock_T)-1) --- 468,475 ---- #endif } ! /* Only retry for netbeans. TODO: can we use a waittime instead? */ ! if (errno == ECONNREFUSED && close_cb != NULL) { sock_close(sd); if ((sd = (sock_T)socket(AF_INET, SOCK_STREAM, 0)) == (sock_T)-1) *** ../vim-7.4.1288/src/testdir/test_channel.vim 2016-02-07 21:44:45.397066865 +0100 --- src/testdir/test_channel.vim 2016-02-07 22:20:24.882591888 +0100 *************** *** 196,203 **** " Oops, port does exists. call ch_close(handle) else ! " Failed connection doesn't wait the full time. let elapsed = reltime(start) ! call assert_true(reltimefloat(elapsed) < 1.0) endif endfunc --- 196,203 ---- " Oops, port does exists. call ch_close(handle) else ! " Failed connection doesn't wait the full time on Unix. let elapsed = reltime(start) ! call assert_true(reltimefloat(elapsed) < (has('unix') ? 1.0 : 3.0)) endif endfunc *** ../vim-7.4.1288/src/version.c 2016-02-07 21:59:17.547915963 +0100 --- src/version.c 2016-02-07 22:11:16.864360505 +0100 *************** *** 749,750 **** --- 749,752 ---- { /* Add new patch number below this line */ + /**/ + 1289, /**/ -- The CIA drives around in cars with the "Intel inside" logo. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///