Skip to content

Commit

Permalink
Fix one of flakey test in protocol tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ono-max committed Jan 7, 2024
1 parent ab937ac commit 3f44244
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/support/protocol_test_case.rb
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,16 @@ def req_step_back
end

def req_terminate_debuggee
# Kernel#exit method will be called when the debuggee receives the following method.
case get_target_ui
when 'vscode'
send_dap_request 'terminate'
when 'chrome'
send_cdp_request 'Runtime.terminateExecution'
end
# Ensure debuggee exit by waiting for Kernel#exit in server_cdp.rb to complete.
# This `wait_pid` is called to prevent disconnection before the debuggee exits.
flunk create_protocol_msg test_info, "Expected the debuggee program to finish" unless wait_pid @remote_info.pid, 3

close_reader
end
Expand Down

0 comments on commit 3f44244

Please sign in to comment.