mirror of
https://github.com/vim/vim.git
synced 2026-06-10 15:37:26 +02:00
patch 9.2.0438: tests: test_plugin_termdebug is flaky
Problem: Test_termdebug_tbreak(), Test_termdebug_basic(), and
Test_termdebug_toggle_break() use synchronous assert_equal()
to check breakpoint signs immediately after sending commands
to gdb. On slow CI (ASAN, ARM64, macOS) gdb may not have
processed the response yet, causing the sign to be missing.
Solution: Wrap the three assertions in WaitForAssert() to poll until
the signs are placed, matching the pattern already used by
the other assertions in the same tests (Jesse Rosenstock).
closes: #20133
Co-authored-by: Gemini
Signed-off-by: Jesse Rosenstock <jmr@google.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
bb807ebc8a
commit
20a124a6e0
@@ -162,10 +162,10 @@ func Test_termdebug_basic()
|
||||
Break 9
|
||||
call term_wait(gdb_buf)
|
||||
redraw!
|
||||
call assert_equal([
|
||||
call WaitForAssert({-> assert_equal([
|
||||
\ {'lnum': 9, 'id': 1014, 'name': 'debugBreakpoint1.0',
|
||||
\ 'priority': 110, 'group': 'TermDebug'}],
|
||||
\ sign_getplaced('', #{group: 'TermDebug'})[0].signs)
|
||||
\ sign_getplaced('', #{group: 'TermDebug'})[0].signs)})
|
||||
Run
|
||||
call term_wait(gdb_buf, 400)
|
||||
redraw!
|
||||
@@ -324,12 +324,12 @@ func Test_termdebug_tbreak()
|
||||
call term_wait(gdb_buf)
|
||||
redraw!
|
||||
" both temporary and normal breakpoint signs were displayed...
|
||||
call assert_equal([
|
||||
call WaitForAssert({-> assert_equal([
|
||||
\ {'lnum': temp_bp_line, 'id': 1014, 'name': 'debugBreakpoint1.0',
|
||||
\ 'priority': 110, 'group': 'TermDebug'},
|
||||
\ {'lnum': bp_line, 'id': 2014, 'name': 'debugBreakpoint2.0',
|
||||
\ 'priority': 110, 'group': 'TermDebug'}],
|
||||
\ sign_getplaced('', #{group: 'TermDebug'})[0].signs)
|
||||
\ sign_getplaced('', #{group: 'TermDebug'})[0].signs)})
|
||||
|
||||
Run
|
||||
call term_wait(gdb_buf, 400)
|
||||
@@ -717,10 +717,10 @@ func Test_termdebug_toggle_break()
|
||||
|
||||
call term_wait(gdb_buf)
|
||||
redraw!
|
||||
call assert_equal([
|
||||
call WaitForAssert({-> assert_equal([
|
||||
\ {'lnum': bp_line, 'id': 1014, 'name': 'debugBreakpoint1.0',
|
||||
\ 'priority': 110, 'group': 'TermDebug'}],
|
||||
\ sign_getplaced('', #{group: 'TermDebug'})[0].signs)
|
||||
\ sign_getplaced('', #{group: 'TermDebug'})[0].signs)})
|
||||
|
||||
RunOrContinue
|
||||
call term_wait(gdb_buf, 400)
|
||||
|
||||
@@ -729,6 +729,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
438,
|
||||
/**/
|
||||
437,
|
||||
/**/
|
||||
|
||||
Reference in New Issue
Block a user