Skip to content

Commit 3564601

Browse files
ono-maxko1
authored andcommitted
Fix flakey test "test_reponse_returns_correct_threads_info"
1 parent 98dad00 commit 3564601

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

test/protocol/catch_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ def test_set_exception_breakpoints_unsets_exception_breakpoints
2626
run_protocol_scenario PROGRAM, cdp: false do
2727
req_set_exception_breakpoints([{ name: "RuntimeError" }])
2828
req_set_exception_breakpoints([])
29-
req_continue
29+
req_terminate_debuggee
3030
end
3131
end
3232

3333
def test_set_exception_breakpoints_accepts_condition
3434
run_protocol_scenario PROGRAM, cdp: false do
3535
req_set_exception_breakpoints([{ name: "RuntimeError", condition: "a == 2" }])
36-
req_continue
36+
req_terminate_debuggee
3737
end
3838

3939
run_protocol_scenario PROGRAM, cdp: false do

test/protocol/eval_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def test_eval_with_threads
7777
req_add_breakpoint 9
7878
req_continue
7979
assert_repl_result({value: 'false', type: 'FalseClass'}, 'm.lock.nil?', frame_idx: 0)
80-
req_continue
80+
req_terminate_debuggee
8181
end
8282
end
8383
end

test/support/protocol_test_case.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ def req_continue
111111
case get_target_ui
112112
when 'vscode'
113113
send_dap_request 'continue', threadId: 1
114+
find_response :event, 'stopped', 'V<D'
114115
when 'chrome'
115116
send_cdp_request 'Debugger.resume'
116117
res = find_response :method, 'Debugger.paused', 'C<D'
@@ -122,6 +123,7 @@ def req_step
122123
case get_target_ui
123124
when 'vscode'
124125
send_dap_request 'stepIn', threadId: 1
126+
find_response :event, 'stopped', 'V<D'
125127
when 'chrome'
126128
send_cdp_request 'Debugger.stepInto'
127129
res = find_response :method, 'Debugger.paused', 'C<D'
@@ -133,6 +135,7 @@ def req_next
133135
case get_target_ui
134136
when 'vscode'
135137
send_dap_request 'next', threadId: 1
138+
find_response :event, 'stopped', 'V<D'
136139
when 'chrome'
137140
send_cdp_request 'Debugger.stepOver'
138141
res = find_response :method, 'Debugger.paused', 'C<D'
@@ -144,6 +147,7 @@ def req_finish
144147
case get_target_ui
145148
when 'vscode'
146149
send_dap_request 'stepOut', threadId: 1
150+
find_response :event, 'stopped', 'V<D'
147151
when 'chrome'
148152
send_cdp_request 'Debugger.stepOut'
149153
res = find_response :method, 'Debugger.paused', 'C<D'

0 commit comments

Comments
 (0)