From 619c7a966d6339ef8deab932164be177ee88c548 Mon Sep 17 00:00:00 2001 From: Naoto Ono Date: Sun, 7 Jan 2024 21:48:32 +0900 Subject: [PATCH] Fix one of flakey test in protocol tests --- lib/debug/server_cdp.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/debug/server_cdp.rb b/lib/debug/server_cdp.rb index d4e012fe2..33358bf3d 100644 --- a/lib/debug/server_cdp.rb +++ b/lib/debug/server_cdp.rb @@ -489,7 +489,12 @@ def process id: SecureRandom.hex when 'Runtime.terminateExecution' send_response req - exit + if SESSION.in_subsession? + @q_msg << 'kill!' + else + @q_msg << 'kill!' + pause + end when 'Page.startScreencast', 'Emulation.setTouchEmulationEnabled', 'Emulation.setEmitTouchEventsForMouse', 'Runtime.compileScript', 'Page.getResourceContent', 'Overlay.setPausedInDebuggerMessage', 'Runtime.releaseObjectGroup', 'Runtime.discardConsoleEntries', 'Log.clear', 'Runtime.runIfWaitingForDebugger'