]> granicus.if.org Git - vim/commitdiff
patch 9.0.0415: on MS-Windows some tests are flaky v9.0.0415
authorK.Takata <kentkt@csc.jp>
Thu, 8 Sep 2022 11:28:02 +0000 (12:28 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 8 Sep 2022 11:28:02 +0000 (12:28 +0100)
Problem:    On MS-Windows some tests are flaky.
Solution:   Add sleeps, disable swapfile, mark test as flaky. (Ken Takata,
            closes #11082)

src/testdir/test_autocmd.vim
src/testdir/test_buffer.vim
src/testdir/test_bufline.vim
src/testdir/test_profile.vim
src/testdir/test_shell.vim
src/testdir/test_undo.vim
src/testdir/test_viminfo.vim
src/version.c

index 669089df2d5937afa8c84ed8294b5f5e8497d20b..337019096084daa0f4f66e6baa6ceacef571b409 100644 (file)
@@ -763,6 +763,7 @@ func Test_autocmd_bufwipe_in_SessLoadPost()
 
   call writefile(content, 'Xvimrc', 'D')
   call system(GetVimCommand('Xvimrc') .. ' --not-a-term --noplugins -S Session.vim -c cq')
+  sleep 50m
   let errors = join(readfile('Xerrors'))
   call assert_match('E814:', errors)
 
index 489926dfbd2fe0a9b14ed40f7f2b95f491f65790..9387b5f6c4c8316e3a13ab1fe5d2379cb0fb01ea 100644 (file)
@@ -375,6 +375,7 @@ endfunc
 func Test_buffer_scheme()
   CheckMSWindows
 
+  set noswapfile
   set noshellslash
   %bwipe!
   let bufnames = [
@@ -397,6 +398,7 @@ func Test_buffer_scheme()
   endfor
 
   set shellslash&
+  set swapfile&
 endfunc
 
 " this was using a NULL pointer after failing to use the pattern
index f3502a3d4149396d741ff5da44a6580cd1e56594..c592877e81753fba4e8ef3a1d9d88a40aef2d72d 100644 (file)
@@ -83,6 +83,7 @@ func Test_setline_startup()
   endif
   call writefile(['call setline(1, "Hello")', 'silent w Xtest', 'q!'], 'Xscript', 'D')
   call system(cmd)
+  sleep 50m
   call assert_equal(['Hello'], readfile('Xtest'))
 
   call delete('Xtest')
index 340048e3ca98ddd003618449f331a120cce850a3..47ff2a2dd7ec8445af44ffcf8d1bcb85aeb4083f 100644 (file)
@@ -53,6 +53,7 @@ func RunProfileFunc(command, declare, assign)
     \ . ' -c "qall!"')
   call assert_equal(0, v:shell_error)
 
+  sleep 50m
   let lines = readfile('Xprofile_func.log')
 
   " - Foo1() is called 3 times but should be reported as called twice
index a6aa10ea2547603077f8923b6d38dc7dccbc169e..1ed4c5ec3e67079527fda0c362b3a2bc36745076 100644 (file)
@@ -5,6 +5,11 @@ source check.vim
 source shared.vim
 
 func Test_shell_options()
+  if has('win32')
+    " FIXME: This test is flaky on MS-Windows.
+    let g:test_is_flaky = 1
+  endif
+
   " The expected value of 'shellcmdflag', 'shellpipe', 'shellquote',
   " 'shellredir', 'shellxescape', 'shellxquote' for the supported shells.
   let shells = []
index a2f3c01daf50d2e4efb5c001e2887f7753461658..61cab689646a47d56f23dad0b8c5c3d770fa77d6 100644 (file)
@@ -335,6 +335,11 @@ func Test_insert_expr()
 endfunc
 
 func Test_undofile_earlier()
+  if has('win32')
+    " FIXME: This test is flaky on MS-Windows.
+    let g:test_is_flaky = 1
+  endif
+
   " Issue #1254
   " create undofile with timestamps older than Vim startup time.
   let t0 = localtime() - 43200
index c3ec5b04d2b6b579bb1f0126e1d1ea8d16869200..71017279ddacd25f46b5bc1063b5f6fa3db23b34 100644 (file)
@@ -722,6 +722,7 @@ func Test_viminfo_file_mark_unloaded_buf()
 endfunc
 
 func Test_viminfo_oldfiles()
+  set noswapfile
   let v:oldfiles = []
   let lines = [
        \ '# comment line',
@@ -765,6 +766,7 @@ func Test_viminfo_oldfiles()
   call assert_equal("/tmp/another.txt", expand("%"))
   bwipe
   delmark E
+  set swapfile&
 endfunc
 
 " Test for storing and restoring buffer list in 'viminfo'
index 5fdf817a58215785a3430eec6f675d6596060c0b..28f7520f904a43f9d978c120e959536c26d01e8c 100644 (file)
@@ -703,6 +703,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    415,
 /**/
     414,
 /**/