updated for version 7.3.346
Problem:    It's hard to test netbeans commands.
Solution:   Process netbeans commands after :sleep. (Xavier de Gaye)
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 3008a1d..68b530a 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -8205,6 +8205,12 @@
     {
 	ui_delay(msec - done > 1000L ? 1000L : msec - done, TRUE);
 	ui_breakcheck();
+#ifdef FEAT_NETBEANS_INTG
+	/* Process the netbeans messages that may have been received in the
+	 * call to ui_breakcheck() when the GUI is in use. This may occur when
+	 * running a test case. */
+	netbeans_parse_messages();
+#endif
     }
 }