Skip to content

Commit 0500e87

Browse files
k-takatabrammool
authored andcommitted
patch 9.0.0415: on MS-Windows some tests are flaky
Problem: On MS-Windows some tests are flaky. Solution: Add sleeps, disable swapfile, mark test as flaky. (Ken Takata, closes #11082)
1 parent 753aead commit 0500e87

File tree

8 files changed

+19
-0
lines changed

8 files changed

+19
-0
lines changed

src/testdir/test_autocmd.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,7 @@ func Test_autocmd_bufwipe_in_SessLoadPost()
763763

764764
call writefile(content, 'Xvimrc', 'D')
765765
call system(GetVimCommand('Xvimrc') .. ' --not-a-term --noplugins -S Session.vim -c cq')
766+
sleep 50m
766767
let errors = join(readfile('Xerrors'))
767768
call assert_match('E814:', errors)
768769

src/testdir/test_buffer.vim

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ endfunc
375375
func Test_buffer_scheme()
376376
CheckMSWindows
377377

378+
set noswapfile
378379
set noshellslash
379380
%bwipe!
380381
let bufnames = [
@@ -397,6 +398,7 @@ func Test_buffer_scheme()
397398
endfor
398399

399400
set shellslash&
401+
set swapfile&
400402
endfunc
401403

402404
" this was using a NULL pointer after failing to use the pattern

src/testdir/test_bufline.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ func Test_setline_startup()
8383
endif
8484
call writefile(['call setline(1, "Hello")', 'silent w Xtest', 'q!'], 'Xscript', 'D')
8585
call system(cmd)
86+
sleep 50m
8687
call assert_equal(['Hello'], readfile('Xtest'))
8788

8889
call delete('Xtest')

src/testdir/test_profile.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ func RunProfileFunc(command, declare, assign)
5353
\ . ' -c "qall!"')
5454
call assert_equal(0, v:shell_error)
5555

56+
sleep 50m
5657
let lines = readfile('Xprofile_func.log')
5758

5859
" - Foo1() is called 3 times but should be reported as called twice

src/testdir/test_shell.vim

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ source check.vim
55
source shared.vim
66

77
func Test_shell_options()
8+
if has('win32')
9+
" FIXME: This test is flaky on MS-Windows.
10+
let g:test_is_flaky = 1
11+
endif
12+
813
" The expected value of 'shellcmdflag', 'shellpipe', 'shellquote',
914
" 'shellredir', 'shellxescape', 'shellxquote' for the supported shells.
1015
let shells = []

src/testdir/test_undo.vim

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,11 @@ func Test_insert_expr()
335335
endfunc
336336

337337
func Test_undofile_earlier()
338+
if has('win32')
339+
" FIXME: This test is flaky on MS-Windows.
340+
let g:test_is_flaky = 1
341+
endif
342+
338343
" Issue #1254
339344
" create undofile with timestamps older than Vim startup time.
340345
let t0 = localtime() - 43200

src/testdir/test_viminfo.vim

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -722,6 +722,7 @@ func Test_viminfo_file_mark_unloaded_buf()
722722
endfunc
723723

724724
func Test_viminfo_oldfiles()
725+
set noswapfile
725726
let v:oldfiles = []
726727
let lines = [
727728
\ '# comment line',
@@ -765,6 +766,7 @@ func Test_viminfo_oldfiles()
765766
call assert_equal("/tmp/another.txt", expand("%"))
766767
bwipe
767768
delmark E
769+
set swapfile&
768770
endfunc
769771

770772
" Test for storing and restoring buffer list in 'viminfo'

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,8 @@ static char *(features[]) =
703703

704704
static int included_patches[] =
705705
{ /* Add new patch number below this line */
706+
/**/
707+
415,
706708
/**/
707709
414,
708710
/**/

0 commit comments

Comments
 (0)