summaryrefslogtreecommitdiff
path: root/python/test
diff options
context:
space:
mode:
Diffstat (limited to 'python/test')
-rw-r--r--python/test/Ice/acm/AllTests.py6
-rw-r--r--python/test/Ice/acm/TestI.py7
-rwxr-xr-xpython/test/Ice/acm/run.py3
-rwxr-xr-xpython/test/Ice/adapterDeactivation/run.py5
-rwxr-xr-xpython/test/Ice/ami/run.py7
-rwxr-xr-xpython/test/Ice/binding/run.py3
-rwxr-xr-xpython/test/Ice/blobject/run.py3
-rwxr-xr-xpython/test/Ice/checksum/run.py3
-rwxr-xr-xpython/test/Ice/enums/run.py10
-rw-r--r--python/test/Ice/exceptions/AllTests.py14
-rwxr-xr-xpython/test/Ice/exceptions/run.py40
-rwxr-xr-xpython/test/Ice/facets/run.py5
-rw-r--r--python/test/Ice/info/AllTests.py99
-rw-r--r--python/test/Ice/info/TestI.py25
-rwxr-xr-xpython/test/Ice/info/run.py3
-rwxr-xr-xpython/test/Ice/inheritance/run.py5
-rw-r--r--python/test/Ice/location/AllTests.py18
-rwxr-xr-xpython/test/Ice/location/run.py3
-rw-r--r--python/test/Ice/objects/AllTests.py89
-rwxr-xr-xpython/test/Ice/objects/Server.py28
-rwxr-xr-xpython/test/Ice/objects/run.py19
-rwxr-xr-xpython/test/Ice/operations/run.py11
-rw-r--r--python/test/Ice/optional/AllTests.py9
-rwxr-xr-xpython/test/Ice/optional/Server.py3
-rwxr-xr-xpython/test/Ice/optional/ServerAMD.py3
-rw-r--r--python/test/Ice/optional/Test.ice3
-rw-r--r--python/test/Ice/optional/TestAMD.ice3
-rwxr-xr-xpython/test/Ice/optional/run.py13
-rwxr-xr-xpython/test/Ice/proxy/run.py11
-rw-r--r--python/test/Ice/servantLocator/AllTests.py6
-rwxr-xr-xpython/test/Ice/servantLocator/run.py11
-rw-r--r--python/test/Ice/slicing/exceptions/AllTests.py52
-rwxr-xr-xpython/test/Ice/slicing/exceptions/run.py22
-rw-r--r--python/test/Ice/slicing/objects/AllTests.py54
-rwxr-xr-xpython/test/Ice/slicing/objects/run.py22
-rwxr-xr-xpython/test/Ice/timeout/run.py3
-rw-r--r--python/test/Slice/import/.depend.mak0
37 files changed, 336 insertions, 285 deletions
diff --git a/python/test/Ice/acm/AllTests.py b/python/test/Ice/acm/AllTests.py
index 9237544a94e..a82b6515db2 100644
--- a/python/test/Ice/acm/AllTests.py
+++ b/python/test/Ice/acm/AllTests.py
@@ -74,7 +74,7 @@ class LoggerI(Ice.Logger):
print(p)
self._messages = []
-class TestCase(threading.Thread, Ice.ConnectionCallback):
+class TestCase(threading.Thread):
def __init__(self, name, com):
threading.Thread.__init__(self)
self._name = name
@@ -128,7 +128,9 @@ class TestCase(threading.Thread, Ice.ConnectionCallback):
proxy = Test.TestIntfPrx.uncheckedCast(self._communicator.stringToProxy(
self._adapter.getTestIntf().ice_toString()))
try:
- proxy.ice_getConnection().setCallback(self)
+ proxy.ice_getConnection().setCloseCallback(lambda conn: self.closed(conn))
+ proxy.ice_getConnection().setHeartbeatCallback(lambda conn: self.heartbeat(conn))
+
self.runTestCase(self._adapter, proxy)
except Exception as ex:
self._msg = "unexpected exception:\n" + traceback.format_exc()
diff --git a/python/test/Ice/acm/TestI.py b/python/test/Ice/acm/TestI.py
index 088c2b4ed81..920cbd44c7e 100644
--- a/python/test/Ice/acm/TestI.py
+++ b/python/test/Ice/acm/TestI.py
@@ -79,7 +79,7 @@ class TestIntfI(Test.TestIntf):
def waitForHeartbeat(self, count, current=None):
- class ConnectionCallbackI(Ice.ConnectionCallback):
+ class ConnectionCallbackI():
def __init__(self):
self.m = threading.Condition()
@@ -93,9 +93,6 @@ class TestIntfI(Test.TestIntf):
finally:
self.m.release()
- def closed(self, con):
- pass
-
def waitForCount(self, count):
self.m.acquire()
self.count = count
@@ -106,6 +103,6 @@ class TestIntfI(Test.TestIntf):
self.m.release()
callback = ConnectionCallbackI()
- current.con.setCallback(callback)
+ current.con.setHeartbeatCallback(lambda con: callback.heartbeat(con))
callback.waitForCount(2)
diff --git a/python/test/Ice/acm/run.py b/python/test/Ice/acm/run.py
index 3fc6200cd00..8d9a8c0837c 100755
--- a/python/test/Ice/acm/run.py
+++ b/python/test/Ice/acm/run.py
@@ -20,4 +20,5 @@ if len(path) == 0:
sys.path.append(os.path.join(path[0], "scripts"))
import TestUtil
-TestUtil.clientServerTest()
+TestUtil.queueClientServerTest()
+TestUtil.runQueuedTests()
diff --git a/python/test/Ice/adapterDeactivation/run.py b/python/test/Ice/adapterDeactivation/run.py
index 89beb6cd7a7..e285170381d 100755
--- a/python/test/Ice/adapterDeactivation/run.py
+++ b/python/test/Ice/adapterDeactivation/run.py
@@ -20,5 +20,6 @@ if len(path) == 0:
sys.path.append(os.path.join(path[0], "scripts"))
import TestUtil
-TestUtil.clientServerTest()
-TestUtil.collocatedTest()
+TestUtil.queueClientServerTest()
+TestUtil.queueCollocatedTest()
+TestUtil.runQueuedTests()
diff --git a/python/test/Ice/ami/run.py b/python/test/Ice/ami/run.py
index 2b105e19f21..e285170381d 100755
--- a/python/test/Ice/ami/run.py
+++ b/python/test/Ice/ami/run.py
@@ -20,7 +20,6 @@ if len(path) == 0:
sys.path.append(os.path.join(path[0], "scripts"))
import TestUtil
-print("tests with regular server.")
-TestUtil.clientServerTest()
-print("tests with collocated server.")
-TestUtil.collocatedTest()
+TestUtil.queueClientServerTest()
+TestUtil.queueCollocatedTest()
+TestUtil.runQueuedTests()
diff --git a/python/test/Ice/binding/run.py b/python/test/Ice/binding/run.py
index 3fc6200cd00..8d9a8c0837c 100755
--- a/python/test/Ice/binding/run.py
+++ b/python/test/Ice/binding/run.py
@@ -20,4 +20,5 @@ if len(path) == 0:
sys.path.append(os.path.join(path[0], "scripts"))
import TestUtil
-TestUtil.clientServerTest()
+TestUtil.queueClientServerTest()
+TestUtil.runQueuedTests()
diff --git a/python/test/Ice/blobject/run.py b/python/test/Ice/blobject/run.py
index 3fc6200cd00..8d9a8c0837c 100755
--- a/python/test/Ice/blobject/run.py
+++ b/python/test/Ice/blobject/run.py
@@ -20,4 +20,5 @@ if len(path) == 0:
sys.path.append(os.path.join(path[0], "scripts"))
import TestUtil
-TestUtil.clientServerTest()
+TestUtil.queueClientServerTest()
+TestUtil.runQueuedTests()
diff --git a/python/test/Ice/checksum/run.py b/python/test/Ice/checksum/run.py
index 3fc6200cd00..8d9a8c0837c 100755
--- a/python/test/Ice/checksum/run.py
+++ b/python/test/Ice/checksum/run.py
@@ -20,4 +20,5 @@ if len(path) == 0:
sys.path.append(os.path.join(path[0], "scripts"))
import TestUtil
-TestUtil.clientServerTest()
+TestUtil.queueClientServerTest()
+TestUtil.runQueuedTests()
diff --git a/python/test/Ice/enums/run.py b/python/test/Ice/enums/run.py
index 6870d8dcd2a..b7e267999af 100755
--- a/python/test/Ice/enums/run.py
+++ b/python/test/Ice/enums/run.py
@@ -20,9 +20,9 @@ if len(path) == 0:
sys.path.append(os.path.join(path[0], "scripts"))
import TestUtil
-print("Running test with 1.0 encoding.")
-TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.EncodingVersion=1.0",
- additionalServerOptions="--Ice.Default.EncodingVersion=1.0")
+TestUtil.queueClientServerTest(configName = "1.0", message = "Running test with 1.0 encoding.",
+ additionalClientOptions="--Ice.Default.EncodingVersion=1.0",
+ additionalServerOptions="--Ice.Default.EncodingVersion=1.0")
-print("Running test with 1.1 encoding.")
-TestUtil.clientServerTest()
+TestUtil.queueClientServerTest(configName = "1.1", message = "Running test with 1.1 encoding.")
+TestUtil.runQueuedTests()
diff --git a/python/test/Ice/exceptions/AllTests.py b/python/test/Ice/exceptions/AllTests.py
index 60fc7b26e47..97d68ecabb0 100644
--- a/python/test/Ice/exceptions/AllTests.py
+++ b/python/test/Ice/exceptions/AllTests.py
@@ -26,12 +26,8 @@ class ServantLocatorI(Ice.ServantLocator):
def deactivate(self, category):
pass
-class ObjectFactoryI(Ice.ObjectFactory):
- def create(id):
- return None
-
- def destroy():
- pass
+def ValueFactory(type):
+ return None
class CallbackBase:
def __init__(self):
@@ -273,10 +269,10 @@ def allTests(communicator):
sys.stdout.write("testing object factory registration exception... ")
sys.stdout.flush()
- of = ObjectFactoryI()
- communicator.addObjectFactory(of, "x")
+
+ communicator.getValueFactoryManager().add(ValueFactory, "x")
try:
- communicator.addObjectFactory(of, "x")
+ communicator.getValueFactoryManager().add(ValueFactory, "x")
test(false)
except Ice.AlreadyRegisteredException:
pass
diff --git a/python/test/Ice/exceptions/run.py b/python/test/Ice/exceptions/run.py
index a8abeacb386..730e27ae290 100755
--- a/python/test/Ice/exceptions/run.py
+++ b/python/test/Ice/exceptions/run.py
@@ -20,29 +20,29 @@ if len(path) == 0:
sys.path.append(os.path.join(path[0], "scripts"))
import TestUtil
-print("Running test with compact (default) format.")
-TestUtil.clientServerTest()
+TestUtil.queueClientServerTest(configName = "compact", message = "Running test with compact (default) format.")
-print("Running test with sliced format.")
-TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.SlicedFormat",
- additionalServerOptions="--Ice.Default.SlicedFormat")
+TestUtil.queueClientServerTest(configName = "sliced", message = "Running test with sliced format.",
+ additionalClientOptions="--Ice.Default.SlicedFormat",
+ additionalServerOptions="--Ice.Default.SlicedFormat")
-print("Running test with 1.0 encoding.")
-TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.EncodingVersion=1.0",
- additionalServerOptions="--Ice.Default.EncodingVersion=1.0")
+TestUtil.queueClientServerTest(configName = "1.0", message = "Running test with 1.0 encoding.",
+ additionalClientOptions="--Ice.Default.EncodingVersion=1.0",
+ additionalServerOptions="--Ice.Default.EncodingVersion=1.0")
-print("Running test with compact (default) format and AMD server.")
-TestUtil.clientServerTest(server="ServerAMD.py")
+TestUtil.queueClientServerTest(configName = "compactAMD", localOnly = True,
+ message = "Running test with compact (default) format and AMD server.",
+ server="ServerAMD.py")
-print("Running test with sliced format and AMD server.")
-TestUtil.clientServerTest(server="ServerAMD.py",
- additionalClientOptions="--Ice.Default.SlicedFormat",
- additionalServerOptions="--Ice.Default.SlicedFormat")
+TestUtil.queueClientServerTest(configName = "slicedAMD", localOnly = True,
+ message = "Running test with sliced format and AMD server.", server="ServerAMD.py",
+ additionalClientOptions="--Ice.Default.SlicedFormat",
+ additionalServerOptions="--Ice.Default.SlicedFormat")
-print("Running test with 1.0 encoding and AMD server.")
-TestUtil.clientServerTest(server="ServerAMD.py",
- additionalClientOptions="--Ice.Default.EncodingVersion=1.0",
- additionalServerOptions="--Ice.Default.EncodingVersion=1.0")
+TestUtil.queueClientServerTest(configName = "1.0AMD", localOnly = True,
+ message = "Running test with 1.0 encoding and AMD server.", server="ServerAMD.py",
+ additionalClientOptions="--Ice.Default.EncodingVersion=1.0",
+ additionalServerOptions="--Ice.Default.EncodingVersion=1.0")
-print("Running collocated test.")
-TestUtil.collocatedTest()
+TestUtil.queueCollocatedTest()
+TestUtil.runQueuedTests()
diff --git a/python/test/Ice/facets/run.py b/python/test/Ice/facets/run.py
index 89beb6cd7a7..e285170381d 100755
--- a/python/test/Ice/facets/run.py
+++ b/python/test/Ice/facets/run.py
@@ -20,5 +20,6 @@ if len(path) == 0:
sys.path.append(os.path.join(path[0], "scripts"))
import TestUtil
-TestUtil.clientServerTest()
-TestUtil.collocatedTest()
+TestUtil.queueClientServerTest()
+TestUtil.queueCollocatedTest()
+TestUtil.runQueuedTests()
diff --git a/python/test/Ice/info/AllTests.py b/python/test/Ice/info/AllTests.py
index b80182b5c04..a03b69ecc4d 100644
--- a/python/test/Ice/info/AllTests.py
+++ b/python/test/Ice/info/AllTests.py
@@ -13,6 +13,18 @@ def test(b):
if not b:
raise RuntimeError('test assertion failed')
+def getTCPEndpointInfo(info):
+ while(info):
+ if isinstance(info, Ice.TCPEndpointInfo):
+ return info
+ info = info.underlying
+
+def getTCPConnectionInfo(info):
+ while(info):
+ if isinstance(info, Ice.TCPConnectionInfo):
+ return info
+ info = info.underlying
+
def allTests(communicator):
sys.stdout.write("testing proxy endpoint information... ")
sys.stdout.flush()
@@ -23,22 +35,23 @@ def allTests(communicator):
endps = p1.ice_getEndpoints()
- ipEndpoint = endps[0].getInfo()
- test(isinstance(ipEndpoint, Ice.IPEndpointInfo))
- test(ipEndpoint.host == "tcphost")
- test(ipEndpoint.port == 10000)
- test(ipEndpoint.sourceAddress == "10.10.10.10")
- test(ipEndpoint.timeout == 1200)
- test(ipEndpoint.compress)
- test(not ipEndpoint.datagram())
- test((ipEndpoint.type() == Ice.TCPEndpointType and not ipEndpoint.secure()) or
- (ipEndpoint.type() == Ice.SSLEndpointType and ipEndpoint.secure()) or # SSL
- (ipEndpoint.type() == Ice.WSEndpointType and not ipEndpoint.secure()) or # WS
- (ipEndpoint.type() == Ice.WSSEndpointType and ipEndpoint.secure())) # WS
- test((ipEndpoint.type() == Ice.TCPEndpointType and isinstance(ipEndpoint, Ice.TCPEndpointInfo)) or
- (ipEndpoint.type() == Ice.SSLEndpointType and isinstance(ipEndpoint, Ice.SSLEndpointInfo)) or
- (ipEndpoint.type() == Ice.WSEndpointType and isinstance(ipEndpoint, Ice.WSEndpointInfo)) or
- (ipEndpoint.type() == Ice.WSSEndpointType and isinstance(ipEndpoint, Ice.WSSEndpointInfo)))
+ endpoint = endps[0].getInfo()
+ tcpEndpoint = getTCPEndpointInfo(endpoint)
+ test(isinstance(tcpEndpoint, Ice.TCPEndpointInfo))
+ test(tcpEndpoint.host == "tcphost")
+ test(tcpEndpoint.port == 10000)
+ test(tcpEndpoint.sourceAddress == "10.10.10.10")
+ test(tcpEndpoint.timeout == 1200)
+ test(tcpEndpoint.compress)
+ test(not tcpEndpoint.datagram())
+ test((tcpEndpoint.type() == Ice.TCPEndpointType and not tcpEndpoint.secure()) or
+ (tcpEndpoint.type() == Ice.SSLEndpointType and tcpEndpoint.secure()) or # SSL
+ (tcpEndpoint.type() == Ice.WSEndpointType and not tcpEndpoint.secure()) or # WS
+ (tcpEndpoint.type() == Ice.WSSEndpointType and tcpEndpoint.secure())) # WS
+ test((tcpEndpoint.type() == Ice.TCPEndpointType and isinstance(endpoint, Ice.TCPEndpointInfo)) or
+ (tcpEndpoint.type() == Ice.SSLEndpointType and isinstance(endpoint, Ice.SSLEndpointInfo)) or
+ (tcpEndpoint.type() == Ice.WSEndpointType and isinstance(endpoint, Ice.WSEndpointInfo)) or
+ (tcpEndpoint.type() == Ice.WSSEndpointType and isinstance(endpoint, Ice.WSEndpointInfo)))
udpEndpoint = endps[1].getInfo()
test(isinstance(udpEndpoint, Ice.UDPEndpointInfo))
@@ -71,12 +84,12 @@ def allTests(communicator):
publishedEndpoints = adapter.getPublishedEndpoints()
test(endpoints == publishedEndpoints)
- ipEndpoint = endpoints[0].getInfo()
- test(ipEndpoint.type() == Ice.TCPEndpointType or ipEndpoint.type() == 2 or ipEndpoint.type() == 4 or
- ipEndpoint.type() == 5)
- test(ipEndpoint.host == defaultHost)
- test(ipEndpoint.port > 0)
- test(ipEndpoint.timeout == 15000)
+ tcpEndpoint = getTCPEndpointInfo(endpoints[0].getInfo())
+ test(tcpEndpoint.type() == Ice.TCPEndpointType or tcpEndpoint.type() == 2 or tcpEndpoint.type() == 4 or
+ tcpEndpoint.type() == 5)
+ test(tcpEndpoint.host == defaultHost)
+ test(tcpEndpoint.port > 0)
+ test(tcpEndpoint.timeout == 15000)
udpEndpoint = endpoints[1].getInfo()
test(udpEndpoint.host == defaultHost)
@@ -95,12 +108,12 @@ def allTests(communicator):
test(len(publishedEndpoints) == 1)
for i in range(0, len(endpoints)):
- ipEndpoint = endpoints[i].getInfo()
- test(ipEndpoint.port == 12020)
+ tcpEndpoint = getTCPEndpointInfo(endpoints[i].getInfo())
+ test(tcpEndpoint.port == 12020)
- ipEndpoint = publishedEndpoints[0].getInfo()
- test(ipEndpoint.host == "127.0.0.1")
- test(ipEndpoint.port == 12020)
+ tcpEndpoint = getTCPEndpointInfo(publishedEndpoints[0].getInfo())
+ test(tcpEndpoint.host == "127.0.0.1")
+ test(tcpEndpoint.port == 12020)
adapter.destroy()
@@ -112,13 +125,13 @@ def allTests(communicator):
sys.stdout.write("test connection endpoint information... ")
sys.stdout.flush()
- ipinfo = base.ice_getConnection().getEndpoint().getInfo()
- test(ipinfo.port == 12010)
- test(not ipinfo.compress)
- test(ipinfo.host == defaultHost)
+ tcpinfo = getTCPEndpointInfo(base.ice_getConnection().getEndpoint().getInfo())
+ test(tcpinfo.port == 12010)
+ test(not tcpinfo.compress)
+ test(tcpinfo.host == defaultHost)
ctx = testIntf.getEndpointInfoAsContext()
- test(ctx["host"] == ipinfo.host)
+ test(ctx["host"] == tcpinfo.host)
test(ctx["compress"] == "false")
port = int(ctx["port"])
test(port > 0)
@@ -136,26 +149,26 @@ def allTests(communicator):
connection.setBufferSize(1024, 2048)
info = connection.getInfo()
+ tcpinfo = getTCPConnectionInfo(info)
test(not info.incoming)
test(len(info.adapterName) == 0)
- test(info.remotePort == 12010)
+ test(tcpinfo.remotePort == 12010)
if defaultHost == '127.0.0.1':
- test(info.remoteAddress == defaultHost)
- test(info.localAddress == defaultHost)
- test(info.rcvSize >= 1024)
- test(info.sndSize >= 2048)
+ test(tcpinfo.remoteAddress == defaultHost)
+ test(tcpinfo.localAddress == defaultHost)
+ test(tcpinfo.rcvSize >= 1024)
+ test(tcpinfo.sndSize >= 2048)
ctx = testIntf.getConnectionInfoAsContext()
test(ctx["incoming"] == "true")
test(ctx["adapterName"] == "TestAdapter")
- test(ctx["remoteAddress"] == info.localAddress)
- test(ctx["localAddress"] == info.remoteAddress)
- test(ctx["remotePort"] == str(info.localPort))
- test(ctx["localPort"] == str(info.remotePort))
+ test(ctx["remoteAddress"] == tcpinfo.localAddress)
+ test(ctx["localAddress"] == tcpinfo.remoteAddress)
+ test(ctx["remotePort"] == str(tcpinfo.localPort))
+ test(ctx["localPort"] == str(tcpinfo.remotePort))
if(base.ice_getConnection().type() == "ws" or base.ice_getConnection().type() == "wss"):
- test((base.ice_getConnection().type() == "ws" and isinstance(info, Ice.WSConnectionInfo)) or
- (base.ice_getConnection().type() == "wss" and isinstance(info, Ice.WSSConnectionInfo)))
+ test(isinstance(info, Ice.WSConnectionInfo))
test(info.headers["Upgrade"] == "websocket")
test(info.headers["Connection"] == "Upgrade")
diff --git a/python/test/Ice/info/TestI.py b/python/test/Ice/info/TestI.py
index ff98b4dd777..2325156db20 100644
--- a/python/test/Ice/info/TestI.py
+++ b/python/test/Ice/info/TestI.py
@@ -10,6 +10,18 @@
import Ice, Test
import time
+def getIPEndpointInfo(info):
+ while(info):
+ if isinstance(info, Ice.IPEndpointInfo):
+ return info
+ info = info.underlying
+
+def getIPConnectionInfo(info):
+ while(info):
+ if isinstance(info, Ice.IPConnectionInfo):
+ return info
+ info = info.underlying
+
class MyDerivedClassI(Test.TestIntf):
def __init__(self):
self.ctx = None
@@ -19,7 +31,7 @@ class MyDerivedClassI(Test.TestIntf):
def getEndpointInfoAsContext(self, current):
ctx = {}
- info = current.con.getEndpoint().getInfo()
+ info = getIPEndpointInfo(current.con.getEndpoint().getInfo())
ctx["timeout"] = str(info.timeout)
if info.compress:
ctx["compress"] = "true"
@@ -51,18 +63,19 @@ class MyDerivedClassI(Test.TestIntf):
def getConnectionInfoAsContext(self, current):
ctx = {}
info = current.con.getInfo()
+ ipinfo = getIPConnectionInfo(info)
ctx["adapterName"] = info.adapterName
if info.incoming:
ctx["incoming"] = "true"
else:
ctx["incoming"] ="false"
- ctx["localAddress"] = info.localAddress
- ctx["localPort"] = str(info.localPort)
- ctx["remoteAddress"] = info.remoteAddress
- ctx["remotePort"] = str(info.remotePort)
+ ctx["localAddress"] = ipinfo.localAddress
+ ctx["localPort"] = str(ipinfo.localPort)
+ ctx["remoteAddress"] = ipinfo.remoteAddress
+ ctx["remotePort"] = str(ipinfo.remotePort)
- if isinstance(info, Ice.WSConnectionInfo) or isinstance(info, Ice.WSSConnectionInfo):
+ if isinstance(info, Ice.WSConnectionInfo):
for key, value in info.headers.items():
ctx["ws." + key] = value
diff --git a/python/test/Ice/info/run.py b/python/test/Ice/info/run.py
index 3fc6200cd00..8d9a8c0837c 100755
--- a/python/test/Ice/info/run.py
+++ b/python/test/Ice/info/run.py
@@ -20,4 +20,5 @@ if len(path) == 0:
sys.path.append(os.path.join(path[0], "scripts"))
import TestUtil
-TestUtil.clientServerTest()
+TestUtil.queueClientServerTest()
+TestUtil.runQueuedTests()
diff --git a/python/test/Ice/inheritance/run.py b/python/test/Ice/inheritance/run.py
index 89beb6cd7a7..e285170381d 100755
--- a/python/test/Ice/inheritance/run.py
+++ b/python/test/Ice/inheritance/run.py
@@ -20,5 +20,6 @@ if len(path) == 0:
sys.path.append(os.path.join(path[0], "scripts"))
import TestUtil
-TestUtil.clientServerTest()
-TestUtil.collocatedTest()
+TestUtil.queueClientServerTest()
+TestUtil.queueCollocatedTest()
+TestUtil.runQueuedTests()
diff --git a/python/test/Ice/location/AllTests.py b/python/test/Ice/location/AllTests.py
index e12650b1837..91519152101 100644
--- a/python/test/Ice/location/AllTests.py
+++ b/python/test/Ice/location/AllTests.py
@@ -47,8 +47,8 @@ def allTests(communicator, ref):
test(Ice.proxyIdentityEqual(base.ice_getLocator(), anotherLocator));
communicator.setDefaultLocator(locator);
base = communicator.stringToProxy("test @ TestAdapter");
- test(Ice.proxyIdentityEqual(base.ice_getLocator(), communicator.getDefaultLocator()));
-
+ test(Ice.proxyIdentityEqual(base.ice_getLocator(), communicator.getDefaultLocator()));
+
#
# We also test ice_router/ice_getRouter (perhaps we should add a
# test/Ice/router test?)
@@ -106,24 +106,28 @@ def allTests(communicator, ref):
try:
obj3 = Test.TestIntfPrx.checkedCast(base3)
obj3.ice_ping()
- except Ice.LocalException:
+ except Ice.LocalException as ex:
+ print(ex)
test(False)
try:
obj2 = Test.TestIntfPrx.checkedCast(base2)
obj2.ice_ping()
- except Ice.LocalException:
+ except Ice.LocalException as ex:
+ print(ex)
test(False)
obj.shutdown()
manager.startServer()
try:
obj2 = Test.TestIntfPrx.checkedCast(base2)
obj2.ice_ping()
- except Ice.LocalException:
+ except Ice.LocalException as ex:
+ print(ex)
test(False)
try:
obj3 = Test.TestIntfPrx.checkedCast(base3)
obj3.ice_ping()
- except Ice.LocalException:
+ except Ice.LocalException as ex:
+ print(ex)
test(False)
obj.shutdown()
manager.startServer()
@@ -243,7 +247,7 @@ def allTests(communicator, ref):
id.name = Ice.generateUUID();
registry.addObject(adapter.add(HelloI(), id));
adapter.activate();
-
+
helloPrx = Test.HelloPrx.checkedCast(communicator.stringToProxy(communicator.identityToString(id)));
test(not helloPrx.ice_getConnection());
diff --git a/python/test/Ice/location/run.py b/python/test/Ice/location/run.py
index 3fc6200cd00..8d9a8c0837c 100755
--- a/python/test/Ice/location/run.py
+++ b/python/test/Ice/location/run.py
@@ -20,4 +20,5 @@ if len(path) == 0:
sys.path.append(os.path.join(path[0], "scripts"))
import TestUtil
-TestUtil.clientServerTest()
+TestUtil.queueClientServerTest()
+TestUtil.runQueuedTests()
diff --git a/python/test/Ice/objects/AllTests.py b/python/test/Ice/objects/AllTests.py
index ddfa9c2e78a..c38778c51ae 100644
--- a/python/test/Ice/objects/AllTests.py
+++ b/python/test/Ice/objects/AllTests.py
@@ -9,28 +9,30 @@
import Ice, Test, TestI, sys
+def MyValueFactory(type):
+ if type == '::Test::B':
+ return TestI.BI()
+ elif type == '::Test::C':
+ return TestI.CI()
+ elif type == '::Test::D':
+ return TestI.DI()
+ elif type == '::Test::E':
+ return TestI.EI()
+ elif type == '::Test::F':
+ return TestI.FI()
+ elif type == '::Test::I':
+ return TestI.II()
+ elif type == '::Test::J':
+ return TestI.JI()
+ elif type == '::Test::H':
+ return TestI.HI()
+ assert(False) # Should never be reached
+
class MyObjectFactory(Ice.ObjectFactory):
def create(self, type):
- if type == '::Test::B':
- return TestI.BI()
- elif type == '::Test::C':
- return TestI.CI()
- elif type == '::Test::D':
- return TestI.DI()
- elif type == '::Test::E':
- return TestI.EI()
- elif type == '::Test::F':
- return TestI.FI()
- elif type == '::Test::I':
- return TestI.II()
- elif type == '::Test::J':
- return TestI.JI()
- elif type == '::Test::H':
- return TestI.HI()
- assert(False) # Should never be reached
-
- def destroy(self):
- # Nothing to do
+ return None
+
+ def destroy():
pass
def test(b):
@@ -38,15 +40,16 @@ def test(b):
raise RuntimeError('test assertion failed')
def allTests(communicator):
- factory = MyObjectFactory()
- communicator.addObjectFactory(factory, '::Test::B')
- communicator.addObjectFactory(factory, '::Test::C')
- communicator.addObjectFactory(factory, '::Test::D')
- communicator.addObjectFactory(factory, '::Test::E')
- communicator.addObjectFactory(factory, '::Test::F')
- communicator.addObjectFactory(factory, '::Test::I')
- communicator.addObjectFactory(factory, '::Test::J')
- communicator.addObjectFactory(factory, '::Test::H')
+ communicator.getValueFactoryManager().add(MyValueFactory, '::Test::B')
+ communicator.getValueFactoryManager().add(MyValueFactory, '::Test::C')
+ communicator.getValueFactoryManager().add(MyValueFactory, '::Test::D')
+ communicator.getValueFactoryManager().add(MyValueFactory, '::Test::E')
+ communicator.getValueFactoryManager().add(MyValueFactory, '::Test::F')
+ communicator.getValueFactoryManager().add(MyValueFactory, '::Test::I')
+ communicator.getValueFactoryManager().add(MyValueFactory, '::Test::J')
+ communicator.getValueFactoryManager().add(MyValueFactory, '::Test::H')
+
+ communicator.addObjectFactory(MyObjectFactory(), "TestOF")
sys.stdout.write("testing stringToProxy... ")
sys.stdout.flush()
@@ -67,19 +70,19 @@ def allTests(communicator):
b1 = initial.getB1()
test(b1)
print("ok")
-
+
sys.stdout.write("getting B2... ")
sys.stdout.flush()
b2 = initial.getB2()
test(b2)
print("ok")
-
+
sys.stdout.write("getting C... ")
sys.stdout.flush()
c = initial.getC()
test(c)
print("ok")
-
+
sys.stdout.write("getting D... ")
sys.stdout.flush()
d = initial.getD()
@@ -97,7 +100,7 @@ def allTests(communicator):
test(f.e2.checkValues())
test(f._e1.checkValues())
print("ok")
-
+
sys.stdout.write("getting I, J, H... ")
sys.stdout.flush()
i = initial.getI()
@@ -107,7 +110,7 @@ def allTests(communicator):
h = initial.getH()
test(isinstance(h, Test.H))
print("ok")
-
+
sys.stdout.write("getting D1... ")
sys.stdout.flush()
d1 = initial.getD1(Test.D1(Test.A1("a1"), Test.A1("a2"), Test.A1("a3"), Test.A1("a4")));
@@ -116,7 +119,7 @@ def allTests(communicator):
test(d1.a3.name == "a3")
test(d1.a4.name == "a4")
print("ok")
-
+
sys.stdout.write("throw EDerived... ")
sys.stdout.flush()
try:
@@ -135,7 +138,7 @@ def allTests(communicator):
initial.setI(TestI.JI())
initial.setI(TestI.HI())
print("ok")
-
+
sys.stdout.write("checking consistency... ")
sys.stdout.flush()
test(b1 != b2)
@@ -170,7 +173,7 @@ def allTests(communicator):
test(c)
test(d)
print("ok")
-
+
sys.stdout.write("checking consistency... ")
sys.stdout.flush()
test(b1 != b2)
@@ -220,7 +223,7 @@ def allTests(communicator):
print("ok")
# Don't run this test with collocation, this should work with collocation
- # but the test isn't written to support it (we'd need support for the
+ # but the test isn't written to support it (we'd need support for the
# streaming interface)
if initial.ice_getConnection():
sys.stdout.write("testing UnexpectedObjectException... ")
@@ -244,4 +247,14 @@ def allTests(communicator):
test(False)
print("ok")
+ sys.stdout.write("testing getting ObjectFactory... ")
+ sys.stdout.flush()
+ test(communicator.findObjectFactory("TestOF") != None)
+ print("ok")
+
+ sys.stdout.write("testing getting ObjectFactory as ValueFactory... ")
+ sys.stdout.flush()
+ test(communicator.getValueFactoryManager().find("TestOF") != None)
+ print("ok")
+
return initial
diff --git a/python/test/Ice/objects/Server.py b/python/test/Ice/objects/Server.py
index 571a7048399..0758fc4009b 100755
--- a/python/test/Ice/objects/Server.py
+++ b/python/test/Ice/objects/Server.py
@@ -15,25 +15,19 @@ Ice.loadSlice('Test.ice')
Ice.loadSlice('ServerPrivate.ice')
import Test, TestI
-class MyObjectFactory(Ice.ObjectFactory):
- def create(self, type):
- if type == '::Test::I':
- return TestI.II()
- elif type == '::Test::J':
- return TestI.JI()
- elif type == '::Test::H':
- return TestI.HI()
- assert(False) # Should never be reached
-
- def destroy(self):
- # Nothing to do
- pass
+def MyValueFactory(type):
+ if type == '::Test::I':
+ return TestI.II()
+ elif type == '::Test::J':
+ return TestI.JI()
+ elif type == '::Test::H':
+ return TestI.HI()
+ assert(False) # Should never be reached
def run(args, communicator):
- factory = MyObjectFactory()
- communicator.addObjectFactory(factory, '::Test::I')
- communicator.addObjectFactory(factory, '::Test::J')
- communicator.addObjectFactory(factory, '::Test::H')
+ communicator.getValueFactoryManager().add(MyValueFactory, '::Test::I')
+ communicator.getValueFactoryManager().add(MyValueFactory, '::Test::J')
+ communicator.getValueFactoryManager().add(MyValueFactory, '::Test::H')
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010")
adapter = communicator.createObjectAdapter("TestAdapter")
diff --git a/python/test/Ice/objects/run.py b/python/test/Ice/objects/run.py
index 5a1f1d88b9b..53b64ebcc37 100755
--- a/python/test/Ice/objects/run.py
+++ b/python/test/Ice/objects/run.py
@@ -20,16 +20,15 @@ if len(path) == 0:
sys.path.append(os.path.join(path[0], "scripts"))
import TestUtil
-print("Running test with compact (default) format.")
-TestUtil.clientServerTest()
+TestUtil.queueClientServerTest(configName = "compact", message = "Running test with compact (default) format.")
-print("Running test with sliced format.")
-TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.SlicedFormat",
- additionalServerOptions="--Ice.Default.SlicedFormat")
+TestUtil.queueClientServerTest(configName = "sliced", message = "Running test with sliced format.",
+ additionalClientOptions="--Ice.Default.SlicedFormat",
+ additionalServerOptions="--Ice.Default.SlicedFormat")
-print("Running test with 1.0 encoding.")
-TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.EncodingVersion=1.0",
- additionalServerOptions="--Ice.Default.EncodingVersion=1.0")
+TestUtil.queueClientServerTest(configName = "1.0", message = "Running test with 1.0 encoding.",
+ additionalClientOptions="--Ice.Default.EncodingVersion=1.0",
+ additionalServerOptions="--Ice.Default.EncodingVersion=1.0")
-print("Running collocated test.")
-TestUtil.collocatedTest()
+TestUtil.queueCollocatedTest()
+TestUtil.runQueuedTests()
diff --git a/python/test/Ice/operations/run.py b/python/test/Ice/operations/run.py
index 600e5723b9d..83b76a7726f 100755
--- a/python/test/Ice/operations/run.py
+++ b/python/test/Ice/operations/run.py
@@ -20,9 +20,8 @@ if len(path) == 0:
sys.path.append(os.path.join(path[0], "scripts"))
import TestUtil
-print("tests with regular server.")
-TestUtil.clientServerTest()
-print("tests with AMD server.")
-TestUtil.clientServerTest(server="ServerAMD.py")
-print("tests with collocated server.")
-TestUtil.collocatedTest(" --Ice.ThreadPool.Client.SizeMax=2 --Ice.ThreadPool.Client.SizeWarn=0")
+TestUtil.queueClientServerTest()
+TestUtil.queueClientServerTest(configName = "amd", localOnly = True, message = "Running test with AMD server.",
+ server="ServerAMD.py")
+TestUtil.queueCollocatedTest(additionalOptions = " --Ice.ThreadPool.Client.SizeMax=2 --Ice.ThreadPool.Client.SizeWarn=0")
+TestUtil.runQueuedTests()
diff --git a/python/test/Ice/optional/AllTests.py b/python/test/Ice/optional/AllTests.py
index e2c20f64783..3531365239a 100644
--- a/python/test/Ice/optional/AllTests.py
+++ b/python/test/Ice/optional/AllTests.py
@@ -718,6 +718,15 @@ def allTests(communicator):
(p2, p3) = initial.end_opStringIntDict(r)
test(p2 == p1 and p3 == p1)
+ (p2, p3) = initial.opIntOneOptionalDict(Ice.Unset)
+ test(p2 is Ice.Unset and p3 is Ice.Unset)
+ p1 = {1:Test.OneOptional(58), 2:Test.OneOptional(59)}
+ (p2, p3) = initial.opIntOneOptionalDict(p1)
+ test(p2[1].a == 58 and p3[1].a == 58);
+ r = initial.begin_opIntOneOptionalDict(p1)
+ (p2, p3) = initial.end_opIntOneOptionalDict(r)
+ test(p2[1].a == 58 and p3[1].a == 58);
+
print("ok")
sys.stdout.write("testing exception optionals... ")
diff --git a/python/test/Ice/optional/Server.py b/python/test/Ice/optional/Server.py
index 6d0a280169a..bf4236de34d 100755
--- a/python/test/Ice/optional/Server.py
+++ b/python/test/Ice/optional/Server.py
@@ -129,6 +129,9 @@ class InitialI(Test.Initial):
def opStringIntDict(self, p1, current=None):
return (p1, p1)
+ def opIntOneOptionalDict(self, p1, current=None):
+ return (p1, p1)
+
def opClassAndUnknownOptional(self, p, current=None):
pass
diff --git a/python/test/Ice/optional/ServerAMD.py b/python/test/Ice/optional/ServerAMD.py
index 0f42e827343..a300cf17e22 100755
--- a/python/test/Ice/optional/ServerAMD.py
+++ b/python/test/Ice/optional/ServerAMD.py
@@ -130,6 +130,9 @@ class InitialI(Test.Initial):
def opStringIntDict_async(self, cb, p1, current=None):
cb.ice_response(p1, p1)
+ def opIntOneOptionalDict_async(self, cb, p1, current=None):
+ cb.ice_response(p1, p1)
+
def opClassAndUnknownOptional_async(self, cb, p, current=None):
cb.ice_response()
diff --git a/python/test/Ice/optional/Test.ice b/python/test/Ice/optional/Test.ice
index af85be2c2b2..73bfd77814c 100644
--- a/python/test/Ice/optional/Test.ice
+++ b/python/test/Ice/optional/Test.ice
@@ -271,6 +271,9 @@ class Initial
optional(1) StringIntDict opStringIntDict(optional(2) StringIntDict p1, out optional(3) StringIntDict p3);
+ optional(1) IntOneOptionalDict opIntOneOptionalDict(optional(2) IntOneOptionalDict p1,
+ out optional(3) IntOneOptionalDict p3);
+
void opClassAndUnknownOptional(A p);
void sendOptionalClass(bool req, optional(1) OneOptional o);
diff --git a/python/test/Ice/optional/TestAMD.ice b/python/test/Ice/optional/TestAMD.ice
index 247915c4623..6510fcbcc5f 100644
--- a/python/test/Ice/optional/TestAMD.ice
+++ b/python/test/Ice/optional/TestAMD.ice
@@ -272,6 +272,9 @@ class Initial
optional(1) StringIntDict opStringIntDict(optional(2) StringIntDict p1, out optional(3) StringIntDict p3);
+ optional(1) IntOneOptionalDict opIntOneOptionalDict(optional(2) IntOneOptionalDict p1,
+ out optional(3) IntOneOptionalDict p3);
+
void opClassAndUnknownOptional(A p);
void sendOptionalClass(bool req, optional(1) OneOptional o);
diff --git a/python/test/Ice/optional/run.py b/python/test/Ice/optional/run.py
index a0d8bb9a295..44156a1671c 100755
--- a/python/test/Ice/optional/run.py
+++ b/python/test/Ice/optional/run.py
@@ -20,9 +20,10 @@ if len(path) == 0:
sys.path.append(os.path.join(path[0], "scripts"))
import TestUtil
-print("Running test with compact (default) format.")
-TestUtil.clientServerTest()
-print("Running test with sliced format.")
-TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.SlicedFormat", additionalServerOptions="--Ice.Default.SlicedFormat")
-print("Running test with AMD server.")
-TestUtil.clientServerTest(server="ServerAMD.py")
+TestUtil.queueClientServerTest(configName = "compact", message = "Running test with compact (default) format.")
+TestUtil.queueClientServerTest(configName = "sliced", message = "Running test with sliced format.",
+ additionalClientOptions="--Ice.Default.SlicedFormat",
+ additionalServerOptions="--Ice.Default.SlicedFormat")
+TestUtil.queueClientServerTest(configName = "amd", localOnly = True, message = "Running test with AMD server.",
+ server="ServerAMD.py")
+TestUtil.runQueuedTests()
diff --git a/python/test/Ice/proxy/run.py b/python/test/Ice/proxy/run.py
index 600e5723b9d..83b76a7726f 100755
--- a/python/test/Ice/proxy/run.py
+++ b/python/test/Ice/proxy/run.py
@@ -20,9 +20,8 @@ if len(path) == 0:
sys.path.append(os.path.join(path[0], "scripts"))
import TestUtil
-print("tests with regular server.")
-TestUtil.clientServerTest()
-print("tests with AMD server.")
-TestUtil.clientServerTest(server="ServerAMD.py")
-print("tests with collocated server.")
-TestUtil.collocatedTest(" --Ice.ThreadPool.Client.SizeMax=2 --Ice.ThreadPool.Client.SizeWarn=0")
+TestUtil.queueClientServerTest()
+TestUtil.queueClientServerTest(configName = "amd", localOnly = True, message = "Running test with AMD server.",
+ server="ServerAMD.py")
+TestUtil.queueCollocatedTest(additionalOptions = " --Ice.ThreadPool.Client.SizeMax=2 --Ice.ThreadPool.Client.SizeWarn=0")
+TestUtil.runQueuedTests()
diff --git a/python/test/Ice/servantLocator/AllTests.py b/python/test/Ice/servantLocator/AllTests.py
index 73b55b42b69..c55e1743b08 100644
--- a/python/test/Ice/servantLocator/AllTests.py
+++ b/python/test/Ice/servantLocator/AllTests.py
@@ -52,7 +52,7 @@ def testExceptions(obj, collocated):
obj.userException()
test(False)
except Ice.UnknownUserException as ex:
- test(ex.unknown.find("Test::TestIntfUserException") >= 0)
+ test(ex.unknown.find("::Test::TestIntfUserException") >= 0)
except Ice.OperationNotExistException:
pass
except AttributeError:
@@ -148,7 +148,7 @@ def allTests(communicator, collocated):
obj.ice_ids()
test(False)
except Ice.UnknownUserException as ex:
- test(ex.unknown == "Test::TestIntfUserException")
+ test(ex.unknown == "::Test::TestIntfUserException")
except:
test(False)
@@ -157,7 +157,7 @@ def allTests(communicator, collocated):
obj.ice_ids()
test(False)
except Ice.UnknownUserException as ex:
- test(ex.unknown == "Test::TestIntfUserException")
+ test(ex.unknown == "::Test::TestIntfUserException")
except:
test(False)
print("ok")
diff --git a/python/test/Ice/servantLocator/run.py b/python/test/Ice/servantLocator/run.py
index 600e5723b9d..83b76a7726f 100755
--- a/python/test/Ice/servantLocator/run.py
+++ b/python/test/Ice/servantLocator/run.py
@@ -20,9 +20,8 @@ if len(path) == 0:
sys.path.append(os.path.join(path[0], "scripts"))
import TestUtil
-print("tests with regular server.")
-TestUtil.clientServerTest()
-print("tests with AMD server.")
-TestUtil.clientServerTest(server="ServerAMD.py")
-print("tests with collocated server.")
-TestUtil.collocatedTest(" --Ice.ThreadPool.Client.SizeMax=2 --Ice.ThreadPool.Client.SizeWarn=0")
+TestUtil.queueClientServerTest()
+TestUtil.queueClientServerTest(configName = "amd", localOnly = True, message = "Running test with AMD server.",
+ server="ServerAMD.py")
+TestUtil.queueCollocatedTest(additionalOptions = " --Ice.ThreadPool.Client.SizeMax=2 --Ice.ThreadPool.Client.SizeWarn=0")
+TestUtil.runQueuedTests()
diff --git a/python/test/Ice/slicing/exceptions/AllTests.py b/python/test/Ice/slicing/exceptions/AllTests.py
index 12c0283c07e..b3fa67dd502 100644
--- a/python/test/Ice/slicing/exceptions/AllTests.py
+++ b/python/test/Ice/slicing/exceptions/AllTests.py
@@ -46,7 +46,7 @@ class Callback(CallbackBase):
raise exc
except Test.Base as b:
test(b.b == "Base.b")
- test(b.ice_name() =="Test::Base")
+ test(b.ice_id() == "::Test::Base")
except:
test(False)
self.called()
@@ -56,7 +56,7 @@ class Callback(CallbackBase):
raise exc
except Test.Base as b:
test(b.b == "UnknownDerived.b")
- test(b.ice_name() =="Test::Base")
+ test(b.ice_id() == "::Test::Base")
except:
test(False)
self.called()
@@ -67,7 +67,7 @@ class Callback(CallbackBase):
except Test.KnownDerived as k:
test(k.b == "KnownDerived.b")
test(k.kd == "KnownDerived.kd")
- test(k.ice_name() =="Test::KnownDerived")
+ test(k.ice_id() == "::Test::KnownDerived")
except:
test(False)
self.called()
@@ -78,7 +78,7 @@ class Callback(CallbackBase):
except Test.KnownDerived as k:
test(k.b == "KnownDerived.b")
test(k.kd == "KnownDerived.kd")
- test(k.ice_name() =="Test::KnownDerived")
+ test(k.ice_id() == "::Test::KnownDerived")
except:
test(False)
self.called()
@@ -88,7 +88,7 @@ class Callback(CallbackBase):
raise exc
except Test.Base as b:
test(b.b == "UnknownIntermediate.b")
- test(b.ice_name() =="Test::Base")
+ test(b.ice_id() == "::Test::Base")
except:
test(False)
self.called()
@@ -99,7 +99,7 @@ class Callback(CallbackBase):
except Test.KnownIntermediate as ki:
test(ki.b == "KnownIntermediate.b")
test(ki.ki == "KnownIntermediate.ki")
- test(ki.ice_name() =="Test::KnownIntermediate")
+ test(ki.ice_id() == "::Test::KnownIntermediate")
except:
test(False)
self.called()
@@ -111,7 +111,7 @@ class Callback(CallbackBase):
test(kmd.b == "KnownMostDerived.b")
test(kmd.ki == "KnownMostDerived.ki")
test(kmd.kmd == "KnownMostDerived.kmd")
- test(kmd.ice_name() =="Test::KnownMostDerived")
+ test(kmd.ice_id() == "::Test::KnownMostDerived")
except:
test(False)
self.called()
@@ -122,7 +122,7 @@ class Callback(CallbackBase):
except Test.KnownIntermediate as ki:
test(ki.b == "KnownIntermediate.b")
test(ki.ki == "KnownIntermediate.ki")
- test(ki.ice_name() =="Test::KnownIntermediate")
+ test(ki.ice_id() == "::Test::KnownIntermediate")
except:
test(False)
self.called()
@@ -134,7 +134,7 @@ class Callback(CallbackBase):
test(kmd.b == "KnownMostDerived.b")
test(kmd.ki == "KnownMostDerived.ki")
test(kmd.kmd == "KnownMostDerived.kmd")
- test(kmd.ice_name() =="Test::KnownMostDerived")
+ test(kmd.ice_id() == "::Test::KnownMostDerived")
except:
test(False)
self.called()
@@ -146,7 +146,7 @@ class Callback(CallbackBase):
test(kmd.b == "KnownMostDerived.b")
test(kmd.ki == "KnownMostDerived.ki")
test(kmd.kmd == "KnownMostDerived.kmd")
- test(kmd.ice_name() =="Test::KnownMostDerived")
+ test(kmd.ice_id() == "::Test::KnownMostDerived")
except:
test(False)
self.called()
@@ -157,7 +157,7 @@ class Callback(CallbackBase):
except Test.KnownIntermediate as ki:
test(ki.b == "UnknownMostDerived1.b")
test(ki.ki == "UnknownMostDerived1.ki")
- test(ki.ice_name() =="Test::KnownIntermediate")
+ test(ki.ice_id() == "::Test::KnownIntermediate")
except:
test(False)
self.called()
@@ -168,7 +168,7 @@ class Callback(CallbackBase):
except Test.KnownIntermediate as ki:
test(ki.b == "UnknownMostDerived1.b")
test(ki.ki == "UnknownMostDerived1.ki")
- test(ki.ice_name() =="Test::KnownIntermediate")
+ test(ki.ice_id() == "::Test::KnownIntermediate")
except:
test(False)
self.called()
@@ -178,7 +178,7 @@ class Callback(CallbackBase):
raise exc
except Test.Base as b:
test(b.b == "UnknownMostDerived2.b")
- test(b.ice_name() =="Test::Base")
+ test(b.ice_id() == "::Test::Base")
except:
test(False)
self.called()
@@ -227,7 +227,7 @@ def allTests(communicator):
test(false)
except Test.Base as b:
test(b.b == "Base.b")
- test(b.ice_name() == "Test::Base")
+ test(b.ice_id() == "::Test::Base")
except:
test(False)
print("ok")
@@ -246,7 +246,7 @@ def allTests(communicator):
test(false)
except Test.Base as b:
test(b.b == "UnknownDerived.b")
- test(b.ice_name() == "Test::Base")
+ test(b.ice_id() == "::Test::Base")
except:
test(False)
print("ok")
@@ -266,7 +266,7 @@ def allTests(communicator):
except Test.KnownDerived as k:
test(k.b == "KnownDerived.b")
test(k.kd == "KnownDerived.kd")
- test(k.ice_name() == "Test::KnownDerived")
+ test(k.ice_id() == "::Test::KnownDerived")
except:
test(False)
print("ok")
@@ -286,7 +286,7 @@ def allTests(communicator):
except Test.KnownDerived as k:
test(k.b == "KnownDerived.b")
test(k.kd == "KnownDerived.kd")
- test(k.ice_name() == "Test::KnownDerived")
+ test(k.ice_id() == "::Test::KnownDerived")
except:
test(False)
print("ok")
@@ -305,7 +305,7 @@ def allTests(communicator):
test(false)
except Test.Base as b:
test(b.b == "UnknownIntermediate.b")
- test(b.ice_name() == "Test::Base")
+ test(b.ice_id() == "::Test::Base")
except:
test(False)
print("ok")
@@ -325,7 +325,7 @@ def allTests(communicator):
except Test.KnownIntermediate as ki:
test(ki.b == "KnownIntermediate.b")
test(ki.ki == "KnownIntermediate.ki")
- test(ki.ice_name() == "Test::KnownIntermediate")
+ test(ki.ice_id() == "::Test::KnownIntermediate")
except:
test(False)
print("ok")
@@ -346,7 +346,7 @@ def allTests(communicator):
test(kmd.b == "KnownMostDerived.b")
test(kmd.ki == "KnownMostDerived.ki")
test(kmd.kmd == "KnownMostDerived.kmd")
- test(kmd.ice_name() == "Test::KnownMostDerived")
+ test(kmd.ice_id() == "::Test::KnownMostDerived")
except:
test(False)
print("ok")
@@ -366,7 +366,7 @@ def allTests(communicator):
except Test.KnownIntermediate as ki:
test(ki.b == "KnownIntermediate.b")
test(ki.ki == "KnownIntermediate.ki")
- test(ki.ice_name() == "Test::KnownIntermediate")
+ test(ki.ice_id() == "::Test::KnownIntermediate")
except:
test(False)
print("ok")
@@ -387,7 +387,7 @@ def allTests(communicator):
test(kmd.b == "KnownMostDerived.b")
test(kmd.ki == "KnownMostDerived.ki")
test(kmd.kmd == "KnownMostDerived.kmd")
- test(kmd.ice_name() == "Test::KnownMostDerived")
+ test(kmd.ice_id() == "::Test::KnownMostDerived")
except:
test(False)
print("ok")
@@ -408,7 +408,7 @@ def allTests(communicator):
test(kmd.b == "KnownMostDerived.b")
test(kmd.ki == "KnownMostDerived.ki")
test(kmd.kmd == "KnownMostDerived.kmd")
- test(kmd.ice_name() == "Test::KnownMostDerived")
+ test(kmd.ice_id() == "::Test::KnownMostDerived")
except:
test(False)
print("ok")
@@ -428,7 +428,7 @@ def allTests(communicator):
except Test.KnownIntermediate as ki:
test(ki.b == "UnknownMostDerived1.b")
test(ki.ki == "UnknownMostDerived1.ki")
- test(ki.ice_name() == "Test::KnownIntermediate")
+ test(ki.ice_id() == "::Test::KnownIntermediate")
except:
test(False)
print("ok")
@@ -448,7 +448,7 @@ def allTests(communicator):
except Test.KnownIntermediate as ki:
test(ki.b == "UnknownMostDerived1.b")
test(ki.ki == "UnknownMostDerived1.ki")
- test(ki.ice_name() == "Test::KnownIntermediate")
+ test(ki.ice_id() == "::Test::KnownIntermediate")
except:
test(False)
print("ok")
@@ -467,7 +467,7 @@ def allTests(communicator):
test(false)
except Test.Base as b:
test(b.b == "UnknownMostDerived2.b")
- test(b.ice_name() == "Test::Base")
+ test(b.ice_id() == "::Test::Base")
except:
test(False)
print("ok")
diff --git a/python/test/Ice/slicing/exceptions/run.py b/python/test/Ice/slicing/exceptions/run.py
index 7af9d62fa74..6cf3085058b 100755
--- a/python/test/Ice/slicing/exceptions/run.py
+++ b/python/test/Ice/slicing/exceptions/run.py
@@ -20,17 +20,17 @@ if len(path) == 0:
sys.path.append(os.path.join(path[0], "scripts"))
import TestUtil
-print("Running test with sliced format.")
-TestUtil.clientServerTest()
+TestUtil.queueClientServerTest(configName = "sliced", message = "Running test with sliced format.")
-print("Running test with 1.0 encoding.")
-TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.EncodingVersion=1.0",
- additionalServerOptions="--Ice.Default.EncodingVersion=1.0")
+TestUtil.queueClientServerTest(configName = "1.0", message = "Running test with 1.0 encoding.",
+ additionalClientOptions="--Ice.Default.EncodingVersion=1.0",
+ additionalServerOptions="--Ice.Default.EncodingVersion=1.0")
-print("Running test with sliced format and AMD server.")
-TestUtil.clientServerTest(server="ServerAMD.py")
+TestUtil.queueClientServerTest(configName = "slicedAMD", localOnly = True,
+ message = "Running test with sliced format and AMD server.", server="ServerAMD.py")
-print("Running test with 1.0 encoding and AMD server.")
-TestUtil.clientServerTest(server="ServerAMD.py",
- additionalClientOptions="--Ice.Default.EncodingVersion=1.0",
- additionalServerOptions="--Ice.Default.EncodingVersion=1.0")
+TestUtil.queueClientServerTest(configName = "1.0AMD", localOnly = True,
+ message = "Running test with 1.0 encoding and AMD server.", server="ServerAMD.py",
+ additionalClientOptions="--Ice.Default.EncodingVersion=1.0",
+ additionalServerOptions="--Ice.Default.EncodingVersion=1.0")
+TestUtil.runQueuedTests()
diff --git a/python/test/Ice/slicing/objects/AllTests.py b/python/test/Ice/slicing/objects/AllTests.py
index 04f2d502453..fda1c80886c 100644
--- a/python/test/Ice/slicing/objects/AllTests.py
+++ b/python/test/Ice/slicing/objects/AllTests.py
@@ -68,14 +68,14 @@ class Callback(CallbackBase):
test(False)
def exception_SBSUnknownDerivedAsSBaseCompact(self, ex):
- test(isinstance(ex, Ice.NoObjectFactoryException))
+ test(isinstance(ex, Ice.NoValueFactoryException))
self.called()
def response_SUnknownAsObject10(self, o):
test(False)
def exception_SUnknownAsObject10(self, exc):
- test(exc.ice_name() == "Ice::NoObjectFactoryException")
+ test(exc.ice_id() == "::Ice::NoValueFactoryException")
self.called()
def response_SUnknownAsObject11(self, o):
@@ -224,7 +224,7 @@ class Callback(CallbackBase):
self.called()
def exception_throwBaseAsBase(self, ex):
- test(ex.ice_name() == "Test::BaseException")
+ test(ex.ice_id() == "::Test::BaseException")
e = ex
test(isinstance(e, Test.BaseException))
test(e.sbe == "sbe")
@@ -234,7 +234,7 @@ class Callback(CallbackBase):
self.called()
def exception_throwDerivedAsBase(self, ex):
- test(ex.ice_name() == "Test::DerivedException")
+ test(ex.ice_id() == "::Test::DerivedException")
e = ex
test(isinstance(e, Test.DerivedException))
test(e.sbe == "sbe")
@@ -250,7 +250,7 @@ class Callback(CallbackBase):
self.called()
def exception_throwDerivedAsDerived(self, ex):
- test(ex.ice_name() == "Test::DerivedException")
+ test(ex.ice_id() == "::Test::DerivedException")
e = ex
test(isinstance(e, Test.DerivedException))
test(e.sbe == "sbe")
@@ -266,7 +266,7 @@ class Callback(CallbackBase):
self.called()
def exception_throwUnknownDerivedAsBase(self, ex):
- test(ex.ice_name() == "Test::BaseException")
+ test(ex.ice_id() == "::Test::BaseException")
e = ex
test(isinstance(e, Test.BaseException))
test(e.sbe == "sbe")
@@ -359,14 +359,10 @@ class PNodeI(Test.PNode):
def __del__(self):
PNodeI.counter = PNodeI.counter - 1
-class NodeFactoryI(Ice.ObjectFactory):
- def create(self, id):
- if id == Test.PNode.ice_staticId():
- return PNodeI()
- return None
-
- def destroy(self):
- pass
+def NodeFactoryI(id):
+ if id == Test.PNode.ice_staticId():
+ return PNodeI()
+ return None
class PreservedI(Test.Preserved):
counter = 0
@@ -377,14 +373,10 @@ class PreservedI(Test.Preserved):
def __del__(self):
PreservedI.counter = PreservedI.counter - 1
-class PreservedFactoryI(Ice.ObjectFactory):
- def create(self, id):
- if id == Test.Preserved.ice_staticId():
- return PreservedI()
- return None
-
- def destroy(self):
- pass
+def PreservedFactoryI(id):
+ if id == Test.Preserved.ice_staticId():
+ return PreservedI()
+ return None
def allTests(communicator):
obj = communicator.stringToProxy("Test:default -p 12010")
@@ -492,7 +484,7 @@ def allTests(communicator):
test(False)
except Ice.OperationNotExistException:
pass
- except Ice.NoObjectFactoryException:
+ except Ice.NoValueFactoryException:
# Expected.
pass
except:
@@ -530,7 +522,7 @@ def allTests(communicator):
test(isinstance(o, Ice.UnknownSlicedObject))
test(o.unknownTypeId == "::Test::SUnknown")
t.checkSUnknown(o)
- except Ice.NoObjectFactoryException:
+ except Ice.NoValueFactoryException:
test(t.ice_getEncodingVersion() == Ice.Encoding_1_0)
except Ice.Exception:
test(False)
@@ -1358,7 +1350,7 @@ def allTests(communicator):
t.throwBaseAsBase()
test(False)
except Test.BaseException as e:
- test(e.ice_name() == "Test::BaseException")
+ test(e.ice_id() == "::Test::BaseException")
test(e.sbe == "sbe")
test(e.pb)
test(e.pb.sb == "sb")
@@ -1380,7 +1372,7 @@ def allTests(communicator):
t.throwDerivedAsBase()
test(False)
except Test.DerivedException as e:
- test(e.ice_name() == "Test::DerivedException")
+ test(e.ice_id() == "::Test::DerivedException")
test(e.sbe == "sbe")
test(e.pb)
test(e.pb.sb == "sb1")
@@ -1408,7 +1400,7 @@ def allTests(communicator):
t.throwDerivedAsDerived()
test(False)
except Test.DerivedException as e:
- test(e.ice_name() == "Test::DerivedException")
+ test(e.ice_id() == "::Test::DerivedException")
test(e.sbe == "sbe")
test(e.pb)
test(e.pb.sb == "sb1")
@@ -1436,7 +1428,7 @@ def allTests(communicator):
t.throwUnknownDerivedAsBase()
test(False)
except Test.BaseException as e:
- test(e.ice_name() == "Test::BaseException")
+ test(e.ice_id() == "::Test::BaseException")
test(e.sbe == "sbe")
test(e.pb)
test(e.pb.sb == "sb d2")
@@ -1579,7 +1571,7 @@ def allTests(communicator):
t.ice_encodingVersion(Ice.Encoding_1_0).checkPBSUnknown(p)
except Ice.OperationNotExistException:
pass
-
+
print("ok")
sys.stdout.write("preserved classes (AMI)... ")
@@ -1674,7 +1666,7 @@ def allTests(communicator):
# UCNode. This provides an easy way to determine how many
# unmarshaled instances currently exist.
#
- communicator.addObjectFactory(NodeFactoryI(), Test.PNode.ice_staticId())
+ communicator.getValueFactoryManager().add(NodeFactoryI, Test.PNode.ice_staticId())
#
# Relay a graph through the server. This test uses a preserved class
@@ -1761,7 +1753,7 @@ def allTests(communicator):
# Preserved. This provides an easy way to determine how many
# unmarshaled instances currently exist.
#
- communicator.addObjectFactory(PreservedFactoryI(), Test.Preserved.ice_staticId())
+ communicator.getValueFactoryManager().add(PreservedFactoryI, Test.Preserved.ice_staticId())
#
# Obtain a preserved object from the server where the most-derived
diff --git a/python/test/Ice/slicing/objects/run.py b/python/test/Ice/slicing/objects/run.py
index 59cd2f0cce8..dffc505da7e 100755
--- a/python/test/Ice/slicing/objects/run.py
+++ b/python/test/Ice/slicing/objects/run.py
@@ -20,17 +20,17 @@ if len(path) == 0:
sys.path.append(os.path.join(path[0], "scripts"))
import TestUtil
-print("Running test with sliced format.")
-TestUtil.clientServerTest()
+TestUtil.queueClientServerTest(configName = "sliced", message = "Running test with sliced format.")
-print("Running test with 1.0 encoding.")
-TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.EncodingVersion=1.0",
- additionalServerOptions="--Ice.Default.EncodingVersion=1.0")
+TestUtil.queueClientServerTest(configName = "1.0", message = "Running test with 1.0 encoding.",
+ additionalClientOptions="--Ice.Default.EncodingVersion=1.0",
+ additionalServerOptions="--Ice.Default.EncodingVersion=1.0")
-print("Running test with sliced format and AMD server.")
-TestUtil.clientServerTest(server="ServerAMD.py")
+TestUtil.queueClientServerTest(configName = "slicedAMD", localOnly = True,
+ message = "Running test with sliced format and AMD server.", server="ServerAMD.py")
-print("Running test with 1.0 encoding and AMD server.")
-TestUtil.clientServerTest(server="ServerAMD.py",
- additionalClientOptions="--Ice.Default.EncodingVersion=1.0",
- additionalServerOptions="--Ice.Default.EncodingVersion=1.0")
+TestUtil.queueClientServerTest(configName = "1.0AMD", localOnly = True,
+ message = "Running test with 1.0 encoding and AMD server.", server="ServerAMD.py",
+ additionalClientOptions="--Ice.Default.EncodingVersion=1.0",
+ additionalServerOptions="--Ice.Default.EncodingVersion=1.0")
+TestUtil.runQueuedTests()
diff --git a/python/test/Ice/timeout/run.py b/python/test/Ice/timeout/run.py
index 3fc6200cd00..8d9a8c0837c 100755
--- a/python/test/Ice/timeout/run.py
+++ b/python/test/Ice/timeout/run.py
@@ -20,4 +20,5 @@ if len(path) == 0:
sys.path.append(os.path.join(path[0], "scripts"))
import TestUtil
-TestUtil.clientServerTest()
+TestUtil.queueClientServerTest()
+TestUtil.runQueuedTests()
diff --git a/python/test/Slice/import/.depend.mak b/python/test/Slice/import/.depend.mak
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/python/test/Slice/import/.depend.mak
+++ /dev/null