diff options
author | Benoit Foucher <benoit@zeroc.com> | 2018-01-31 17:21:12 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2018-01-31 17:21:12 +0100 |
commit | c3f44e70ea6a8c9bd16281f4b7e2bcd8f7bae47f (patch) | |
tree | a02e199af243136b4dc4a83929e8c9a185c9dcd8 /ruby/test | |
parent | Updated AutoStart description (diff) | |
download | ice-c3f44e70ea6a8c9bd16281f4b7e2bcd8f7bae47f.tar.bz2 ice-c3f44e70ea6a8c9bd16281f4b7e2bcd8f7bae47f.tar.xz ice-c3f44e70ea6a8c9bd16281f4b7e2bcd8f7bae47f.zip |
Added support for ice_fixed, ice_getTimeout, ice_getCompress methods (ICE-7996 & ICE-7976)
Diffstat (limited to 'ruby/test')
-rw-r--r-- | ruby/test/Ice/proxy/AllTests.rb | 41 |
1 files changed, 38 insertions, 3 deletions
diff --git a/ruby/test/Ice/proxy/AllTests.rb b/ruby/test/Ice/proxy/AllTests.rb index 42b4410ba97..a83885fe27f 100644 --- a/ruby/test/Ice/proxy/AllTests.rb +++ b/ruby/test/Ice/proxy/AllTests.rb @@ -508,11 +508,19 @@ def allTests(communicator) #test(compObj.ice_compress(false) < compObj.ice_compress(true)) #test(!(compObj.ice_compress(true) < compObj.ice_compress(false))) + test(compObj.ice_getCompress() == Ice::Unset); + test(compObj.ice_compress(true).ice_getCompress() == true); + test(compObj.ice_compress(false).ice_getCompress() == false); + test(compObj.ice_timeout(20) == compObj.ice_timeout(20)) test(compObj.ice_timeout(10) != compObj.ice_timeout(20)) #test(compObj.ice_timeout(10) < compObj.ice_timeout(20)) #test(!(compObj.ice_timeout(20) < compObj.ice_timeout(10))) + test(compObj.ice_getTimeout() == Ice::Unset); + test(compObj.ice_timeout(10).ice_getTimeout() == 10); + test(compObj.ice_timeout(20).ice_getTimeout() == 20); + loc1 = Ice::LocatorPrx::uncheckedCast(communicator.stringToProxy("loc1:default -p 10000")) loc2 = Ice::LocatorPrx::uncheckedCast(communicator.stringToProxy("loc2:default -p 10000")) test(compObj.ice_locator(nil) == compObj.ice_locator(nil)) @@ -594,9 +602,13 @@ def allTests(communicator) #test(compObj.ice_encodingVersion(Ice::Encoding_1_0) < compObj.ice_encodingVersion(Ice::Encoding_1_1)) #test(! (compObj.ice_encodingVersion(Ice::Encoding_1_1) < compObj.ice_encodingVersion(Ice::Encoding_1_0))) - # - # TODO: Ideally we should also test comparison of fixed proxies. - # + baseConnection = base.ice_getConnection(); + if(baseConnection != nil) + baseConnection2 = base.ice_connectionId("base2").ice_getConnection(); + compObj1 = compObj1.ice_fixed(baseConnection); + compObj2 = compObj2.ice_fixed(baseConnection2); + test(compObj1 != compObj2); + end puts "ok" @@ -640,6 +652,29 @@ def allTests(communicator) test(c == c2) puts "ok" + print "testing ice_fixed... " + STDOUT.flush + connection = cl.ice_getConnection() + if connection != nil + cl.ice_fixed(connection).ice_ping() + test(cl.ice_secure(true).ice_fixed(connection).ice_isSecure()) + test(cl.ice_facet("facet").ice_fixed(connection).ice_getFacet() == "facet") + test(cl.ice_oneway().ice_fixed(connection).ice_isOneway()) + test(cl.ice_fixed(connection).ice_getConnection() == connection) + test(cl.ice_fixed(connection).ice_fixed(connection).ice_getConnection() == connection) + test(cl.ice_fixed(connection).ice_getTimeout() == Ice::Unset) + fixedConnection = cl.ice_connectionId("ice_fixed").ice_getConnection() + test(cl.ice_fixed(connection).ice_fixed(fixedConnection).ice_getConnection() == fixedConnection) + else + begin + cl.ice_fixed(connection) + test(false) + rescue + # Expected with null connection. + end + end + puts "ok" + print "testing encoding versioning... " STDOUT.flush ref20 = "test -e 2.0:default -p 12010"; |