summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2016-12-22 09:10:17 +0100
committerBenoit Foucher <benoit@zeroc.com>2016-12-22 09:10:17 +0100
commitf0cccf19e17f2154e3382c32143429d1922673d6 (patch)
tree6fb5df0e18fbc7cc78e2a557244405584a33fef6
parentUWP test controller and related fixes (diff)
downloadice-f0cccf19e17f2154e3382c32143429d1922673d6.tar.bz2
ice-f0cccf19e17f2154e3382c32143429d1922673d6.tar.xz
ice-f0cccf19e17f2154e3382c32143429d1922673d6.zip
Added Ice/location & Glacier2/router testing for JS browsers
-rw-r--r--cpp/test/Glacier2/attack/Client.cpp2
-rw-r--r--cpp/test/Glacier2/dynamicFiltering/Client.cpp2
-rw-r--r--cpp/test/Glacier2/override/Client.cpp2
-rw-r--r--cpp/test/Glacier2/router/Client.cpp2
-rw-r--r--cpp/test/Glacier2/sessionControl/Client.cpp2
-rw-r--r--cpp/test/Glacier2/sessionHelper/Client.cpp2
-rw-r--r--cpp/test/Glacier2/staticFiltering/Client.cpp2
-rw-r--r--cpp/test/Ice/location/AllTests.cpp30
-rw-r--r--csharp/test/Glacier2/router/Client.cs2
-rw-r--r--csharp/test/Glacier2/sessionHelper/Client.cs2
-rw-r--r--csharp/test/Ice/adapterDeactivation/msbuild/collocated/packages.config4
-rw-r--r--java-compat/test/src/main/java/test/Glacier2/router/Client.java2
-rw-r--r--java-compat/test/src/main/java/test/Glacier2/sessionHelper/Client.java2
-rw-r--r--java/test/src/main/java/test/Glacier2/router/Client.java2
-rw-r--r--java/test/src/main/java/test/Glacier2/sessionHelper/Client.java2
-rw-r--r--js/bin/HttpServer.js11
-rw-r--r--js/src/Ice/ConnectRequestHandler.js2
-rw-r--r--js/src/Ice/TraceUtil.js6
-rw-r--r--js/test/Common/ControllerI.js5
-rw-r--r--js/test/Common/ControllerWorker.js4
-rw-r--r--js/test/Common/TestRunner.js3
-rw-r--r--js/test/Common/TestSuites.json277
-rw-r--r--js/test/Common/Worker.js10
-rw-r--r--js/test/Glacier2/router/Client.js5
-rw-r--r--js/test/Ice/ami/Client.js4
-rw-r--r--js/test/Ice/location/Client.js53
-rwxr-xr-xscripts/Controller.py4
-rw-r--r--scripts/Glacier2Util.py2
-rw-r--r--scripts/LocalDriver.py18
-rw-r--r--scripts/Util.py13
-rw-r--r--scripts/tests/Ice/location.py11
31 files changed, 269 insertions, 219 deletions
diff --git a/cpp/test/Glacier2/attack/Client.cpp b/cpp/test/Glacier2/attack/Client.cpp
index 69022d72a15..33657b2d717 100644
--- a/cpp/test/Glacier2/attack/Client.cpp
+++ b/cpp/test/Glacier2/attack/Client.cpp
@@ -118,7 +118,7 @@ AttackClient::run(int, char**)
backend->shutdown();
communicator()->setDefaultRouter(0);
ObjectPrx adminBase = communicator()->stringToProxy("Glacier2/admin -f Process:" +
- getTestEndpoint(communicator(), 11, "tcp"));
+ getTestEndpoint(communicator(), 11));
Ice::ProcessPrx process = Ice::ProcessPrx::checkedCast(adminBase);
test(process);
process->shutdown();
diff --git a/cpp/test/Glacier2/dynamicFiltering/Client.cpp b/cpp/test/Glacier2/dynamicFiltering/Client.cpp
index e29d7afacf5..1c06191e764 100644
--- a/cpp/test/Glacier2/dynamicFiltering/Client.cpp
+++ b/cpp/test/Glacier2/dynamicFiltering/Client.cpp
@@ -164,7 +164,7 @@ SessionControlClient::run(int argc, char* argv[])
//
communicator()->setDefaultRouter(0);
ObjectPrx processBase = communicator()->stringToProxy("Glacier2/admin -f Process:" +
- getTestEndpoint(communicator(), 11, "tcp"));
+ getTestEndpoint(communicator(), 11));
Ice::ProcessPrx process = Ice::ProcessPrx::checkedCast(processBase);
test(process);
process->shutdown();
diff --git a/cpp/test/Glacier2/override/Client.cpp b/cpp/test/Glacier2/override/Client.cpp
index 8e351d2d574..60a51659f53 100644
--- a/cpp/test/Glacier2/override/Client.cpp
+++ b/cpp/test/Glacier2/override/Client.cpp
@@ -211,7 +211,7 @@ CallbackClient::run(int, char**)
communicator()->setDefaultRouter(0);
ObjectPrx processBase = communicator()->stringToProxy("Glacier2/admin -f Process:" +
- getTestEndpoint(communicator(), 11, "tcp"));
+ getTestEndpoint(communicator(), 11));
Ice::ProcessPrx process = Ice::ProcessPrx::checkedCast(processBase);
process->shutdown();
try
diff --git a/cpp/test/Glacier2/router/Client.cpp b/cpp/test/Glacier2/router/Client.cpp
index 1a27a8726c1..bd93abd04cc 100644
--- a/cpp/test/Glacier2/router/Client.cpp
+++ b/cpp/test/Glacier2/router/Client.cpp
@@ -911,7 +911,7 @@ CallbackClient::run(int argc, char* argv[])
{
cout << "testing stringToProxy for admin process facet... " << flush;
processBase = communicator()->stringToProxy("Glacier2/admin -f Process:" +
- getTestEndpoint(communicator(), 11, "tcp"));
+ getTestEndpoint(communicator(), 11));
cout << "ok" << endl;
}
diff --git a/cpp/test/Glacier2/sessionControl/Client.cpp b/cpp/test/Glacier2/sessionControl/Client.cpp
index 4c437886367..82f928bf641 100644
--- a/cpp/test/Glacier2/sessionControl/Client.cpp
+++ b/cpp/test/Glacier2/sessionControl/Client.cpp
@@ -103,7 +103,7 @@ SessionControlClient::run(int, char**)
session->shutdown();
communicator()->setDefaultRouter(0);
ObjectPrx processBase = communicator()->stringToProxy("Glacier2/admin -f Process:" +
- getTestEndpoint(communicator(), 11, "tcp"));
+ getTestEndpoint(communicator(), 11));
Ice::ProcessPrx process = Ice::ProcessPrx::checkedCast(processBase);
test(process);
process->shutdown();
diff --git a/cpp/test/Glacier2/sessionHelper/Client.cpp b/cpp/test/Glacier2/sessionHelper/Client.cpp
index 92bd74ace0d..92186b494e8 100644
--- a/cpp/test/Glacier2/sessionHelper/Client.cpp
+++ b/cpp/test/Glacier2/sessionHelper/Client.cpp
@@ -456,7 +456,7 @@ public:
{
cout << "testing stringToProxy for process object... " << flush;
processBase = communicator()->stringToProxy("Glacier2/admin -f Process:" +
- getTestEndpoint(communicator(), 11, "tcp"));
+ getTestEndpoint(communicator(), 11));
cout << "ok" << endl;
}
diff --git a/cpp/test/Glacier2/staticFiltering/Client.cpp b/cpp/test/Glacier2/staticFiltering/Client.cpp
index 64223ab657f..88c379232c1 100644
--- a/cpp/test/Glacier2/staticFiltering/Client.cpp
+++ b/cpp/test/Glacier2/staticFiltering/Client.cpp
@@ -152,7 +152,7 @@ AttackClient::run(int, char**)
}
ObjectPrx processBase = communicator()->stringToProxy("Glacier2/admin -f Process:" +
- getTestEndpoint(communicator(), 11, "tcp"));
+ getTestEndpoint(communicator(), 11));
Ice::ProcessPrx process = Ice::ProcessPrx::checkedCast(processBase);
test(process);
process->shutdown();
diff --git a/cpp/test/Ice/location/AllTests.cpp b/cpp/test/Ice/location/AllTests.cpp
index 3a479e23436..148230c9fbf 100644
--- a/cpp/test/Ice/location/AllTests.cpp
+++ b/cpp/test/Ice/location/AllTests.cpp
@@ -73,7 +73,7 @@ allTests(const Ice::CommunicatorPtr& communicator, const string& ref)
Ice::ObjectPrxPtr base = communicator->stringToProxy("test @ TestAdapter");
Ice::ObjectPrxPtr base2 = communicator->stringToProxy("test @ TestAdapter");
Ice::ObjectPrxPtr base3 = communicator->stringToProxy("test");
- Ice::ObjectPrxPtr base4 = communicator->stringToProxy("ServerManager");
+ Ice::ObjectPrxPtr base4 = communicator->stringToProxy("ServerManager");
Ice::ObjectPrxPtr base5 = communicator->stringToProxy("test2");
Ice::ObjectPrxPtr base6 = communicator->stringToProxy("test @ ReplicatedAdapter");
cout << "ok" << endl;
@@ -90,8 +90,8 @@ allTests(const Ice::CommunicatorPtr& communicator, const string& 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?)
@@ -127,7 +127,7 @@ allTests(const Ice::CommunicatorPtr& communicator, const string& ref)
TestIntfPrxPtr obj6 = ICE_CHECKED_CAST(TestIntfPrx, base6);
test(obj6);
cout << "ok" << endl;
-
+
cout << "testing id@AdapterId indirect proxy... " << flush;
obj->shutdown();
manager->startServer();
@@ -140,8 +140,8 @@ allTests(const Ice::CommunicatorPtr& communicator, const string& ref)
cerr << ex << endl;
test(false);
}
- cout << "ok" << endl;
-
+ cout << "ok" << endl;
+
cout << "testing id@ReplicaGroupId indirect proxy... " << flush;
obj->shutdown();
manager->startServer();
@@ -154,7 +154,7 @@ allTests(const Ice::CommunicatorPtr& communicator, const string& ref)
cerr << ex << endl;
test(false);
}
- cout << "ok" << endl;
+ cout << "ok" << endl;
cout << "testing identity indirect proxy... " << flush;
obj->shutdown();
@@ -296,11 +296,11 @@ allTests(const Ice::CommunicatorPtr& communicator, const string& ref)
count += 2;
test(count == locator->getRequestCount());
- communicator->stringToProxy("test@TestAdapter")->ice_locatorCacheTimeout(-1)->ice_ping();
+ communicator->stringToProxy("test@TestAdapter")->ice_locatorCacheTimeout(-1)->ice_ping();
test(count == locator->getRequestCount());
communicator->stringToProxy("test")->ice_locatorCacheTimeout(-1)->ice_ping();
test(count == locator->getRequestCount());
- communicator->stringToProxy("test@TestAdapter")->ice_ping();
+ communicator->stringToProxy("test@TestAdapter")->ice_ping();
test(count == locator->getRequestCount());
communicator->stringToProxy("test")->ice_ping();
test(count == locator->getRequestCount());
@@ -456,7 +456,7 @@ allTests(const Ice::CommunicatorPtr& communicator, const string& ref)
{
test(false);
}
-
+
try
{
communicator->stringToProxy("test@TestAdapter3")->ice_locatorCacheTimeout(0)->ice_ping();
@@ -471,7 +471,7 @@ allTests(const Ice::CommunicatorPtr& communicator, const string& ref)
test(false);
}
catch(const Ice::LocalException&)
- {
+ {
}
registry->setAdapterDirectProxy("TestAdapter3", locator->findAdapterById("TestAdapter"));
try
@@ -541,7 +541,7 @@ allTests(const Ice::CommunicatorPtr& communicator, const string& ref)
test(false);
}
catch(const Ice::LocalException&)
- {
+ {
}
try
{
@@ -560,7 +560,7 @@ allTests(const Ice::CommunicatorPtr& communicator, const string& ref)
{
test(false);
}
-
+
registry->addObject(communicator->stringToProxy("test4"));
try
{
@@ -696,7 +696,7 @@ allTests(const Ice::CommunicatorPtr& communicator, const string& ref)
#endif
string host = communicator->getProperties()->getPropertyAsIntWithDefault("Ice.IPv6", 0) == 0 ?
"127.0.0.1" : "\"0:0:0:0:0:0:0:1\"";
-
+
if(!uwp || (communicator->getProperties()->getProperty("Ice.Default.Protocol") != "ssl" &&
communicator->getProperties()->getProperty("Ice.Default.Protocol") != "wss"))
{
@@ -715,7 +715,7 @@ allTests(const Ice::CommunicatorPtr& communicator, const string& ref)
id.name = Ice::generateUUID();
registry->addObject(adapter->add(ICE_MAKE_SHARED(HelloI), id));
adapter->activate();
-
+
HelloPrxPtr helloPrx = ICE_CHECKED_CAST(HelloPrx, communicator->stringToProxy(communicator->identityToString(id)));
test(!helloPrx->ice_getConnection());
diff --git a/csharp/test/Glacier2/router/Client.cs b/csharp/test/Glacier2/router/Client.cs
index 45c138b3394..690c11d0be0 100644
--- a/csharp/test/Glacier2/router/Client.cs
+++ b/csharp/test/Glacier2/router/Client.cs
@@ -387,7 +387,7 @@ public class Client : TestCommon.Application
{
Console.Out.Write("testing stringToProxy for admin object... ");
- processBase = communicator().stringToProxy("Glacier2/admin -f Process:" + getTestEndpoint(11, "tcp"));
+ processBase = communicator().stringToProxy("Glacier2/admin -f Process:" + getTestEndpoint(11));
Console.Out.WriteLine("ok");
}
diff --git a/csharp/test/Glacier2/sessionHelper/Client.cs b/csharp/test/Glacier2/sessionHelper/Client.cs
index 94276f6abe5..034ae3d2227 100644
--- a/csharp/test/Glacier2/sessionHelper/Client.cs
+++ b/csharp/test/Glacier2/sessionHelper/Client.cs
@@ -392,7 +392,7 @@ public class Client : TestCommon.Application
Ice.ObjectPrx processBase;
{
Console.Out.Write("testing stringToProxy for process object... ");
- processBase = communicator().stringToProxy("Glacier2/admin -f Process:" + getTestEndpoint(11, "tcp"));
+ processBase = communicator().stringToProxy("Glacier2/admin -f Process:" + getTestEndpoint(11));
Console.Out.WriteLine("ok");
}
diff --git a/csharp/test/Ice/adapterDeactivation/msbuild/collocated/packages.config b/csharp/test/Ice/adapterDeactivation/msbuild/collocated/packages.config
deleted file mode 100644
index e92a6bdbb98..00000000000
--- a/csharp/test/Ice/adapterDeactivation/msbuild/collocated/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
- <package id="zeroc.ice.net" version="3.7.0-alpha4" targetFramework="net452" />
-</packages> \ No newline at end of file
diff --git a/java-compat/test/src/main/java/test/Glacier2/router/Client.java b/java-compat/test/src/main/java/test/Glacier2/router/Client.java
index 8694bb32899..66fe63bc917 100644
--- a/java-compat/test/src/main/java/test/Glacier2/router/Client.java
+++ b/java-compat/test/src/main/java/test/Glacier2/router/Client.java
@@ -425,7 +425,7 @@ public class Client extends test.Util.Application
{
out.print("testing stringToProxy for process object... ");
- processBase = communicator().stringToProxy("Glacier2/admin -f Process:" + getTestEndpoint(11, "tcp"));
+ processBase = communicator().stringToProxy("Glacier2/admin -f Process:" + getTestEndpoint(11));
out.println("ok");
}
diff --git a/java-compat/test/src/main/java/test/Glacier2/sessionHelper/Client.java b/java-compat/test/src/main/java/test/Glacier2/sessionHelper/Client.java
index be2cd06405a..3b6dc94dbe7 100644
--- a/java-compat/test/src/main/java/test/Glacier2/sessionHelper/Client.java
+++ b/java-compat/test/src/main/java/test/Glacier2/sessionHelper/Client.java
@@ -383,7 +383,7 @@ public class Client extends test.Util.Application
Ice.ObjectPrx processBase;
{
out.print("testing stringToProxy for process object... ");
- processBase = communicator().stringToProxy("Glacier2/admin -f Process:" + getTestEndpoint(11, "tcp"));
+ processBase = communicator().stringToProxy("Glacier2/admin -f Process:" + getTestEndpoint(11));
out.println("ok");
}
diff --git a/java/test/src/main/java/test/Glacier2/router/Client.java b/java/test/src/main/java/test/Glacier2/router/Client.java
index 88026b6338e..5f2eb6c6966 100644
--- a/java/test/src/main/java/test/Glacier2/router/Client.java
+++ b/java/test/src/main/java/test/Glacier2/router/Client.java
@@ -419,7 +419,7 @@ public class Client extends test.Util.Application
{
out.print("testing stringToProxy for process object... ");
- processBase = communicator().stringToProxy("Glacier2/admin -f Process:" + getTestEndpoint(11, "tcp"));
+ processBase = communicator().stringToProxy("Glacier2/admin -f Process:" + getTestEndpoint(11));
out.println("ok");
}
diff --git a/java/test/src/main/java/test/Glacier2/sessionHelper/Client.java b/java/test/src/main/java/test/Glacier2/sessionHelper/Client.java
index cb90eaba937..efad9fb2da5 100644
--- a/java/test/src/main/java/test/Glacier2/sessionHelper/Client.java
+++ b/java/test/src/main/java/test/Glacier2/sessionHelper/Client.java
@@ -369,7 +369,7 @@ public class Client extends test.Util.Application
com.zeroc.Ice.ObjectPrx processBase;
{
out.print("testing stringToProxy for process object... ");
- processBase = communicator().stringToProxy("Glacier2/admin -f Process:" + getTestEndpoint(11, "tcp"));
+ processBase = communicator().stringToProxy("Glacier2/admin -f Process:" + getTestEndpoint(11));
out.println("ok");
}
diff --git a/js/bin/HttpServer.js b/js/bin/HttpServer.js
index dfb7c63dbe8..09509750517 100644
--- a/js/bin/HttpServer.js
+++ b/js/bin/HttpServer.js
@@ -184,7 +184,16 @@ function Init()
var testSuite = TestSuites[m];
if(testSuite)
{
- scripts = scripts.concat(TestSuites[m].files.map(function(f) { return "/test/" + matchController[1] + "/" + f}))
+ scripts = scripts.concat(TestSuites[m].files.map(function(f) {
+ if(f.indexOf("/") === -1)
+ {
+ return "/test/" + matchController[1] + "/" + f;
+ }
+ else
+ {
+ return f;
+ }
+ }))
}
else
{
diff --git a/js/src/Ice/ConnectRequestHandler.js b/js/src/Ice/ConnectRequestHandler.js
index b991f6c26aa..6b33f5fb760 100644
--- a/js/src/Ice/ConnectRequestHandler.js
+++ b/js/src/Ice/ConnectRequestHandler.js
@@ -127,7 +127,7 @@ class ConnectRequestHandler
if(ri !== null)
{
//
- ri.addProxy(this._proxy).then(() => this.flushRequests(), // The proxy was added to the router
+ ri.addProxy(this._proxy).then(() => this.flushRequests(), // The proxy was added to the router
// info, we're now ready to send the
// queued requests.
//
diff --git a/js/src/Ice/TraceUtil.js b/js/src/Ice/TraceUtil.js
index 5ff722fc753..e5ac84491c9 100644
--- a/js/src/Ice/TraceUtil.js
+++ b/js/src/Ice/TraceUtil.js
@@ -40,9 +40,9 @@ function traceSlicing(kind, typeId, slicingCat, logger)
function printIdentityFacetOperation(s, stream)
{
let toStringMode = Ice.ToStringMode.Unicode;
- if(stream.instance() !== null)
+ if(stream.instance !== null)
{
- toStringMode = stream.instance().toStringMode();
+ toStringMode = stream.instance.toStringMode();
}
const identity = new Identity();
@@ -431,7 +431,7 @@ class TraceUtil
stream.pos = p;
}
}
-
+
static dumpStream(stream)
{
const pos = stream.pos;
diff --git a/js/test/Common/ControllerI.js b/js/test/Common/ControllerI.js
index 3302eff96b5..bc6ddcf2bab 100644
--- a/js/test/Common/ControllerI.js
+++ b/js/test/Common/ControllerI.js
@@ -7,6 +7,8 @@
//
// **********************************************************************
+var process = { argv : [] };
+
function isSafari()
{
return /^((?!chrome).)*safari/i.test(navigator.userAgent);
@@ -120,6 +122,7 @@ class ProcessControllerI extends Test.Common.ProcessController
let initData = new Ice.InitializationData();
initData.logger = this._logger;
initData.properties = Ice.createProperties(args);
+ process.argv = args
if(exe === "ClientBidir")
{
promise = _testBidir(this._output, initData);
@@ -183,7 +186,7 @@ function runController(output, scripts)
{
message = message.replace(/\n/g, "\n ");
}
- out.write(message);
+ out.writeLine(message);
}
}
diff --git a/js/test/Common/ControllerWorker.js b/js/test/Common/ControllerWorker.js
index 56407cee552..ae870ece71c 100644
--- a/js/test/Common/ControllerWorker.js
+++ b/js/test/Common/ControllerWorker.js
@@ -11,6 +11,7 @@
self : false,
runTest : false
*/
+var process = { argv : [] };
let out =
{
@@ -47,7 +48,7 @@ self.onmessage = function(e)
{
message = message.replace(/\n/g, "\n ");
}
- out.write(message);
+ out.writeLine(message);
}
}
@@ -55,6 +56,7 @@ self.onmessage = function(e)
let initData = new Ice.InitializationData();
initData.logger = new Logger(out);
initData.properties = Ice.createProperties(e.data.args);
+ process.argv = e.data.args;
if(e.data.exe === "ClientBidir")
{
promise = _testBidir(out, initData);
diff --git a/js/test/Common/TestRunner.js b/js/test/Common/TestRunner.js
index 375bbe91024..e6a51f49c57 100644
--- a/js/test/Common/TestRunner.js
+++ b/js/test/Common/TestRunner.js
@@ -14,6 +14,8 @@
Test : false,
*/
+var process = { argv : [] };
+
function isSafari()
{
return /^((?!chrome).)*safari/i.test(navigator.userAgent);
@@ -165,6 +167,7 @@ function runTest(testsuite, language, host, protocol, testcases, out)
if(testcase.args !== undefined)
{
initData.properties = Ice.createProperties(testcase.args, id.properties);
+ process.argv=testcase.args
}
return client(out, initData);
}
diff --git a/js/test/Common/TestSuites.json b/js/test/Common/TestSuites.json
index 74ccdc399a1..5cafacf2039 100644
--- a/js/test/Common/TestSuites.json
+++ b/js/test/Common/TestSuites.json
@@ -1,151 +1,170 @@
{
"Ice/acm":
- {
- "files": ["Test.js", "Client.js"]
- },
+ {
+ "files": ["Test.js", "Client.js"]
+ },
"Ice/ami":
- {
- "files": ["Test.js", "Client.js"]
- },
+ {
+ "files": ["Test.js", "Client.js"]
+ },
"Ice/binding":
- {
- "files": ["Test.js", "Client.js"]
- },
+ {
+ "files": ["Test.js", "Client.js"]
+ },
"Ice/defaultValue":
- {
- "files": ["Test.js", "Client.js"]
- },
+ {
+ "files": ["Test.js", "Client.js"]
+ },
"Ice/enums":
- {
- "files": ["Test.js", "Client.js"],
- "testcases":
- [
- {
- "name": "client/server with 1.0 encoding",
- "args": ["--Ice.Default.EncodingVersion=1.0"]
- },
- {
- "name": "client/server with default encoding"
- }
- ]
- },
+ {
+ "files": ["Test.js", "Client.js"],
+ "testcases":
+ [
+ {
+ "name": "client/server with 1.0 encoding",
+ "args": ["--Ice.Default.EncodingVersion=1.0"]
+ },
+ {
+ "name": "client/server with default encoding"
+ }
+ ]
+ },
"Ice/exceptions":
- {
- "files": ["Test.js", "Client.js", "ThrowerI.js", "AMDThrowerI.js", "ClientBidir.js"],
- "testcases":
- [
- {
- "name": "client/server with compact format"
- },
- {
- "name": "client/server with sliced format",
- "args": ["--Ice.Default.SlicedFormat"]
- },
- {
- "name": "client/server with 1.0 encoding",
- "args": ["--Ice.Default.EncodingVersion=1.0"]
- }
- ]
- },
+ {
+ "files": ["Test.js", "Client.js", "ThrowerI.js", "AMDThrowerI.js", "ClientBidir.js"],
+ "testcases":
+ [
+ {
+ "name": "client/server with compact format"
+ },
+ {
+ "name": "client/server with sliced format",
+ "args": ["--Ice.Default.SlicedFormat"]
+ },
+ {
+ "name": "client/server with 1.0 encoding",
+ "args": ["--Ice.Default.EncodingVersion=1.0"]
+ }
+ ]
+ },
"Ice/facets":
- {
- "files": ["Test.js", "Client.js", "TestI.js", "ClientBidir.js"]
- },
+ {
+ "files": ["Test.js", "Client.js", "TestI.js", "ClientBidir.js"]
+ },
"Ice/hold":
- {
- "files": ["Test.js", "Client.js"]
- },
+ {
+ "files": ["Test.js", "Client.js"]
+ },
"Ice/info":
- {
- "files": ["Test.js", "Client.js"]
- },
+ {
+ "files": ["Test.js", "Client.js"]
+ },
"Ice/inheritance":
- {
- "files": ["Test.js", "Client.js", "InitialI.js", "ClientBidir.js"]
- },
+ {
+ "files": ["Test.js", "Client.js", "InitialI.js", "ClientBidir.js"]
+ },
"Ice/operations":
- {
- "files": ["Test.js", "Twoways.js", "Oneways.js", "BatchOneways.js", "Client.js",
- "MyDerivedClassI.js", "AMDMyDerivedClassI.js", "ClientBidir.js"]
- },
+ {
+ "files": ["Test.js", "Twoways.js", "Oneways.js", "BatchOneways.js", "Client.js",
+ "MyDerivedClassI.js", "AMDMyDerivedClassI.js", "ClientBidir.js"]
+ },
"Ice/objects":
- {
- "files": ["Test.js", "Client.js"],
- "testcases":
- [
- {
- "name": "client/server with compact format"
- },
- {
- "name": "client/server with sliced format",
- "args": ["--Ice.Default.SlicedFormat"]
- },
- {
- "name": "client/server with 1.0 encoding",
- "args": ["--Ice.Default.EncodingVersion=1.0"]
- }
- ]
- },
+ {
+ "files": ["Test.js", "Client.js"],
+ "testcases":
+ [
+ {
+ "name": "client/server with compact format"
+ },
+ {
+ "name": "client/server with sliced format",
+ "args": ["--Ice.Default.SlicedFormat"]
+ },
+ {
+ "name": "client/server with 1.0 encoding",
+ "args": ["--Ice.Default.EncodingVersion=1.0"]
+ }
+ ]
+ },
"Ice/optional":
- {
- "files": ["Test.js", "Client.js", "ClientPrivate.js", "InitialI.js", "AMDInitialI.js", "ClientBidir.js"],
- "testcases":
- [
- {
- "name": "client/server with compact format"
- },
- {
- "name": "client/server with sliced format",
- "args": ["--Ice.Default.SlicedFormat"]
- }
- ]
- },
+ {
+ "files": ["Test.js", "Client.js", "ClientPrivate.js", "InitialI.js", "AMDInitialI.js", "ClientBidir.js"],
+ "testcases":
+ [
+ {
+ "name": "client/server with compact format"
+ },
+ {
+ "name": "client/server with sliced format",
+ "args": ["--Ice.Default.SlicedFormat"]
+ }
+ ]
+ },
+ "Ice/location":
+ {
+ "files": ["Test.js", "Client.js"]
+ },
"Ice/properties":
- {
- "files": ["Client.js"]
- },
+ {
+ "files": ["Client.js"]
+ },
"Ice/proxy":
- {
- "files": ["Test.js", "Client.js"]
- },
+ {
+ "files": ["Test.js", "Client.js"]
+ },
"Ice/retry":
- {
- "files": ["Test.js", "Client.js"]
- },
+ {
+ "files": ["Test.js", "Client.js"]
+ },
"Ice/slicing/exceptions":
- {
- "files": ["Test.js", "Client.js"],
- "testcases":
- [
- {
- "name": "client/server"
- },
- {
- "name": "client/server with 1.0 encoding",
- "args": ["--Ice.Default.EncodingVersion=1.0"]
- }
- ]
- },
+ {
+ "files": ["Test.js", "Client.js"],
+ "testcases":
+ [
+ {
+ "name": "client/server"
+ },
+ {
+ "name": "client/server with 1.0 encoding",
+ "args": ["--Ice.Default.EncodingVersion=1.0"]
+ }
+ ]
+ },
"Ice/slicing/objects":
- {
- "files": ["Test.js", "Client.js"],
- "testcases":
- [
- {
- "name": "client/server"
- },
- {
- "name": "client/server with 1.0 encoding",
- "args": ["--Ice.Default.EncodingVersion=1.0"]
- }
- ]
- },
+ {
+ "files": ["Test.js", "Client.js"],
+ "testcases":
+ [
+ {
+ "name": "client/server"
+ },
+ {
+ "name": "client/server with 1.0 encoding",
+ "args": ["--Ice.Default.EncodingVersion=1.0"]
+ }
+ ]
+ },
"Ice/timeout":
- {
- "files": ["Test.js", "Client.js"]
- },
+ {
+ "files": ["Test.js", "Client.js"]
+ },
"Ice/number":
- {
- "files": ["Client.js"]
- }
+ {
+ "files": ["Client.js"]
+ },
+ "Glacier2/router":
+ {
+ "files": ["/lib/Glacier2.js", "Callback.js", "Client.js"],
+ "testcases":
+ [
+ {
+ "name": "client/server with router in unbuffered mode",
+ "args": ["--shutdown"]
+ },
+ {
+ "name": "client/server with router in buffered mode",
+ "args": ["--shutdown"]
+ }
+ ]
+ }
}
diff --git a/js/test/Common/Worker.js b/js/test/Common/Worker.js
index 9a4857eddd0..21926a2728c 100644
--- a/js/test/Common/Worker.js
+++ b/js/test/Common/Worker.js
@@ -44,10 +44,14 @@ self.onmessage = function(e)
self.importScripts("/test/Common/TestRunner.js");
for(var i = 0; i < test.files.length; ++i)
{
- var f = "/test/" + test.name + "/" + test.files[i];
- if(test.es5)
+ var f = test.files[i]
+ if(f.indexOf("/") === -1)
{
- f = f.replace("/test/", "/test/es5/");
+ f = "/test/" + test.name + "/" + f;
+ if(test.es5)
+ {
+ f = f.replace("/test/", "/test/es5/");
+ }
}
self.importScripts(f);
}
diff --git a/js/test/Glacier2/router/Client.js b/js/test/Glacier2/router/Client.js
index cb51976b016..a10b69b403c 100644
--- a/js/test/Glacier2/router/Client.js
+++ b/js/test/Glacier2/router/Client.js
@@ -106,7 +106,7 @@
out.writeLine("ok");
out.write("testing stringToProxy for server object... ");
- base = communicator.stringToProxy("c1/callback:tcp -p 12010");
+ base = communicator.stringToProxy("c1/callback:default -p 12010");
out.writeLine("ok");
out.write("trying to ping server before session creation... ");
@@ -355,7 +355,7 @@
out.writeLine("ok");
out.write("testing stringToProxy for process object... ");
- processBase = communicator.stringToProxy("Glacier2/admin -f Process:tcp -h 127.0.0.1 -p 12021");
+ processBase = communicator.stringToProxy("Glacier2/admin -f Process:default -h 127.0.0.1 -p 12021");
out.writeLine("ok");
out.write("testing checked cast for admin object... ");
@@ -406,6 +406,7 @@
});
};
exports._test = run;
+ exports._runServer = true;
}
(typeof(global) !== "undefined" && typeof(global.process) !== "undefined" ? module : undefined,
typeof(global) !== "undefined" && typeof(global.process) !== "undefined" ? require : this.Ice._require,
diff --git a/js/test/Ice/ami/Client.js b/js/test/Ice/ami/Client.js
index d87cbde2c1b..07b9ae03db4 100644
--- a/js/test/Ice/ami/Client.js
+++ b/js/test/Ice/ami/Client.js
@@ -198,7 +198,7 @@
out.write("testing AsyncResult operations... ");
var indirect = Test.TestIntfPrx.uncheckedCast(p.ice_adapterId("dummy"));
-
+
return indirect.op().catch(ex => test(ex instanceof Ice.NoEndpointException)
).then(() => testController.holdAdapter()
).then(() =>
@@ -292,7 +292,7 @@
r2.then(
() => test(false),
(ex) => test(ex instanceof Ice.InvocationCanceledException));
-
+
r1.cancel();
r2.cancel();
diff --git a/js/test/Ice/location/Client.js b/js/test/Ice/location/Client.js
index f39a2027a44..5890344ed19 100644
--- a/js/test/Ice/location/Client.js
+++ b/js/test/Ice/location/Client.js
@@ -16,8 +16,6 @@
var allTests = function(out, communicator)
{
- var failCB = function() { test(false); };
-
var p = new Ice.Promise();
var test = function(b)
{
@@ -292,7 +290,7 @@
return base.ice_ping();
}
).then(
- failCB,
+ function() { test(false); },
function(ex)
{
test(ex instanceof Ice.NotRegisteredException);
@@ -304,7 +302,7 @@
return base.ice_ping();
}
).then(
- failCB,
+ function() { test(false); },
function(ex)
{
test(ex instanceof Ice.NotRegisteredException);
@@ -697,7 +695,7 @@
return communicator.stringToProxy("test@TestAdapter3").ice_ping();
}
).then(
- failCB,
+ function() { test(false); },
function(ex)
{
if(!(ex instanceof Ice.NotRegisteredException))
@@ -722,7 +720,11 @@
).then(
function()
{
- registry.setAdapterDirectProxy("TestAdapter3", communicator.stringToProxy("dummy:tcp"));
+ return registry.setAdapterDirectProxy("TestAdapter3", communicator.stringToProxy("dummy:default"));
+ }
+ ).then(
+ function()
+ {
return communicator.stringToProxy("test@TestAdapter3").ice_ping();
}
).then(
@@ -731,7 +733,7 @@
return communicator.stringToProxy("test@TestAdapter3").ice_locatorCacheTimeout(0).ice_ping();
}
).then(
- failCB,
+ function() { test(false); },
function(ex)
{
if(!(ex instanceof Ice.LocalException))
@@ -741,7 +743,7 @@
return communicator.stringToProxy("test@TestAdapter3").ice_ping();
}
).then(
- failCB,
+ function() { test(false); },
function(ex)
{
if(!(ex instanceof Ice.LocalException))
@@ -753,7 +755,11 @@
).then(
function(adapter)
{
- registry.setAdapterDirectProxy("TestAdapter3", adapter);
+ return registry.setAdapterDirectProxy("TestAdapter3", adapter);
+ }
+ ).then(
+ function()
+ {
return communicator.stringToProxy("test@TestAdapter3").ice_ping();
}
).then(
@@ -762,6 +768,11 @@
out.writeLine("ok");
out.write("testing well-known object locator cache... ");
return registry.addObject(communicator.stringToProxy("test3@TestUnknown"));
+ },
+ function(ex)
+ {
+ out.writeLine(ex.toString());
+ test(false);
}
).then(
function()
@@ -769,7 +780,7 @@
return communicator.stringToProxy("test3").ice_ping();
}
).then(
- failCB,
+ function() { test(false); },
function(ex)
{
if(!(ex instanceof Ice.NotRegisteredException))
@@ -787,7 +798,7 @@
).then(
function()
{
- return registry.setAdapterDirectProxy("TestAdapter4", communicator.stringToProxy("dummy:tcp"));
+ return registry.setAdapterDirectProxy("TestAdapter4", communicator.stringToProxy("dummy:default"));
}
).then(
function()
@@ -795,7 +806,7 @@
return communicator.stringToProxy("test3").ice_ping();
}
).then(
- failCB,
+ function() { test(false); },
function(ex)
{
if(!(ex instanceof Ice.LocalException))
@@ -817,7 +828,7 @@
).then(
function()
{
- return registry.setAdapterDirectProxy("TestAdapter4", communicator.stringToProxy("dummy:tcp"));
+ return registry.setAdapterDirectProxy("TestAdapter4", communicator.stringToProxy("dummy:default"));
}
).then(
function()
@@ -830,7 +841,7 @@
return communicator.stringToProxy("test@TestAdapter4").ice_locatorCacheTimeout(0).ice_ping();
}
).then(
- failCB,
+ function() { test(false); },
function(ex)
{
if(!(ex instanceof Ice.LocalException))
@@ -840,7 +851,7 @@
return communicator.stringToProxy("test@TestAdapter4").ice_ping();
}
).then(
- failCB,
+ function() { test(false); },
function(ex)
{
if(!(ex instanceof Ice.LocalException))
@@ -850,7 +861,7 @@
return communicator.stringToProxy("test3").ice_ping();
}
).then(
- failCB,
+ function() { test(false); },
function(ex)
{
if(!(ex instanceof Ice.LocalException))
@@ -875,7 +886,7 @@
return communicator.stringToProxy("test4").ice_ping();
}
).then(
- failCB,
+ function() { test(false); },
function(ex)
{
if(!(ex instanceof Ice.NoEndpointException))
@@ -941,7 +952,7 @@
registry.setAdapterDirectProxy("TestAdapter5", null).then(
function()
{
- return registry.addObject(communicator.stringToProxy("test3:tcp"));
+ return registry.addObject(communicator.stringToProxy("test3:default"));
}
).then(
function()
@@ -1198,7 +1209,7 @@
return obj2.ice_ping();
}
).then(
- failCB,
+ function() { test(false); },
function(ex)
{
if(!(ex instanceof Ice.LocalException))
@@ -1208,7 +1219,7 @@
return obj3.ice_ping();
}
).then(
- failCB,
+ function() { test(false); },
function(ex)
{
if(!(ex instanceof Ice.LocalException))
@@ -1218,7 +1229,7 @@
return obj5.ice_ping();
}
).then(
- failCB,
+ function() { test(false); },
function(ex)
{
if(!(ex instanceof Ice.LocalException))
diff --git a/scripts/Controller.py b/scripts/Controller.py
index 7cc938e48bd..ab81a80e871 100755
--- a/scripts/Controller.py
+++ b/scripts/Controller.py
@@ -146,10 +146,10 @@ class ControllerDriver(Driver):
self.testcase = Test.Common.TestCasePrx.uncheckedCast(c.adapter.addWithUUID(TestCaseI(self.driver, current)))
return self.testcase
- def getTestSuites(mapping, c):
+ def getTestSuites(self, mapping, c):
mapping = Mapping.getByName(mapping)
config = self.driver.configs[mapping]
- return [t for t in mapping.getTestSuites() if not mapping.filterTestSuite(t.getId(), config, [], [])]
+ return [str(t) for t in mapping.getTestSuites() if not mapping.filterTestSuite(t.getId(), config)]
def getOptionOverrides(self, c):
return Test.Common.OptionOverrides(ipv6=([False] if not self.driver.hostIPv6 else [False, True]))
diff --git a/scripts/Glacier2Util.py b/scripts/Glacier2Util.py
index a0f4fe585e4..477205620b4 100644
--- a/scripts/Glacier2Util.py
+++ b/scripts/Glacier2Util.py
@@ -50,7 +50,7 @@ class Glacier2Router(ProcessFromBinDir, Server):
props.update({
"Glacier2.Client.Endpoints" : current.getTestEndpoint(self.portnum),
"Glacier2.Server.Endpoints" : "tcp",
- "Ice.Admin.Endpoints" : current.getTestEndpoint(self.portnum + 1, "tcp"),
+ "Ice.Admin.Endpoints" : current.getTestEndpoint(self.portnum + 1),
"Ice.Admin.InstanceName" : "Glacier2",
})
if self.passwords:
diff --git a/scripts/LocalDriver.py b/scripts/LocalDriver.py
index 4a3de09a362..e3f9814aac6 100644
--- a/scripts/LocalDriver.py
+++ b/scripts/LocalDriver.py
@@ -192,12 +192,20 @@ class RemoteTestCaseRunner(TestCaseRunner):
self.serverController = None
self.serverOptions = {}
- def getTestSuites(self, mapping, testsuites):
+ def getTestSuites(self, mapping, testSuiteIds):
if self.clientController:
- testsuites = [t for t in self.clientController.getTestSuites(mapping) if t in testsuites]
+ clientTestSuiteIds = self.clientController.getTestSuites(str(mapping))
+ if testSuiteIds:
+ testSuiteIds = [ts for ts in clientTestSuiteIds if ts in testSuiteIds]
+ else:
+ testSuiteIds = clientTestSuiteIds
if self.serverController:
- testsuites = [t for t in self.serverController.getTestSuites(mapping) if t in testsuites]
- return testsuites
+ serverTestSuiteIds = self.serverController.getTestSuites(str(mapping))
+ if testSuiteIds:
+ testSuiteIds = [ts for ts in serverTestSuiteIds if ts in testSuiteIds]
+ else:
+ testSuiteIds = serverTestSuiteIds
+ return mapping.getTestSuites(testSuiteIds)
def filterOptions(self, options):
import Ice
@@ -342,7 +350,7 @@ class LocalDriver(Driver):
while True:
executor = Executor(self.threadlocal, self.workers, self.continueOnFailure)
for mapping in mappings:
- testsuites = mapping.getTestSuites(testSuiteIds)
+ testsuites = self.runner.getTestSuites(mapping, testSuiteIds)
#
# Sort the test suites to run tests in the following order.
diff --git a/scripts/Util.py b/scripts/Util.py
index 0e7280eda63..193ad8de954 100644
--- a/scripts/Util.py
+++ b/scripts/Util.py
@@ -127,6 +127,7 @@ class Darwin(Platform):
if config.buildPlatform in ["iphoneos", "iphonesimulator"]:
return (["Ice/.*", "IceSSL/configuration"],
["Ice/background",
+ "Ice/echo",
"Ice/faultTolerance",
"Ice/gc",
"Ice/library",
@@ -375,7 +376,8 @@ def parseOptions(obj, options, mapped={}):
if not a and not isinstance(a, str):
a = "0"
setattr(obj, o, type(getattr(obj, o))(a))
- obj.parsedOptions.append(o)
+ if not o in obj.parsedOptions:
+ obj.parsedOptions.append(o)
else:
remaining.append((o, a))
options[:] = remaining
@@ -647,7 +649,7 @@ class Mapping:
def createConfig(self, options):
return self.Config(options)
- def filterTestSuite(self, testId, config, filters, rfilters):
+ def filterTestSuite(self, testId, config, filters=[], rfilters=[]):
(pfilters, prfilters) = platform.getFilters(config)
for includes in [filters, [re.compile(pf) for pf in pfilters]]:
if len(includes) > 0:
@@ -1448,7 +1450,10 @@ class ClientEchoServerTestCase(ClientServerTestCase):
ClientServerTestCase.__init__(self, name, *args, **kargs)
def getServerTestCase(self, cross=None):
- return Mapping.getByName("cpp").findTestSuite("Ice/echo").findTestCase("server")
+ ts = Mapping.getByName("cpp").findTestSuite("Ice/echo")
+ if ts:
+ return ts.findTestCase("server")
+ return None
def getClientType(self):
return "clientBidir"
@@ -2702,7 +2707,7 @@ class JavaScriptMapping(Mapping):
def loadTestSuites(self, tests, config, filters, rfilters):
Mapping.loadTestSuites(self, tests, config, filters, rfilters)
- self.getServerMapping().loadTestSuites(list(self.testsuites.keys()) + ["Ice/echo"], config)
+ self.getServerMapping().loadTestSuites(list(self.testsuites.keys()) + ["Ice/echo"], config, filters, rfilters)
def getServerMapping(self):
return Mapping.getByName("cpp") # By default, run clients against C++ mapping executables
diff --git a/scripts/tests/Ice/location.py b/scripts/tests/Ice/location.py
deleted file mode 100644
index 7d990532bc6..00000000000
--- a/scripts/tests/Ice/location.py
+++ /dev/null
@@ -1,11 +0,0 @@
-# -*- 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.
-#
-# **********************************************************************
-
-TestSuite(__name__, options = { "browser" : [] })