diff options
author | Matthew Newhook <matthew@zeroc.com> | 2015-03-21 15:35:40 -0230 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2015-03-21 15:35:40 -0230 |
commit | 630a37d2fe66f24518299e705f958b571803c522 (patch) | |
tree | 969723791bdc4d73bb099c19d45554d0ca241ad9 /py/test/Ice/blobject/Client.py | |
parent | Fix some README.md markdown formatting (diff) | |
download | ice-630a37d2fe66f24518299e705f958b571803c522.tar.bz2 ice-630a37d2fe66f24518299e705f958b571803c522.tar.xz ice-630a37d2fe66f24518299e705f958b571803c522.zip |
py -> python
rb -> ruby
objc -> objective-c
cs -> csharp
Diffstat (limited to 'py/test/Ice/blobject/Client.py')
-rwxr-xr-x | py/test/Ice/blobject/Client.py | 96 |
1 files changed, 0 insertions, 96 deletions
diff --git a/py/test/Ice/blobject/Client.py b/py/test/Ice/blobject/Client.py deleted file mode 100755 index 8fb5d04c61e..00000000000 --- a/py/test/Ice/blobject/Client.py +++ /dev/null @@ -1,96 +0,0 @@ -#!/usr/bin/env python -# ********************************************************************** -# -# Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved. -# -# This copy of Ice is licensed to you under the terms described in the -# ICE_LICENSE file included in this distribution. -# -# ********************************************************************** - -import os, sys, traceback - -import Ice -Ice.loadSlice('Test.ice') -import Test -import RouterI - -def test(b): - if not b: - raise RuntimeError('test assertion failed') - -def run(args, communicator, sync): - hello = Test.HelloPrx.checkedCast(communicator.stringToProxy("test:default -p 12010")) - hello.sayHello(False) - hello.sayHello(False, { "_fwd":"o" } ) - test(hello.add(10, 20) == 30) - try: - hello.raiseUE() - test(False) - except Test.UE: - pass - - try: - Test.HelloPrx.checkedCast(communicator.stringToProxy("unknown:default -p 12010 -t 10000")) - test(False) - except Ice.ObjectNotExistException: - pass - - # First try an object at a non-existent endpoint. - try: - Test.HelloPrx.checkedCast(communicator.stringToProxy("missing:default -p 12000 -t 10000")) - test(False) - except Ice.UnknownLocalException as e: - test(e.unknown.find('ConnectionRefusedException')) - if sync: - hello.shutdown() - return True - -argv = sys.argv[:] # Clone the arguments to use again later - -try: - initData = Ice.InitializationData() - initData.properties = Ice.createProperties(argv) - initData.properties.setProperty('Ice.Warn.Dispatch', '0') - communicator = Ice.initialize(argv, initData) - router = RouterI.RouterI(communicator, False) - sys.stdout.write("testing async blobject... ") - sys.stdout.flush() - status = run(sys.argv, communicator, False) - print("ok") - router.destroy() -except: - traceback.print_exc() - status = False - -if communicator: - try: - communicator.destroy() - except: - traceback.print_exc() - status = False - -if status: - try: - initData = Ice.InitializationData() - initData.properties = Ice.createProperties(sys.argv) - initData.properties.setProperty('Ice.Warn.Dispatch', '0') - communicator = Ice.initialize(sys.argv, initData) - router = RouterI.RouterI(communicator, True) - sys.stdout.write("testing sync blobject... ") - sys.stdout.flush() - status = run(sys.argv, communicator, True) - print("ok") - router.destroy() - except: - traceback.print_exc() - status = False - - if communicator: - try: - communicator.destroy() - except: - traceback.print_exc() - status = False - -sys.exit(not status) |