test/test_helper.rb in fizx-proxymachine-1.3.0 vs test/test_helper.rb in fizx-proxymachine-1.4.0
- old
+ new
@@ -15,10 +15,11 @@
@@port = port
EM.start_server(host, port, self)
end
def receive_data(data)
+ sleep $1.to_f if data =~ /^sleep (.*)/
send_data("#{@@port}:#{data}")
close_connection_after_writing
end
end
end
@@ -52,6 +53,6 @@
harikari(ppid)
EM.run do
EventMachine::Protocols::TestConnection.start('localhost', port)
end
end
-end
\ No newline at end of file
+end