diff options
Diffstat (limited to 'python/test')
-rw-r--r-- | python/test/Ice/proxy/AllTests.py | 39 |
1 files changed, 36 insertions, 3 deletions
diff --git a/python/test/Ice/proxy/AllTests.py b/python/test/Ice/proxy/AllTests.py index 75ba821c0fa..1777666cc96 100644 --- a/python/test/Ice/proxy/AllTests.py +++ b/python/test/Ice/proxy/AllTests.py @@ -512,11 +512,19 @@ def allTests(communicator, collocated): test(compObj.ice_compress(False) < compObj.ice_compress(True)) test(not (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(not (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(None) == compObj.ice_locator(None)) @@ -598,9 +606,12 @@ def allTests(communicator, collocated): test(compObj.ice_encodingVersion(Ice.Encoding_1_0) < compObj.ice_encodingVersion(Ice.Encoding_1_1)) test(not (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: + baseConnection2 = base.ice_connectionId("base2").ice_getConnection(); + compObj1 = compObj1.ice_fixed(baseConnection); + compObj2 = compObj2.ice_fixed(baseConnection2); + test(compObj1 != compObj2); print("ok") @@ -644,6 +655,28 @@ def allTests(communicator, collocated): test(c == c2) print("ok") + sys.stdout.write("testing ice_fixed... ") + sys.stdout.flush() + connection = cl.ice_getConnection() + if connection != None: + 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: + try: + cl.ice_fixed(connection) + test(False) + except: + # Expected with null connection. + pass + print("ok") + sys.stdout.write("testing encoding versioning... ") sys.stdout.flush() ref20 = "test -e 2.0:default -p 12010"; |