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,36 @@
require 'em_test_helper'
class TestObjectProtocol < Test::Unit::TestCase
module Server
include EM::P::ObjectProtocol
def post_init
send_object :hello=>'world'
end
def receive_object obj
$server = obj
EM.stop
end
end
module Client
include EM::P::ObjectProtocol
def receive_object obj
$client = obj
send_object 'you_said'=>obj
end
end
def setup
@port = next_port
end
def test_send_receive
EM.run{
EM.start_server "127.0.0.1", @port, Server
EM.connect "127.0.0.1", @port, Client
}
assert($client == {:hello=>'world'})
assert($server == {'you_said'=>{:hello=>'world'}})
end
end