Skip to content

Commit fdd041a

Browse files
committed
Stop using at_exit to shutdown playwright
The processes of Playwright and headless browser can stop when the ruby process terminates.
1 parent 023d23c commit fdd041a

File tree

2 files changed

+1
-14
lines changed

2 files changed

+1
-14
lines changed

lib/charty/backends/backend_helpers/playwright_manager.rb

-4
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,6 @@ module PlaywrightManager
5757
@_context = nil
5858
@_browser = nil
5959
end
60-
61-
at_exit do
62-
shutdown
63-
end
6460
end
6561
end
6662
end

test/run.rb

+1-10
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,4 @@
1616

1717
require_relative "helper"
1818

19-
result = Test::Unit::AutoRunner.run(true, test_dir.to_s)
20-
21-
if defined? Charty::Backends::BackendHelpers::PlaywrightManager
22-
require "timeout"
23-
Timeout.timeout(60) do
24-
Charty::Backends::BackendHelpers::PlaywrightManager.shutdown
25-
end
26-
end
27-
28-
exit(result)
19+
exit(Test::Unit::AutoRunner.run(true, test_dir.to_s))

0 commit comments

Comments
 (0)