]> granicus.if.org Git - vim/commitdiff
patch 7.4.1289 v7.4.1289
authorBram Moolenaar <Bram@vim.org>
Sun, 7 Feb 2016 21:21:19 +0000 (22:21 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 7 Feb 2016 21:21:19 +0000 (22:21 +0100)
Problem:    Channel test fails on MS-Windows, connect() takes too long.
Solution:   Adjust the test for MS-Windows using "waittime".

src/channel.c
src/testdir/test_channel.vim
src/version.c

index fef6de504af255948f4d96cd2e6e426a727f1a92..5e4d1825c334fec3b69c3fa1a444c9231258b6ed 100644 (file)
@@ -468,7 +468,8 @@ channel_open(char *hostname, int port_in, int waittime, void (*close_cb)(void))
 #endif
     }
 
-    if (errno == ECONNREFUSED)
+    /* 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)
index e5903ae425fdb80522b7033d4173539e59974b9b..7d82094f216c9552348600710e6b83018ce265af 100644 (file)
@@ -196,8 +196,8 @@ func Test_connect_waittime()
     " Oops, port does exists.
     call ch_close(handle)
   else
-    " Failed connection doesn't wait the full time.
+    " Failed connection doesn't wait the full time on Unix.
     let elapsed = reltime(start)
-    call assert_true(reltimefloat(elapsed) < 1.0)
+    call assert_true(reltimefloat(elapsed) < (has('unix') ? 1.0 : 3.0))
   endif
 endfunc
index 220b2c5cbff409580adbfacff4f7c9277bc69c0e..b9ca107688ca6243f7d721a7c43f401310f0b312 100644 (file)
@@ -747,6 +747,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1289,
 /**/
     1288,
 /**/