diff options
author | Benoit Foucher <benoit@zeroc.com> | 2016-11-25 13:13:22 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2016-11-25 13:13:22 +0100 |
commit | dcdc32af1fced49d80a8ccd93230e15d91ab45d8 (patch) | |
tree | eb69e2555fbd54496fce8a33f4dd610e1473ff51 /scripts/tests/IceDiscovery/simple.py | |
parent | C# IceSSL/configuration log expired certificate exceptions. (diff) | |
download | ice-dcdc32af1fced49d80a8ccd93230e15d91ab45d8.tar.bz2 ice-dcdc32af1fced49d80a8ccd93230e15d91ab45d8.tar.xz ice-dcdc32af1fced49d80a8ccd93230e15d91ab45d8.zip |
Refactored test scripts
Diffstat (limited to 'scripts/tests/IceDiscovery/simple.py')
-rw-r--r-- | scripts/tests/IceDiscovery/simple.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/scripts/tests/IceDiscovery/simple.py b/scripts/tests/IceDiscovery/simple.py new file mode 100644 index 00000000000..36b4f86a39e --- /dev/null +++ b/scripts/tests/IceDiscovery/simple.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# ********************************************************************** +# +# Copyright (c) 2003-2016 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. +# +# ********************************************************************** + +# Client properties (plugin is loaded with Ice::registerPluginFactory) +props = lambda process, current: { + "IceDiscovery.Timeout": 50, + "IceDiscovery.RetryCount": 5, + "IceDiscovery.Interface": "127.0.0.1" if not current.config.ipv6 else "\"::1\"" if isinstance(platform, Darwin) else "", + "Ice.Plugin.IceDiscovery": current.getPluginEntryPoint("IceDiscovery") +} + +# Server properties (client properties + plugin configuration) +serverProps = lambda process, current: dict(itertools.chain({ + "Ice.Plugin.IceDiscovery": current.getPluginEntryPoint("IceDiscovery") +}.items(), props(process, current).items())) + +TestSuite(__name__, [ + ClientServerTestCase(client=Client(args=[3], props=props), + servers=[Server(args=[i], readyCount=4, props=serverProps) for i in range(0, 3)]) +], multihost=False) |