r2corba 1.5.1-x64-mingw32 → 1.6.1-x64-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/LICENSE +5 -5
- data/README.rdoc +62 -0
- data/THANKS +4 -4
- data/lib/corba/cbase/IORMap.rb +0 -1
- data/lib/corba/cbase/ORB.rb +26 -24
- data/lib/corba/cbase/Request.rb +4 -5
- data/lib/corba/cbase/Streams.rb +2 -3
- data/lib/corba/cbase/Stub.rb +0 -1
- data/lib/corba/cbase/Typecode.rb +6 -7
- data/lib/corba/cbase/Values.rb +4 -3
- data/lib/corba/cbase/exception.rb +6 -5
- data/lib/corba/cbase/poa.rb +1 -2
- data/lib/corba/cbase/policies.rb +3 -4
- data/lib/corba/cbase/post_require.rb +1 -2
- data/lib/corba/cbase/require.rb +10 -2
- data/lib/corba/cmds/base.rb +1 -2
- data/lib/corba/cmds/test.rb +0 -1
- data/lib/corba/common/Any.rb +3 -3
- data/lib/corba/common/IDL.rb +6 -10
- data/lib/corba/common/ORB.rb +22 -23
- data/lib/corba/common/Object.rb +18 -15
- data/lib/corba/common/Request.rb +1 -2
- data/lib/corba/common/Servant.rb +4 -5
- data/lib/corba/common/Struct.rb +1 -2
- data/lib/corba/common/Stub.rb +6 -7
- data/lib/corba/common/Typecode.rb +91 -65
- data/lib/corba/common/Union.rb +6 -2
- data/lib/corba/common/Values.rb +2 -2
- data/lib/corba/common/const.rb +2 -3
- data/lib/corba/common/exception.rb +2 -2
- data/lib/corba/common/require.rb +8 -1
- data/lib/corba/common/version.rb +3 -4
- data/lib/corba/idl/BiDirPolicyC.rb +2 -3
- data/lib/corba/idl/CosNamingC.rb +4 -5
- data/lib/corba/idl/CosNamingS.rb +2 -3
- data/lib/corba/idl/IDL.rb +1 -2
- data/lib/corba/idl/IORTable.pidl +0 -1
- data/lib/corba/idl/IORTableC.rb +2 -3
- data/lib/corba/idl/MessagingC.rb +2 -3
- data/lib/corba/idl/POAC.rb +10 -11
- data/lib/corba/idl/TAO_Ext.pidl +0 -1
- data/lib/corba/idl/TAO_ExtC.rb +2 -3
- data/lib/corba/idl/r2c_orb.rb +5 -6
- data/lib/corba/idl/require.rb +0 -1
- data/lib/corba/jbase/Any.rb +29 -28
- data/lib/corba/jbase/IORMap.rb +1 -2
- data/lib/corba/jbase/ORB.rb +5 -6
- data/lib/corba/jbase/Object.rb +13 -14
- data/lib/corba/jbase/Request.rb +9 -10
- data/lib/corba/jbase/Servant.rb +11 -12
- data/lib/corba/jbase/ServerRequest.rb +8 -9
- data/lib/corba/jbase/Streams.rb +68 -5
- data/lib/corba/jbase/Stub.rb +0 -1
- data/lib/corba/jbase/Typecode.rb +17 -17
- data/lib/corba/jbase/Values.rb +2 -1
- data/lib/corba/jbase/exception.rb +2 -2
- data/lib/corba/jbase/poa.rb +21 -22
- data/lib/corba/jbase/policies.rb +33 -34
- data/lib/corba/jbase/post_require.rb +0 -1
- data/lib/corba/jbase/require.rb +5 -2
- data/lib/corba/naming.rb +0 -1
- data/lib/corba/naming_service.rb +0 -1
- data/lib/corba/poa.rb +1 -2
- data/lib/corba/policies.rb +1 -2
- data/lib/corba/require.rb +2 -3
- data/lib/corba/svcs/ins/cos_naming.rb +74 -68
- data/lib/corba/svcs/ins/ins.rb +58 -59
- data/lib/corba/svcs/ins/naming_service.rb +9 -10
- data/lib/corba.rb +1 -2
- data/lib/ridlbe/ruby/config.rb +78 -74
- data/lib/ridlbe/ruby/require.rb +0 -1
- data/lib/ridlbe/ruby/walker.rb +311 -288
- data/mkrf_conf_bingem.rb +4 -6
- data/rakelib/bin.rake +2 -3
- data/rakelib/bin.rb +4 -5
- data/rakelib/build.rake +22 -22
- data/rakelib/config.rake +2 -3
- data/rakelib/config.rb +32 -34
- data/rakelib/ext.rake +18 -77
- data/rakelib/ext.rb +19 -58
- data/rakelib/ext_r2tao.rb +33 -60
- data/rakelib/gem.rake +53 -38
- data/rakelib/gem.rb +9 -10
- data/rakelib/package.rake +2 -3
- data/rakelib/test.rake +0 -1
- data/test/BiDirectional/Test.idl +0 -1
- data/test/BiDirectional/client.rb +18 -19
- data/test/BiDirectional/run_test.rb +11 -12
- data/test/BiDirectional/server.rb +21 -23
- data/test/CORBA_Services/Naming/BindingIterator/Test.idl +0 -1
- data/test/CORBA_Services/Naming/BindingIterator/client.rb +17 -18
- data/test/CORBA_Services/Naming/BindingIterator/run_test.rb +13 -14
- data/test/CORBA_Services/Naming/BindingIterator/server.rb +19 -20
- data/test/CORBA_Services/Naming/Corbaname/Test.idl +0 -1
- data/test/CORBA_Services/Naming/Corbaname/client.rb +15 -16
- data/test/CORBA_Services/Naming/Corbaname/run_test.rb +13 -14
- data/test/CORBA_Services/Naming/Corbaname/server.rb +27 -28
- data/test/CORBA_Services/Naming/Simple/Test.idl +0 -1
- data/test/CORBA_Services/Naming/Simple/client.rb +16 -17
- data/test/CORBA_Services/Naming/Simple/run_test.rb +13 -14
- data/test/CORBA_Services/Naming/Simple/server.rb +19 -20
- data/test/Collocation/Diamond.idl +0 -1
- data/test/Collocation/run_test.rb +10 -11
- data/test/Collocation/test.rb +27 -21
- data/test/Connect_Timeout/Test.idl +0 -1
- data/test/Connect_Timeout/client.rb +16 -18
- data/test/Connect_Timeout/run_test.rb +10 -11
- data/test/DII/Test.idl +0 -1
- data/test/DII/client.rb +30 -31
- data/test/DII/run_test.rb +11 -12
- data/test/DII/server.rb +16 -17
- data/test/DSI/Test.idl +0 -1
- data/test/DSI/client.rb +16 -17
- data/test/DSI/run_test.rb +11 -12
- data/test/DSI/server.rb +17 -18
- data/test/Exceptions/Test.idl +0 -1
- data/test/Exceptions/client.rb +22 -23
- data/test/Exceptions/run_test.rb +11 -12
- data/test/Exceptions/server.rb +16 -17
- data/test/Hello/Test.idl +0 -1
- data/test/Hello/client.rb +16 -17
- data/test/Hello/run_test.rb +11 -12
- data/test/Hello/server.rb +17 -18
- data/test/IDL_Test/Test.idl +4 -1
- data/test/IDL_Test/client.rb +24 -23
- data/test/IDL_Test/run_test.rb +11 -12
- data/test/IDL_Test/server.rb +23 -19
- data/test/IORMap/Test.idl +0 -1
- data/test/IORMap/client.rb +14 -15
- data/test/IORMap/run_test.rb +11 -12
- data/test/IORMap/server.rb +23 -24
- data/test/IORTable/Test.idl +0 -1
- data/test/IORTable/client.rb +14 -15
- data/test/IORTable/run_test.rb +11 -12
- data/test/IORTable/server.rb +23 -24
- data/test/Implicit_Conversion/Test.idl +0 -1
- data/test/Implicit_Conversion/client.rb +20 -18
- data/test/Implicit_Conversion/run_test.rb +11 -12
- data/test/Implicit_Conversion/server.rb +16 -17
- data/test/Multi_Threading/Multiple_ORB/Test.idl +0 -1
- data/test/Multi_Threading/Multiple_ORB/client.rb +14 -15
- data/test/Multi_Threading/Multiple_ORB/run_test.rb +12 -13
- data/test/Multi_Threading/Multiple_ORB/server.rb +17 -18
- data/test/Multi_Threading/Simple/Test.idl +0 -1
- data/test/Multi_Threading/Simple/client.rb +17 -18
- data/test/Multi_Threading/Simple/run_test.rb +11 -12
- data/test/Multi_Threading/Simple/server.rb +17 -18
- data/test/Multi_Threading/Threads/Test.idl +0 -4
- data/test/Multi_Threading/Threads/client.rb +23 -26
- data/test/Multi_Threading/Threads/run_test.rb +11 -12
- data/test/Multi_Threading/Threads/server.rb +19 -22
- data/test/Multi_Threading/Threads/watchdog.rb +16 -16
- data/test/Multiple_Servant_Interfaces/Test.idl +0 -1
- data/test/Multiple_Servant_Interfaces/client.rb +14 -15
- data/test/Multiple_Servant_Interfaces/run_test.rb +11 -12
- data/test/Multiple_Servant_Interfaces/server.rb +18 -19
- data/test/Nil/Test.idl +0 -1
- data/test/Nil/run_test.rb +10 -11
- data/test/Nil/test.rb +22 -20
- data/test/OBV/AbstractInterface/client.rb +14 -15
- data/test/OBV/AbstractInterface/run_test.rb +11 -12
- data/test/OBV/AbstractInterface/server.rb +20 -20
- data/test/OBV/AbstractInterface/test.idl +0 -1
- data/test/OBV/Custom/OBV_impl.rb +2 -1
- data/test/OBV/Custom/client.rb +14 -15
- data/test/OBV/Custom/run_test.rb +11 -12
- data/test/OBV/Custom/server.rb +16 -17
- data/test/OBV/Simple/OBV_impl.rb +1 -1
- data/test/OBV/Simple/client.rb +14 -15
- data/test/OBV/Simple/run_test.rb +11 -12
- data/test/OBV/Simple/server.rb +16 -17
- data/test/OBV/Simple_Event/Event_impl.rb +1 -1
- data/test/OBV/Simple_Event/client.rb +14 -15
- data/test/OBV/Simple_Event/run_test.rb +11 -12
- data/test/OBV/Simple_Event/server.rb +16 -17
- data/test/OBV/Supports/client.rb +19 -20
- data/test/OBV/Supports/run_test.rb +11 -12
- data/test/OBV/Supports/server.rb +15 -16
- data/test/OBV/Supports/supports.idl +0 -1
- data/test/OBV/Supports/supports_impl.rb +3 -1
- data/test/OBV/Tree/client.rb +14 -15
- data/test/OBV/Tree/run_test.rb +11 -12
- data/test/OBV/Tree/server.rb +19 -20
- data/test/OBV/Tree/test.idl +0 -1
- data/test/OBV/Truncatable/Extra.idl +0 -1
- data/test/OBV/Truncatable/Truncatable_impl.rb +1 -2
- data/test/OBV/Truncatable/client.rb +57 -58
- data/test/OBV/Truncatable/run_test.rb +11 -12
- data/test/OBV/Truncatable/server.rb +15 -16
- data/test/OBV/ValueBox/client.rb +154 -154
- data/test/OBV/ValueBox/run_test.rb +11 -12
- data/test/OBV/ValueBox/server.rb +42 -42
- data/test/Object/Test.idl +0 -1
- data/test/Object/client.rb +15 -16
- data/test/Object/run_test.rb +11 -12
- data/test/Object/server.rb +19 -20
- data/test/POA/run_test.rb +10 -11
- data/test/POA/test.rb +17 -18
- data/test/Param_Test/client.rb +53 -54
- data/test/Param_Test/run_test.rb +11 -12
- data/test/Param_Test/server.rb +60 -61
- data/test/Performance/Simple/Test.idl +0 -1
- data/test/Performance/Simple/client.rb +16 -17
- data/test/Performance/Simple/run_test.rb +11 -12
- data/test/Performance/Simple/server.rb +16 -17
- data/test/Policies/Test.idl +0 -1
- data/test/Policies/run_test.rb +10 -11
- data/test/Policies/test.rb +23 -25
- data/test/Timeout/client.rb +21 -22
- data/test/Timeout/run_test.rb +11 -12
- data/test/Timeout/server.rb +19 -20
- data/test/Timeout/test.idl +0 -1
- data/test/lib/assert.rb +0 -2
- data/test/lib/test.rb +29 -25
- data/test/test_runner.rb +22 -24
- metadata +24 -52
- data/README +0 -62
- data/test/BiDirectional/server.ior +0 -1
- data/test/CORBA_Services/Naming/BindingIterator/ins.ior +0 -1
- data/test/CORBA_Services/Naming/Corbaname/corbaname.ior +0 -1
- data/test/CORBA_Services/Naming/Corbaname/ins.ior +0 -1
- data/test/CORBA_Services/Naming/Simple/ins.ior +0 -1
- data/test/DII/server.ior +0 -1
- data/test/DSI/server.ior +0 -1
- data/test/Exceptions/server.ior +0 -1
- data/test/IDL_Test/server.ior +0 -1
- data/test/IORMap/server.ior +0 -1
- data/test/IORTable/server.ior +0 -1
- data/test/Implicit_Conversion/server.ior +0 -1
- data/test/Multi_Threading/Multiple_ORB/server0.ior +0 -1
- data/test/Multi_Threading/Multiple_ORB/server1.ior +0 -1
- data/test/Multi_Threading/Simple/server.ior +0 -1
- data/test/Multi_Threading/Threads/server.ior +0 -1
- data/test/Multi_Threading/Threads/watchdog.ior +0 -1
- data/test/Multiple_Servant_Interfaces/server.ior +0 -1
- data/test/OBV/AbstractInterface/server.ior +0 -1
- data/test/OBV/Custom/server.ior +0 -1
- data/test/OBV/Simple/server.ior +0 -1
- data/test/OBV/Simple_Event/server.ior +0 -1
- data/test/OBV/Supports/server.ior +0 -1
- data/test/OBV/Tree/server.ior +0 -1
- data/test/OBV/Truncatable/server.ior +0 -1
- data/test/OBV/ValueBox/server.ior +0 -1
- data/test/Object/server.ior +0 -1
- data/test/Param_Test/server.ior +0 -1
- data/test/Performance/Simple/server.ior +0 -1
- data/test/Timeout/server.ior +0 -1
@@ -7,7 +7,6 @@
|
|
7
7
|
# included with this program.
|
8
8
|
#
|
9
9
|
# Copyright (c) Remedy IT Expertise BV
|
10
|
-
# Chamber of commerce Rotterdam nr.276339, The Netherlands
|
11
10
|
#--------------------------------------------------------------------
|
12
11
|
|
13
12
|
OPTIONS = {
|
@@ -21,19 +20,19 @@ ARGV.options do |opts|
|
|
21
20
|
script_name = File.basename($0)
|
22
21
|
opts.banner = "Usage: ruby #{script_name} [options]"
|
23
22
|
|
24
|
-
opts.separator
|
23
|
+
opts.separator ''
|
25
24
|
|
26
|
-
opts.on(
|
27
|
-
|
28
|
-
|
29
|
-
opts.on(
|
30
|
-
|
31
|
-
|
25
|
+
opts.on('-d',
|
26
|
+
'Run with debugging output.',
|
27
|
+
'Default: false') { OPTIONS[:debug_opt] = '--d 10' }
|
28
|
+
opts.on('--use-stubs',
|
29
|
+
'Use stubs generated by RIDL.',
|
30
|
+
'Default: false (uses embedded IDL)') { OPTIONS[:use_implement] = '' }
|
32
31
|
|
33
|
-
opts.separator
|
32
|
+
opts.separator ''
|
34
33
|
|
35
|
-
opts.on(
|
36
|
-
|
34
|
+
opts.on('-h', '--help',
|
35
|
+
'Show this help message.') { puts opts; exit }
|
37
36
|
|
38
37
|
opts.parse!
|
39
38
|
end
|
@@ -60,7 +59,7 @@ end
|
|
60
59
|
|
61
60
|
exrc = clt.wait(400)
|
62
61
|
|
63
|
-
if exrc ==0
|
62
|
+
if exrc == 0
|
64
63
|
srv.wait(400)
|
65
64
|
else
|
66
65
|
srv.wait_term(400)
|
@@ -7,7 +7,6 @@
|
|
7
7
|
# included with this program.
|
8
8
|
#
|
9
9
|
# Copyright (c) Remedy IT Expertise BV
|
10
|
-
# Chamber of commerce Rotterdam nr.276339, The Netherlands
|
11
10
|
#--------------------------------------------------------------------
|
12
11
|
|
13
12
|
require 'optparse'
|
@@ -22,22 +21,22 @@ ARGV.options do |opts|
|
|
22
21
|
script_name = File.basename($0)
|
23
22
|
opts.banner = "Usage: ruby #{script_name} [options]"
|
24
23
|
|
25
|
-
opts.separator
|
24
|
+
opts.separator ''
|
26
25
|
|
27
|
-
opts.on(
|
28
|
-
|
29
|
-
"Default: 'server.ior'") { |v| OPTIONS[:iorfile]=v }
|
30
|
-
opts.on(
|
31
|
-
|
32
|
-
|
33
|
-
opts.on(
|
34
|
-
|
35
|
-
|
26
|
+
opts.on('--o IORFILE',
|
27
|
+
'Set IOR filename.',
|
28
|
+
"Default: 'server.ior'") { |v| OPTIONS[:iorfile] = v }
|
29
|
+
opts.on('--d LVL',
|
30
|
+
'Set ORBDebugLevel value.',
|
31
|
+
'Default: 0') { |v| OPTIONS[:orb_debuglevel] = v }
|
32
|
+
opts.on('--use-implement',
|
33
|
+
'Load IDL through CORBA.implement() instead of precompiled code.',
|
34
|
+
'Default: off') { |v| OPTIONS[:use_implement] = v }
|
36
35
|
|
37
|
-
opts.separator
|
36
|
+
opts.separator ''
|
38
37
|
|
39
|
-
opts.on(
|
40
|
-
|
38
|
+
opts.on('-h', '--help',
|
39
|
+
'Show this help message.') { puts opts; exit }
|
41
40
|
|
42
41
|
opts.parse!
|
43
42
|
end
|
@@ -61,9 +60,9 @@ class MyHello < POA::Test::Hello
|
|
61
60
|
def shutdown()
|
62
61
|
@orb.shutdown()
|
63
62
|
end
|
64
|
-
end #of servant MyHello
|
63
|
+
end # of servant MyHello
|
65
64
|
|
66
|
-
orb = CORBA.ORB_init([
|
65
|
+
orb = CORBA.ORB_init(['-ORBDebugLevel', OPTIONS[:orb_debuglevel]], 'myORB')
|
67
66
|
|
68
67
|
obj = orb.resolve_initial_references('RootPOA')
|
69
68
|
|
@@ -84,7 +83,7 @@ open(OPTIONS[:iorfile], 'w') { |io|
|
|
84
83
|
}
|
85
84
|
|
86
85
|
Signal.trap('INT') do
|
87
|
-
puts
|
86
|
+
puts 'SIGINT - shutting down ORB...'
|
88
87
|
orb.shutdown()
|
89
88
|
end
|
90
89
|
|
data/test/Policies/Test.idl
CHANGED
@@ -6,7 +6,6 @@
|
|
6
6
|
* included with this program.
|
7
7
|
*
|
8
8
|
* Copyright (c) Remedy IT Expertise BV
|
9
|
-
* Chamber of commerce Rotterdam nr.276339, The Netherlands
|
10
9
|
*--------------------------------------------------------------------*/
|
11
10
|
|
12
11
|
/// Put the interfaces in a module, to avoid global namespace pollution
|
data/test/Policies/run_test.rb
CHANGED
@@ -7,7 +7,6 @@
|
|
7
7
|
# included with this program.
|
8
8
|
#
|
9
9
|
# Copyright (c) Remedy IT Expertise BV
|
10
|
-
# Chamber of commerce Rotterdam nr.276339, The Netherlands
|
11
10
|
#--------------------------------------------------------------------
|
12
11
|
|
13
12
|
OPTIONS = {
|
@@ -21,19 +20,19 @@ ARGV.options do |opts|
|
|
21
20
|
script_name = File.basename($0)
|
22
21
|
opts.banner = "Usage: ruby #{script_name} [options]"
|
23
22
|
|
24
|
-
opts.separator
|
23
|
+
opts.separator ''
|
25
24
|
|
26
|
-
opts.on(
|
27
|
-
|
28
|
-
|
29
|
-
opts.on(
|
30
|
-
|
31
|
-
|
25
|
+
opts.on('-d',
|
26
|
+
'Run with debugging output.',
|
27
|
+
'Default: false') { OPTIONS[:debug_opt] = '--d 10' }
|
28
|
+
opts.on('--use-stubs',
|
29
|
+
'Use stubs generated by RIDL.',
|
30
|
+
'Default: false (uses embedded IDL)') { OPTIONS[:use_implement] = '' }
|
32
31
|
|
33
|
-
opts.separator
|
32
|
+
opts.separator ''
|
34
33
|
|
35
|
-
opts.on(
|
36
|
-
|
34
|
+
opts.on('-h', '--help',
|
35
|
+
'Show this help message.') { puts opts; exit }
|
37
36
|
|
38
37
|
opts.parse!
|
39
38
|
end
|
data/test/Policies/test.rb
CHANGED
@@ -7,7 +7,6 @@
|
|
7
7
|
# included with this program.
|
8
8
|
#
|
9
9
|
# Copyright (c) Remedy IT Expertise BV
|
10
|
-
# Chamber of commerce Rotterdam nr.276339, The Netherlands
|
11
10
|
#--------------------------------------------------------------------
|
12
11
|
|
13
12
|
require 'optparse'
|
@@ -23,19 +22,19 @@ ARGV.options do |opts|
|
|
23
22
|
script_name = File.basename($0)
|
24
23
|
opts.banner = "Usage: ruby #{script_name} [options]"
|
25
24
|
|
26
|
-
opts.separator
|
25
|
+
opts.separator ''
|
27
26
|
|
28
|
-
opts.on(
|
29
|
-
|
30
|
-
|
31
|
-
opts.on(
|
32
|
-
|
33
|
-
|
27
|
+
opts.on('--d LVL',
|
28
|
+
'Set ORBDebugLevel value.',
|
29
|
+
'Default: 0') { |v| OPTIONS[:orb_debuglevel] = v }
|
30
|
+
opts.on('--use-implement',
|
31
|
+
'Load IDL through CORBA.implement() instead of precompiled code.',
|
32
|
+
'Default: off') { |v| OPTIONS[:use_implement] = v }
|
34
33
|
|
35
|
-
opts.separator
|
34
|
+
opts.separator ''
|
36
35
|
|
37
|
-
opts.on(
|
38
|
-
|
36
|
+
opts.on('-h', '--help',
|
37
|
+
'Show this help message.') { puts opts; exit }
|
39
38
|
|
40
39
|
opts.parse!
|
41
40
|
end
|
@@ -54,24 +53,24 @@ class MyHello < POA::Test::Hello
|
|
54
53
|
end
|
55
54
|
|
56
55
|
def get_string()
|
57
|
-
|
56
|
+
'Hello there!'
|
58
57
|
end
|
59
58
|
|
60
59
|
def shutdown()
|
61
60
|
@orb.shutdown()
|
62
61
|
end
|
63
|
-
end #of servant MyHello
|
62
|
+
end # of servant MyHello
|
64
63
|
|
65
64
|
if defined?(JRUBY_VERSION)
|
66
65
|
## JacORB needs explicit activation of this option
|
67
66
|
props = {
|
68
|
-
|
69
|
-
|
67
|
+
'org.omg.PortableInterceptor.ORBInitializerClass.bidir_init' =>
|
68
|
+
'org.jacorb.orb.giop.BiDirConnectionInitializer'
|
70
69
|
}
|
71
70
|
else
|
72
71
|
props = {}
|
73
72
|
end
|
74
|
-
orb = CORBA.ORB_init([
|
73
|
+
orb = CORBA.ORB_init(['-ORBDebugLevel', OPTIONS[:orb_debuglevel]], 'myORB', props)
|
75
74
|
|
76
75
|
begin
|
77
76
|
|
@@ -82,31 +81,31 @@ begin
|
|
82
81
|
assert_not 'Failed to resolve RootPOA', CORBA.is_nil(rootpoa) || !rootpoa.is_a?(PortableServer::POA)
|
83
82
|
|
84
83
|
pol = rootpoa.create_thread_policy(PortableServer::SINGLE_THREAD_MODEL)
|
85
|
-
assert 'Failed to create correct policy'
|
84
|
+
assert 'Failed to create correct policy',
|
86
85
|
!pol.nil? and pol.is_a?(PortableServer::ThreadPolicy) and pol.value == PortableServer::SINGLE_THREAD_MODEL
|
87
86
|
|
88
87
|
pol = rootpoa.create_lifespan_policy(PortableServer::PERSISTENT)
|
89
|
-
assert 'Failed to create correct policy'
|
88
|
+
assert 'Failed to create correct policy',
|
90
89
|
!pol.nil? and pol.is_a?(PortableServer::LifespanPolicy) and pol.value == PortableServer::PERSISTENT
|
91
90
|
|
92
91
|
pol = rootpoa.create_id_uniqueness_policy(PortableServer::UNIQUE_ID)
|
93
|
-
assert 'Failed to create correct policy'
|
92
|
+
assert 'Failed to create correct policy',
|
94
93
|
!pol.nil? and pol.is_a?(PortableServer::IdUniquenessPolicy) and pol.value == PortableServer::UNIQUE_ID
|
95
94
|
|
96
95
|
pol = rootpoa.create_id_assignment_policy(PortableServer::USER_ID)
|
97
|
-
assert 'Failed to create correct policy'
|
96
|
+
assert 'Failed to create correct policy',
|
98
97
|
!pol.nil? and pol.is_a?(PortableServer::IdAssignmentPolicy) and pol.value == PortableServer::USER_ID
|
99
98
|
|
100
99
|
pol = rootpoa.create_implicit_activation_policy(PortableServer::NO_IMPLICIT_ACTIVATION)
|
101
|
-
assert 'Failed to create correct policy'
|
100
|
+
assert 'Failed to create correct policy',
|
102
101
|
!pol.nil? and pol.is_a?(PortableServer::ImplicitActivationPolicy) and pol.value == PortableServer::NO_IMPLICIT_ACTIVATION
|
103
102
|
|
104
103
|
pol = rootpoa.create_servant_retention_policy(PortableServer::RETAIN)
|
105
|
-
assert 'Failed to create correct policy'
|
104
|
+
assert 'Failed to create correct policy',
|
106
105
|
!pol.nil? and pol.is_a?(PortableServer::ServantRetentionPolicy) and pol.value == PortableServer::RETAIN
|
107
106
|
|
108
107
|
pol = rootpoa.create_request_processing_policy(PortableServer::USE_DEFAULT_SERVANT)
|
109
|
-
assert 'Failed to create correct policy'
|
108
|
+
assert 'Failed to create correct policy',
|
110
109
|
!pol.nil? and pol.is_a?(PortableServer::RequestProcessingPolicy) and pol.value == PortableServer::USE_DEFAULT_SERVANT
|
111
110
|
|
112
111
|
assert_except('orb.create_policy should have thrown a PolicyError',
|
@@ -114,7 +113,7 @@ begin
|
|
114
113
|
|
115
114
|
pol = orb.create_policy(BiDirPolicy::BIDIRECTIONAL_POLICY_TYPE,
|
116
115
|
CORBA::Any.to_any(BiDirPolicy::BOTH, BiDirPolicy::BidirectionalPolicyValue._tc))
|
117
|
-
assert 'Failed to create correct policy'
|
116
|
+
assert 'Failed to create correct policy',
|
118
117
|
!pol.nil? and pol.is_a?(BiDirPolicy) and pol.value == BiDirPolicy::BOTH
|
119
118
|
|
120
119
|
poa_man = rootpoa.the_POAManager
|
@@ -141,4 +140,3 @@ begin
|
|
141
140
|
ensure
|
142
141
|
orb.destroy()
|
143
142
|
end
|
144
|
-
|
data/test/Timeout/client.rb
CHANGED
@@ -7,7 +7,6 @@
|
|
7
7
|
# included with this program.
|
8
8
|
#
|
9
9
|
# Copyright (c) Remedy IT Expertise BV
|
10
|
-
# Chamber of commerce Rotterdam nr.276339, The Netherlands
|
11
10
|
#--------------------------------------------------------------------
|
12
11
|
|
13
12
|
require 'optparse'
|
@@ -24,22 +23,22 @@ ARGV.options do |opts|
|
|
24
23
|
script_name = File.basename($0)
|
25
24
|
opts.banner = "Usage: ruby #{script_name} [options]"
|
26
25
|
|
27
|
-
opts.separator
|
26
|
+
opts.separator ''
|
28
27
|
|
29
|
-
opts.on(
|
30
|
-
|
31
|
-
"Default: 'file://server.ior'") { |v| OPTIONS[:iorfile]=v }
|
32
|
-
opts.on(
|
33
|
-
|
34
|
-
|
35
|
-
opts.on(
|
36
|
-
|
37
|
-
|
28
|
+
opts.on('--k IORFILE',
|
29
|
+
'Set IOR.',
|
30
|
+
"Default: 'file://server.ior'") { |v| OPTIONS[:iorfile] = v }
|
31
|
+
opts.on('--d LVL',
|
32
|
+
'Set ORBDebugLevel value.',
|
33
|
+
'Default: 0', Integer) { |v| OPTIONS[:orb_debuglevel] = v }
|
34
|
+
opts.on('--use-implement',
|
35
|
+
'Load IDL through CORBA.implement() instead of precompiled code.',
|
36
|
+
'Default: off') { |v| OPTIONS[:use_implement] = v }
|
38
37
|
|
39
|
-
opts.separator
|
38
|
+
opts.separator ''
|
40
39
|
|
41
|
-
opts.on(
|
42
|
-
|
40
|
+
opts.on('-h', '--help',
|
41
|
+
'Show this help message.') { puts opts; exit }
|
43
42
|
|
44
43
|
opts.parse!
|
45
44
|
end
|
@@ -56,7 +55,7 @@ Min_timeout = 0
|
|
56
55
|
Max_timeout = 20
|
57
56
|
|
58
57
|
None, Orb1, Thread1, Object1 = (0..3).to_a
|
59
|
-
To_type_names = [
|
58
|
+
To_type_names = ['none', 'orb', 'thread', 'object']
|
60
59
|
|
61
60
|
Timeout_count = [0, 0, 0, 0]
|
62
61
|
In_time_count = [0, 0, 0, 0]
|
@@ -70,7 +69,7 @@ def send_echo (ctype, orb, server, t)
|
|
70
69
|
Timeout_count[ctype] += 1
|
71
70
|
|
72
71
|
# Trap this exception and continue...
|
73
|
-
puts
|
72
|
+
puts '==> Trapped a TIMEOUT exception (expected)'
|
74
73
|
|
75
74
|
# Sleep so the server can send the reply...
|
76
75
|
tv = Max_timeout / 1000.0 # max_timeout is in msec, so get seconds
|
@@ -83,12 +82,12 @@ def send_echo (ctype, orb, server, t)
|
|
83
82
|
# This is a non-standard TAO call that's used to give the
|
84
83
|
# client ORB a chance to cleanup the reply that's come back
|
85
84
|
# from the server.
|
86
|
-
#orb.run(tv)
|
85
|
+
# orb.run(tv)
|
87
86
|
end
|
88
87
|
end
|
89
88
|
|
90
89
|
|
91
|
-
orb = CORBA.ORB_init([
|
90
|
+
orb = CORBA.ORB_init(['-ORBDebugLevel', OPTIONS[:orb_debuglevel]], 'myORB')
|
92
91
|
|
93
92
|
begin
|
94
93
|
|
@@ -114,8 +113,8 @@ begin
|
|
114
113
|
mid_value = 10000 * (Min_timeout + Max_timeout) / 2 # convert from msec to "TimeT" (0.1 usec units)
|
115
114
|
|
116
115
|
any_orb = CORBA::Any.to_any(mid_value, TimeBase::TimeT._tc)
|
117
|
-
any_thread = CORBA::Any.to_any(mid_value+10000, TimeBase::TimeT._tc) # midvalue + 1 msec
|
118
|
-
any_object = CORBA::Any.to_any(mid_value+20000, TimeBase::TimeT._tc) # midvalue + 2 msec
|
116
|
+
any_thread = CORBA::Any.to_any(mid_value + 10000, TimeBase::TimeT._tc) # midvalue + 1 msec
|
117
|
+
any_object = CORBA::Any.to_any(mid_value + 20000, TimeBase::TimeT._tc) # midvalue + 2 msec
|
119
118
|
|
120
119
|
policies = []
|
121
120
|
policies << orb.create_policy(Messaging::RELATIVE_RT_TIMEOUT_POLICY_TYPE, any_object)
|
@@ -130,7 +129,7 @@ begin
|
|
130
129
|
puts "client (#{Process.pid}) testing from #{Min_timeout} to #{Max_timeout} milliseconds"
|
131
130
|
|
132
131
|
for t in Min_timeout...Max_timeout
|
133
|
-
puts
|
132
|
+
puts ''
|
134
133
|
puts "client (#{Process.pid}) ================================"
|
135
134
|
puts "client (#{Process.pid}) Trying with timeout = #{t} msec"
|
136
135
|
|
@@ -188,7 +187,7 @@ begin
|
|
188
187
|
for i in 0..3
|
189
188
|
timeout_count_total += Timeout_count[i]
|
190
189
|
in_time_count_total += In_time_count[i]
|
191
|
-
puts "client (#{Process.pid}) in_time_count[#{To_type_names[i]}]= #{In_time_count[i]} "+
|
190
|
+
puts "client (#{Process.pid}) in_time_count[#{To_type_names[i]}]= #{In_time_count[i]} " +
|
192
191
|
"timeout_count[#{To_type_names[i]}]= #{Timeout_count[i]}"
|
193
192
|
end
|
194
193
|
|
data/test/Timeout/run_test.rb
CHANGED
@@ -7,7 +7,6 @@
|
|
7
7
|
# included with this program.
|
8
8
|
#
|
9
9
|
# Copyright (c) Remedy IT Expertise BV
|
10
|
-
# Chamber of commerce Rotterdam nr.276339, The Netherlands
|
11
10
|
#--------------------------------------------------------------------
|
12
11
|
|
13
12
|
OPTIONS = {
|
@@ -21,19 +20,19 @@ ARGV.options do |opts|
|
|
21
20
|
script_name = File.basename($0)
|
22
21
|
opts.banner = "Usage: ruby #{script_name} [options]"
|
23
22
|
|
24
|
-
opts.separator
|
23
|
+
opts.separator ''
|
25
24
|
|
26
|
-
opts.on(
|
27
|
-
|
28
|
-
|
29
|
-
opts.on(
|
30
|
-
|
31
|
-
|
25
|
+
opts.on('-d',
|
26
|
+
'Run with debugging output.',
|
27
|
+
'Default: false') { OPTIONS[:debug_opt] = '--d 10' }
|
28
|
+
opts.on('--use-stubs',
|
29
|
+
'Use stubs generated by RIDL.',
|
30
|
+
'Default: false (uses embedded IDL)') { OPTIONS[:use_implement] = '' }
|
32
31
|
|
33
|
-
opts.separator
|
32
|
+
opts.separator ''
|
34
33
|
|
35
|
-
opts.on(
|
36
|
-
|
34
|
+
opts.on('-h', '--help',
|
35
|
+
'Show this help message.') { puts opts; exit }
|
37
36
|
|
38
37
|
opts.parse!
|
39
38
|
end
|
@@ -60,7 +59,7 @@ end
|
|
60
59
|
|
61
60
|
exrc = clt.wait(400)
|
62
61
|
|
63
|
-
if exrc ==0
|
62
|
+
if exrc == 0
|
64
63
|
srv.wait(400)
|
65
64
|
else
|
66
65
|
srv.wait_term(400)
|
data/test/Timeout/server.rb
CHANGED
@@ -7,7 +7,6 @@
|
|
7
7
|
# included with this program.
|
8
8
|
#
|
9
9
|
# Copyright (c) Remedy IT Expertise BV
|
10
|
-
# Chamber of commerce Rotterdam nr.276339, The Netherlands
|
11
10
|
#--------------------------------------------------------------------
|
12
11
|
|
13
12
|
require 'optparse'
|
@@ -23,25 +22,25 @@ ARGV.options do |opts|
|
|
23
22
|
script_name = File.basename($0)
|
24
23
|
opts.banner = "Usage: ruby #{script_name} [options]"
|
25
24
|
|
26
|
-
opts.separator
|
25
|
+
opts.separator ''
|
27
26
|
|
28
|
-
opts.on(
|
29
|
-
|
30
|
-
"Default: 'server.ior'") { |v| OPTIONS[:iorfile]=v }
|
31
|
-
opts.on(
|
32
|
-
|
33
|
-
|
34
|
-
opts.on(
|
35
|
-
|
36
|
-
|
37
|
-
opts.on(
|
38
|
-
|
39
|
-
|
27
|
+
opts.on('--o IORFILE',
|
28
|
+
'Set IOR filename.',
|
29
|
+
"Default: 'server.ior'") { |v| OPTIONS[:iorfile] = v }
|
30
|
+
opts.on('--d LVL',
|
31
|
+
'Set ORBDebugLevel value.',
|
32
|
+
'Default: 0') { |v| OPTIONS[:orb_debuglevel] = v }
|
33
|
+
opts.on('--use-implement',
|
34
|
+
'Load IDL through CORBA.implement() instead of precompiled code.',
|
35
|
+
'Default: off') { |v| OPTIONS[:use_implement] = v }
|
36
|
+
opts.on('--i ITERATIONS',
|
37
|
+
'Set number of iterations.',
|
38
|
+
'Default: 10', Integer) { |v| OPTIONS[:iter_num] = v }
|
40
39
|
|
41
|
-
opts.separator
|
40
|
+
opts.separator ''
|
42
41
|
|
43
|
-
opts.on(
|
44
|
-
|
42
|
+
opts.on('-h', '--help',
|
43
|
+
'Show this help message.') { puts opts; exit }
|
45
44
|
|
46
45
|
opts.parse!
|
47
46
|
end
|
@@ -75,9 +74,9 @@ class Simple_Server_i < POA::Simple_Server
|
|
75
74
|
puts "server (#{Process.pid}) received shutdown request from client"
|
76
75
|
@orb.shutdown()
|
77
76
|
end
|
78
|
-
end #of servant Simple_Server_i
|
77
|
+
end # of servant Simple_Server_i
|
79
78
|
|
80
|
-
orb = CORBA.ORB_init([
|
79
|
+
orb = CORBA.ORB_init(['-ORBDebugLevel', OPTIONS[:orb_debuglevel]], 'myORB')
|
81
80
|
|
82
81
|
obj = orb.resolve_initial_references('RootPOA')
|
83
82
|
|
@@ -98,7 +97,7 @@ open(OPTIONS[:iorfile], 'w') { |io|
|
|
98
97
|
}
|
99
98
|
|
100
99
|
Signal.trap('INT') do
|
101
|
-
puts
|
100
|
+
puts 'SIGINT - shutting down ORB...'
|
102
101
|
orb.shutdown()
|
103
102
|
end
|
104
103
|
|
data/test/Timeout/test.idl
CHANGED
data/test/lib/assert.rb
CHANGED
@@ -8,7 +8,6 @@
|
|
8
8
|
# included with this program.
|
9
9
|
#
|
10
10
|
# Copyright (c) Remedy IT Expertise BV
|
11
|
-
# Chamber of commerce Rotterdam nr.276339, The Netherlands
|
12
11
|
#--------------------------------------------------------------------
|
13
12
|
|
14
13
|
module TestUtil
|
@@ -40,4 +39,3 @@ module TestUtil
|
|
40
39
|
end
|
41
40
|
|
42
41
|
end
|
43
|
-
|