Problem: The remote_peek() test fails on MS-Windows.
Solution: Check for pending messages. Also report errors in the first run if
a flaky test fails twice.
int i;
char_u *reply;
reply_T *rep;
+ int did_process = FALSE;
/* When waiting, loop until the message waiting for is received. */
for (;;)
/* If we got here, we didn't find a reply. Return immediately if the
* "wait" parameter isn't set. */
if (!wait)
+ {
+ /* Process pending messages once. Without this, looping on
+ * remote_peek() would never get the reply. */
+ if (!did_process)
+ {
+ did_process = TRUE;
+ serverProcessPendingMessages();
+ continue;
+ }
break;
+ }
/* We need to wait for a reply. Enter a message loop until the
* "reply_received" flag gets set. */
call add(s:messages, 'Found errors in ' . s:test . ':')
call extend(s:messages, v:errors)
call add(s:messages, 'Flaky test failed, running it again')
+ let first_run = v:errors
+
let v:errors = []
call RunTheTest(s:test)
+ if len(v:errors) > 0
+ let second_run = v:errors
+ let v:errors = ['First run:']
+ call extend(v:errors, first_run)
+ call add(v:errors, 'Second run:')
+ call extend(v:errors, second_run)
+ endif
endif
call AfterTheTest()
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 480,
/**/
479,
/**/