diff options
author | Mark Spruiell <mes@zeroc.com> | 2004-08-27 23:22:32 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2004-08-27 23:22:32 +0000 |
commit | 393a9d31e57045570783f8bd649b98e1d17f4993 (patch) | |
tree | 02d0eaf3598d7f0f648c8a6e6f41719a842e00a2 /py/test/Ice/operations/Client.py | |
parent | removed self (diff) | |
download | ice-393a9d31e57045570783f8bd649b98e1d17f4993.tar.bz2 ice-393a9d31e57045570783f8bd649b98e1d17f4993.tar.xz ice-393a9d31e57045570783f8bd649b98e1d17f4993.zip |
initial check-in
Diffstat (limited to 'py/test/Ice/operations/Client.py')
-rw-r--r-- | py/test/Ice/operations/Client.py | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/py/test/Ice/operations/Client.py b/py/test/Ice/operations/Client.py new file mode 100644 index 00000000000..b2f76a27cab --- /dev/null +++ b/py/test/Ice/operations/Client.py @@ -0,0 +1,51 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2004 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 sys, Ice, AllTests + +def test(b): + if not b: + raise RuntimeError('test assertion failed') + +def run(args, communicator): + myClass = AllTests.allTests(communicator) + + print "testing server shutdown... ", + myClass.shutdown() + try: + myClass.opVoid() + test(False) + except Ice.LocalException: + print "ok" + + return True + +try: + # + # In this test, we need at least two threads in the + # client side thread pool for nested AMI. + # + properties = Ice.getDefaultProperties(sys.argv) + properties.setProperty('Ice.ThreadPool.Client.Size', '2') + properties.setProperty('Ice.ThreadPool.Client.SizeWarn', '0') + + communicator = Ice.initialize(sys.argv) + status = run(sys.argv, communicator) +except Ice.Exception, ex: + print ex + status = False + +if communicator: + try: + communicator.destroy() + except Ice.Exception, ex: + print ex + status = False + +sys.exit(not status) |