Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix flakey test "test_reponse_returns_correct_threads_info" #1089

Merged
merged 1 commit into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions test/protocol/catch_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ def test_set_exception_breakpoints_unsets_exception_breakpoints
run_protocol_scenario PROGRAM, cdp: false do
req_set_exception_breakpoints([{ name: "RuntimeError" }])
req_set_exception_breakpoints([])
req_continue
req_terminate_debuggee
end
end

def test_set_exception_breakpoints_accepts_condition
run_protocol_scenario PROGRAM, cdp: false do
req_set_exception_breakpoints([{ name: "RuntimeError", condition: "a == 2" }])
req_continue
req_terminate_debuggee
end

run_protocol_scenario PROGRAM, cdp: false do
Expand Down
2 changes: 1 addition & 1 deletion test/protocol/eval_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def test_eval_with_threads
req_add_breakpoint 9
req_continue
assert_repl_result({value: 'false', type: 'FalseClass'}, 'm.lock.nil?', frame_idx: 0)
req_continue
req_terminate_debuggee
end
end
end
Expand Down
4 changes: 4 additions & 0 deletions test/support/protocol_test_case.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ def req_continue
case get_target_ui
when 'vscode'
send_dap_request 'continue', threadId: 1
find_response :event, 'stopped', 'V<D'
when 'chrome'
send_cdp_request 'Debugger.resume'
res = find_response :method, 'Debugger.paused', 'C<D'
Expand All @@ -122,6 +123,7 @@ def req_step
case get_target_ui
when 'vscode'
send_dap_request 'stepIn', threadId: 1
find_response :event, 'stopped', 'V<D'
when 'chrome'
send_cdp_request 'Debugger.stepInto'
res = find_response :method, 'Debugger.paused', 'C<D'
Expand All @@ -133,6 +135,7 @@ def req_next
case get_target_ui
when 'vscode'
send_dap_request 'next', threadId: 1
find_response :event, 'stopped', 'V<D'
when 'chrome'
send_cdp_request 'Debugger.stepOver'
res = find_response :method, 'Debugger.paused', 'C<D'
Expand All @@ -144,6 +147,7 @@ def req_finish
case get_target_ui
when 'vscode'
send_dap_request 'stepOut', threadId: 1
find_response :event, 'stopped', 'V<D'
when 'chrome'
send_cdp_request 'Debugger.stepOut'
res = find_response :method, 'Debugger.paused', 'C<D'
Expand Down