diff options
Diffstat (limited to 'java')
-rw-r--r-- | java/config/TestUtil.py | 48 |
1 files changed, 43 insertions, 5 deletions
diff --git a/java/config/TestUtil.py b/java/config/TestUtil.py index bbf9d73a400..f89147050d4 100644 --- a/java/config/TestUtil.py +++ b/java/config/TestUtil.py @@ -9,6 +9,14 @@ # ********************************************************************** # +# Set protocol to "ssl" in case you want to run the tests with the SSL +# protocol. Otherwise TCP is used. +# + +protocol = "" +#protocol = "ssl" + +# # Set compressed to 1 in case you want to run the tests with # protocol compression. # @@ -17,6 +25,17 @@ compress = 0 #compress = 1 # +# Set threadPerConnection to 1 in case you want to run the tests in +# thread per connection mode, or if you are using SSL. +# + +threadPerConnection = 0 +#threadPerConnection = 1 + +if protocol == "ssl": + threadPerConnection = 1 + +# # If you don't set "host" below, then the Ice library will try to find # out the IP address of this host. For the Ice test suite, it's best # to set the IP address explicitly to 127.0.0.1. This avoid problems @@ -142,23 +161,42 @@ else: os.environ["CLASSPATH"] = os.path.join(toplevel, "lib") + sep + os.getenv("CLASSPATH", "") -clientProtocol = "" -serverProtocol = "" -clientServerProtocol = "" +if protocol == "ssl": + plugin = " --Ice.Plugin.IceSSL=IceSSL.PluginFactory" + clientProtocol = plugin + " --Ice.Default.Protocol=ssl" + \ + " --IceSSL.Client.CertPath=" + os.path.join(toplevel, "certs") + \ + " --IceSSL.Client.Config=client_sslconfig.xml" + serverProtocol = plugin + " --Ice.Default.Protocol=ssl" + \ + " --IceSSL.Server.CertPath=" + os.path.join(toplevel, "certs") + \ + " --IceSSL.Server.Config=server_sslconfig.xml" + clientServerProtocol = plugin + " --Ice.Default.Protocol=ssl" + \ + " --IceSSL.Client.CertPath=" + os.path.join(toplevel, "certs") + \ + " --IceSSL.Client.Config=sslconfig.xml" + \ + " --IceSSL.Server.CertPath=" + os.path.join(toplevel, "certs") + \ + " --IceSSL.Server.Config=sslconfig.xml" +else: + clientProtocol = "" + serverProtocol = "" + clientServerProtocol = "" if compress: clientProtocol += " --Ice.Override.Compress" serverProtocol += " --Ice.Override.Compress" clientServerProtocol += " --Ice.Override.Compress" +if threadPerConnection: + clientProtocol += " --Ice.ThreadPerConnection" + serverProtocol += " --Ice.ThreadPerConnection" + clientServerProtocol += " --Ice.ThreadPerConnection" + if host != "": defaultHost = " --Ice.Default.Host=" + host else: defaultHost = "" -commonClientOptions = " --Ice.NullHandleAbort --Ice.Warn.Connections" +commonClientOptions = " --Ice.Warn.Connections" -commonServerOptions = " --Ice.PrintAdapterReady --Ice.NullHandleAbort" + \ +commonServerOptions = " --Ice.PrintAdapterReady" + \ " --Ice.Warn.Connections --Ice.ServerIdleTime=30" + \ " --Ice.ThreadPool.Server.Size=1 --Ice.ThreadPool.Server.SizeMax=3" + \ " --Ice.ThreadPool.Server.SizeWarn=0" |