patch 9.0.0958: messages test is flaky

Problem:    Messages test is flaky.
Solution:   Add a short delay.
diff --git a/src/testdir/dumps/Test_verbose_system_1.vim b/src/testdir/dumps/Test_verbose_system_1.vim
index 816a55a..65e9c8a 100644
--- a/src/testdir/dumps/Test_verbose_system_1.vim
+++ b/src/testdir/dumps/Test_verbose_system_1.vim
@@ -1,3 +1,5 @@
 " Filter that removes the ever changing temp directory name from the screendump
 " that shows the system() command executed.
-1s+|t|m|p|/|.|.|.*| |+|t|m|p|/|x|x|x|x|x|x|x|/|1| |+
+" This should be on the first line, but if it isn't there ignore the error,
+" the screendump will then show the problem.
+1s+|t|m|p|/|.|.|.*| |+|t|m|p|/|x|x|x|x|x|x|x|/|1| |+e
diff --git a/src/testdir/dumps/Test_verbose_system_2.vim b/src/testdir/dumps/Test_verbose_system_2.vim
index 816a55a..65e9c8a 100644
--- a/src/testdir/dumps/Test_verbose_system_2.vim
+++ b/src/testdir/dumps/Test_verbose_system_2.vim
@@ -1,3 +1,5 @@
 " Filter that removes the ever changing temp directory name from the screendump
 " that shows the system() command executed.
-1s+|t|m|p|/|.|.|.*| |+|t|m|p|/|x|x|x|x|x|x|x|/|1| |+
+" This should be on the first line, but if it isn't there ignore the error,
+" the screendump will then show the problem.
+1s+|t|m|p|/|.|.|.*| |+|t|m|p|/|x|x|x|x|x|x|x|/|1| |+e
diff --git a/src/testdir/test_messages.vim b/src/testdir/test_messages.vim
index ab33caa..ff705fe 100644
--- a/src/testdir/test_messages.vim
+++ b/src/testdir/test_messages.vim
@@ -349,7 +349,7 @@
 
   " display a page and go back, results in exactly the same view
   call term_sendkeys(buf, ' ')
-  call TermWait(buf)
+  call TermWait(buf, 50)
   call term_sendkeys(buf, 'b')
   call VerifyScreenDump(buf, 'Test_verbose_system_1', {})
 
@@ -362,7 +362,7 @@
   call VerifyScreenDump(buf, 'Test_verbose_system_2', {})
 
   call term_sendkeys(buf, ' ')
-  call TermWait(buf)
+  call TermWait(buf, 50)
   call term_sendkeys(buf, 'b')
   call VerifyScreenDump(buf, 'Test_verbose_system_2', {})