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,31 @@
require 'em_test_helper'
class TestIdleConnection < Test::Unit::TestCase
def setup
@port = next_port
end
def test_idle_time
omit_if(!EM.respond_to?(:get_idle_time))
a, b = nil, nil
EM.run do
EM.start_server '127.0.0.1', @port, Module.new
conn = EM.connect '127.0.0.1', @port
EM.add_timer(0.3) do
a = conn.get_idle_time
conn.send_data 'a'
EM.next_tick do
EM.next_tick do
b = conn.get_idle_time
conn.close_connection
EM.stop
end
end
end
end
assert_in_delta 0.3, a, 0.1
assert_in_delta 0, b, 0.1
end
end