eventmachine 1.0.0.beta.2-x86-mswin32-60 → 1.0.0.beta.3-x86-mswin32-60
Sign up to get free protection for your applications and to get access to all the features.
- data/.yardopts +3 -0
- data/Gemfile +1 -0
- data/eventmachine.gemspec +1 -3
- data/ext/cmain.cpp +4 -4
- data/ext/ed.cpp +13 -16
- data/ext/ed.h +9 -10
- data/ext/em.cpp +14 -24
- data/ext/eventmachine.h +2 -2
- data/ext/extconf.rb +1 -1
- data/ext/rubymain.cpp +8 -6
- data/lib/em/connection.rb +3 -1
- data/lib/em/pure_ruby.rb +17 -17
- data/lib/em/resolver.rb +186 -0
- data/lib/em/spawnable.rb +3 -7
- data/lib/em/version.rb +1 -1
- data/lib/eventmachine.rb +6 -4
- data/lib/jeventmachine.rb +1 -1
- data/tasks/package.rake +4 -1
- data/tasks/test.rake +1 -0
- data/tests/em_test_helper.rb +55 -0
- data/tests/test_attach.rb +46 -56
- data/tests/test_basic.rb +74 -96
- data/tests/test_channel.rb +2 -4
- data/tests/test_connection_count.rb +1 -3
- data/tests/test_defer.rb +13 -44
- data/tests/test_deferrable.rb +19 -19
- data/tests/test_epoll.rb +25 -55
- data/tests/test_error_handler.rb +10 -7
- data/tests/test_exc.rb +6 -33
- data/tests/test_file_watch.rb +51 -35
- data/tests/test_futures.rb +9 -37
- data/tests/test_get_sock_opt.rb +27 -20
- data/tests/test_handler_check.rb +1 -3
- data/tests/test_hc.rb +24 -59
- data/tests/test_httpclient.rb +27 -64
- data/tests/test_httpclient2.rb +1 -29
- data/tests/test_inactivity_timeout.rb +44 -40
- data/tests/test_kb.rb +26 -52
- data/tests/test_ltp.rb +23 -67
- data/tests/test_ltp2.rb +1 -30
- data/tests/test_next_tick.rb +1 -30
- data/tests/test_object_protocol.rb +8 -9
- data/tests/test_pause.rb +45 -37
- data/tests/test_pending_connect_timeout.rb +42 -38
- data/tests/test_process_watch.rb +1 -3
- data/tests/test_processes.rb +92 -110
- data/tests/test_proxy_connection.rb +128 -104
- data/tests/test_pure.rb +29 -75
- data/tests/test_queue.rb +2 -4
- data/tests/test_resolver.rb +55 -0
- data/tests/test_running.rb +1 -29
- data/tests/test_sasl.rb +7 -32
- data/tests/test_send_file.rb +162 -196
- data/tests/test_servers.rb +13 -56
- data/tests/test_smtpclient.rb +1 -29
- data/tests/test_smtpserver.rb +1 -29
- data/tests/test_spawn.rb +2 -31
- data/tests/test_ssl_args.rb +9 -10
- data/tests/test_ssl_methods.rb +1 -3
- data/tests/test_ssl_verify.rb +63 -63
- data/tests/test_tick_loop.rb +1 -1
- data/tests/test_timers.rb +52 -89
- data/tests/test_ud.rb +1 -29
- metadata +20 -10
- data/setup.rb +0 -1585
- data/tests/test_errors.rb +0 -82
- data/tests/testem.rb +0 -31
data/tests/test_errors.rb
DELETED
@@ -1,82 +0,0 @@
|
|
1
|
-
# $Id$
|
2
|
-
#
|
3
|
-
# Author:: Francis Cianfrocca (gmail: blackhedd)
|
4
|
-
# Homepage:: http://rubyeventmachine.com
|
5
|
-
# Date:: 8 April 2006
|
6
|
-
#
|
7
|
-
# See EventMachine and EventMachine::Connection for documentation and
|
8
|
-
# usage examples.
|
9
|
-
#
|
10
|
-
#----------------------------------------------------------------------------
|
11
|
-
#
|
12
|
-
# Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved.
|
13
|
-
# Gmail: blackhedd
|
14
|
-
#
|
15
|
-
# This program is free software; you can redistribute it and/or modify
|
16
|
-
# it under the terms of either: 1) the GNU General Public License
|
17
|
-
# as published by the Free Software Foundation; either version 2 of the
|
18
|
-
# License, or (at your option) any later version; or 2) Ruby's License.
|
19
|
-
#
|
20
|
-
# See the file COPYING for complete licensing information.
|
21
|
-
#
|
22
|
-
#---------------------------------------------------------------------------
|
23
|
-
#
|
24
|
-
#
|
25
|
-
#
|
26
|
-
|
27
|
-
|
28
|
-
###### THIS TEST IS NOW OBSOLETE.
|
29
|
-
###### As of 27Dec07, the hookable error handling is obsolete because
|
30
|
-
###### of its performance impact.
|
31
|
-
|
32
|
-
|
33
|
-
$:.unshift "../lib"
|
34
|
-
require 'eventmachine'
|
35
|
-
require 'test/unit'
|
36
|
-
|
37
|
-
class TestErrors < Test::Unit::TestCase
|
38
|
-
|
39
|
-
Localhost = "127.0.0.1"
|
40
|
-
Localport = 9801
|
41
|
-
|
42
|
-
def setup
|
43
|
-
end
|
44
|
-
|
45
|
-
def obsolete_teardown
|
46
|
-
# Calling #set_runtime_error_hook with no block restores the
|
47
|
-
# default handling of runtime_errors.
|
48
|
-
#
|
49
|
-
EM.set_runtime_error_hook
|
50
|
-
end
|
51
|
-
|
52
|
-
def test_no_tests_stub
|
53
|
-
end
|
54
|
-
|
55
|
-
# EM has a default handler for RuntimeErrors that are emitted from
|
56
|
-
# user written code. You can override the handler if you wish, but it's
|
57
|
-
# easier to call #set_runtime_error_hook.
|
58
|
-
# Ordinarily, an error in user code invoked by the reactor aborts the
|
59
|
-
# run.
|
60
|
-
#
|
61
|
-
def obsolete_test_unhandled_error
|
62
|
-
assert_raises( RuntimeError ) {
|
63
|
-
EM.run {
|
64
|
-
EM.add_timer(0) {raise "AAA"}
|
65
|
-
}
|
66
|
-
}
|
67
|
-
|
68
|
-
end
|
69
|
-
|
70
|
-
def obsolete_test_handled_error
|
71
|
-
err = nil
|
72
|
-
EM.run {
|
73
|
-
EM.set_runtime_error_hook {
|
74
|
-
err = true
|
75
|
-
EM.stop
|
76
|
-
}
|
77
|
-
EM.add_timer(0) {raise "AAA"}
|
78
|
-
}
|
79
|
-
assert err
|
80
|
-
end
|
81
|
-
end
|
82
|
-
|
data/tests/testem.rb
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
# $Id$
|
2
|
-
|
3
|
-
require 'test/unit'
|
4
|
-
|
5
|
-
module EmTestRunner
|
6
|
-
@em_root = File.expand_path(File.dirname(__FILE__) + '/../')
|
7
|
-
@lib_dir = File.join(@em_root, 'lib')
|
8
|
-
@ext_dir = File.join(@em_root, 'ext')
|
9
|
-
@java_dir = File.join(@em_root, 'java')
|
10
|
-
|
11
|
-
def self.run(glob = 'test_*.rb')
|
12
|
-
$:.unshift(@lib_dir)
|
13
|
-
$:.unshift(@ext_dir)
|
14
|
-
$:.unshift(@java_dir)
|
15
|
-
|
16
|
-
case glob
|
17
|
-
when Array
|
18
|
-
files = glob
|
19
|
-
else
|
20
|
-
files = Dir[File.dirname(__FILE__) + '/' + glob]
|
21
|
-
end
|
22
|
-
|
23
|
-
files.each do |tc|
|
24
|
-
require tc
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
if __FILE__ == $0
|
30
|
-
EmTestRunner.run
|
31
|
-
end
|