summaryrefslogtreecommitdiff
path: root/demoscript/Ice/hello.py
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2015-03-18 12:58:16 -0230
committerMatthew Newhook <matthew@zeroc.com>2015-03-18 12:58:16 -0230
commit9b7668c7c92cf9cb311fe444cdddb489cd2a219d (patch)
tree5016567c58c81f5654e9d01935e199c6bf4761d2 /demoscript/Ice/hello.py
parentVS add-in & build updates: (diff)
downloadice-9b7668c7c92cf9cb311fe444cdddb489cd2a219d.tar.bz2
ice-9b7668c7c92cf9cb311fe444cdddb489cd2a219d.tar.xz
ice-9b7668c7c92cf9cb311fe444cdddb489cd2a219d.zip
Removed demos.
Moved demoscript to distribution.
Diffstat (limited to 'demoscript/Ice/hello.py')
-rw-r--r--demoscript/Ice/hello.py84
1 files changed, 0 insertions, 84 deletions
diff --git a/demoscript/Ice/hello.py b/demoscript/Ice/hello.py
deleted file mode 100644
index e424d801b19..00000000000
--- a/demoscript/Ice/hello.py
+++ /dev/null
@@ -1,84 +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 sys
-import Expect
-
-def runtests(client, server, secure, datagram):
- sys.stdout.write("testing twoway ")
- sys.stdout.flush()
- client.sendline('t')
- server.expect('Hello World!')
- sys.stdout.write("oneway ")
- sys.stdout.flush()
- client.sendline('o')
- server.expect('Hello World!')
- if not secure and datagram:
- sys.stdout.write("datagram ")
- sys.stdout.flush()
- client.sendline('d')
- server.expect('Hello World!')
- print("... ok")
-
- sys.stdout.write("testing batch oneway ")
- sys.stdout.flush()
- client.sendline('O')
- try:
- server.expect('Hello World!', timeout=1)
- except Expect.TIMEOUT:
- pass
- client.sendline('O')
- client.sendline('f')
- server.expect('Hello World!')
- server.expect('Hello World!')
- if not secure and datagram:
- sys.stdout.write("datagram ")
- sys.stdout.flush()
- client.sendline('D')
- try:
- server.expect('Hello World!', timeout=1)
- except Expect.TIMEOUT:
- pass
- client.sendline('D')
- client.sendline('f')
- server.expect('Hello World!')
- server.expect('Hello World!')
- print("... ok")
-
- sys.stdout.write("testing timeout... ")
- sys.stdout.flush()
- client.sendline('T')
- client.sendline('P')
- client.expect('server delay is now set to 2500ms')
- client.sendline('t')
- client.expect('.*InvocationTimeoutException.*', timeout=10)
- server.expect('Hello World!')
- client.sendline('P')
- client.expect('server delay is now deactivated')
- client.sendline('t')
- server.expect('Hello World!')
- client.sendline('T')
- print("ok")
-
-def run(client, server, sslSupport = True, datagramSupport = True):
- runtests(client, server, False, datagramSupport)
-
- if sslSupport:
- print("repeating tests with SSL")
- client.sendline('S')
-
- runtests(client, server, True, datagramSupport)
-
- client.sendline('s')
- server.waitTestSuccess()
- print("server shutdown");
- client.sendline('x')
- client.waitTestSuccess()
- print("client shutdown");