Skip to content

Commit 6998bb4

Browse files
committed
Avoid raising debuggee not finished error if assertions failed
When assertions failed, we should let the AssertionFailedError surface and not calling flunk so we can get correct failure messages.
1 parent 5b29bd7 commit 6998bb4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/support/protocol_test_case.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,9 +334,12 @@ def execute_dap_scenario scenario
334334

335335
attach_to_dap_server
336336
scenario.call
337+
rescue Test::Unit::AssertionFailedError => e
338+
is_assertion_failure = true
339+
raise e
337340
ensure
338341
kill_remote_debuggee test_info
339-
if name = test_info.failed_process
342+
if name = test_info.failed_process && !is_assertion_failure
340343
flunk create_protocol_message "Expected the debuggee program to finish"
341344
end
342345
# Because the debuggee may be terminated by executing the following operations, we need to run them after `kill_remote_debuggee` method.

0 commit comments

Comments
 (0)