patch 8.2.2031: some tests fail when run under valgrind

Problem:    Some tests fail when run under valgrind.
Solution:   Avoid timing problems.
diff --git a/src/testdir/test_vim9_func.vim b/src/testdir/test_vim9_func.vim
index 7b5d3e9..dd2f576 100644
--- a/src/testdir/test_vim9_func.vim
+++ b/src/testdir/test_vim9_func.vim
@@ -37,7 +37,7 @@
     for i in range(1, 9)
       text ..= term_getline(buf, i)
     endfor
-    if text =~ 'Error detected'
+    if text =~ 'Variable not found: nothing'
       break
     endif
     sleep 20m