summaryrefslogtreecommitdiff
path: root/py/test/Ice/operations/Client.py
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2004-08-27 23:22:32 +0000
committerMark Spruiell <mes@zeroc.com>2004-08-27 23:22:32 +0000
commit393a9d31e57045570783f8bd649b98e1d17f4993 (patch)
tree02d0eaf3598d7f0f648c8a6e6f41719a842e00a2 /py/test/Ice/operations/Client.py
parentremoved self (diff)
downloadice-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.py51
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)