Add bin and edit workflow
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 9s

This commit is contained in:
2026-09-16 13:11:16 -06:00
parent c8ac4fcae5
commit 4cee170d66
17576 changed files with 895740 additions and 2 deletions
@@ -0,0 +1,50 @@
require 'em_test_helper'
if EM.kqueue?
class TestProcessWatch < Test::Unit::TestCase
module ParentProcessWatcher
def process_forked
$forked = true
end
end
module ChildProcessWatcher
def process_exited
$exited = true
end
def unbind
$unbind = true
EM.stop
end
end
def setup
EM.kqueue = true
end
def teardown
EM.kqueue = false
end
def test_events
omit_if(rbx?)
omit_if(jruby?)
EM.run{
# watch ourselves for a fork notification
EM.watch_process(Process.pid, ParentProcessWatcher)
$fork_pid = fork{ sleep }
child = EM.watch_process($fork_pid, ChildProcessWatcher)
$pid = child.pid
EM.add_timer(0.2){
Process.kill('TERM', $fork_pid)
}
}
assert_equal($pid, $fork_pid)
assert($forked)
assert($exited)
assert($unbind)
end
end
end