summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2017-06-14 07:51:08 +0200
committerJose <jose@zeroc.com>2017-06-14 07:51:08 +0200
commit2b71a2c7bdaef8b48f0a0a195914ec2910b5fd45 (patch)
tree6422130482ae14fdb1ef085a5a81614dd0194ab2 /js
parentFixed ICE-8048 - removed double underscores that crept back in (diff)
downloadice-2b71a2c7bdaef8b48f0a0a195914ec2910b5fd45.tar.bz2
ice-2b71a2c7bdaef8b48f0a0a195914ec2910b5fd45.tar.xz
ice-2b71a2c7bdaef8b48f0a0a195914ec2910b5fd45.zip
Fix JavaScript timeout test to print unexpected exceptions
Diffstat (limited to 'js')
-rw-r--r--js/test/Ice/exceptions/Client.js2
-rw-r--r--js/test/Ice/timeout/Client.js28
2 files changed, 18 insertions, 12 deletions
diff --git a/js/test/Ice/exceptions/Client.js b/js/test/Ice/exceptions/Client.js
index 892f17931ae..3b5a2ed3636 100644
--- a/js/test/Ice/exceptions/Client.js
+++ b/js/test/Ice/exceptions/Client.js
@@ -49,7 +49,7 @@
var msg = "test failed";
if(ex)
{
- msg += ex.toString();
+ msg += ": " + ex.toString();
}
throw new Error();
}
diff --git a/js/test/Ice/timeout/Client.js b/js/test/Ice/timeout/Client.js
index 7f06427aa9f..2bc8f7e4468 100644
--- a/js/test/Ice/timeout/Client.js
+++ b/js/test/Ice/timeout/Client.js
@@ -35,13 +35,18 @@
var ref, obj, mult, timeout, to, connection, comm, now;
var p = new Ice.Promise();
- var test = function(b)
+ var test = function(b, ex)
{
if(!b)
{
try
{
- throw new Error("test failed");
+ var msg = "test failed";
+ if(ex)
+ {
+ msg += ":\n" + ex.toString();
+ }
+ throw new Error(msg);
}
catch(err)
{
@@ -80,7 +85,7 @@
failCB,
ex =>
{
- test(ex instanceof Ice.ConnectTimeoutException);
+ test(ex instanceof Ice.ConnectTimeoutException, ex);
return timeout.op(); // Ensure adapter is active.
}
).then(() =>
@@ -102,7 +107,7 @@
).then(() => test(false),
ex =>
{
- test(ex instanceof Ice.TimeoutException);
+ test(ex instanceof Ice.TimeoutException, ex);
return timeout.op(); // Ensure adapter is active.
}
).then(() =>
@@ -133,7 +138,7 @@
failCB,
ex =>
{
- test(ex instanceof Ice.InvocationTimeoutException);
+ test(ex instanceof Ice.InvocationTimeoutException, ex);
return obj.ice_ping();
}
).then(() =>
@@ -179,7 +184,7 @@
}
catch(ex)
{
- test(ex instanceof Ice.ConnectionManuallyClosedException); // Expected
+ test(ex instanceof Ice.ConnectionManuallyClosedException, ex); // Expected
}
return timeout.op();
}
@@ -214,7 +219,7 @@
failCB,
ex =>
{
- test(ex instanceof Ice.TimeoutException);
+ test(ex instanceof Ice.TimeoutException, ex);
return timeout.op(); // Ensure adapter is active.
}
).then(() =>
@@ -231,7 +236,7 @@
failCB,
ex =>
{
- test(ex instanceof Ice.TimeoutException);
+ test(ex instanceof Ice.TimeoutException, ex);
return comm.destroy();
}
).then(() =>
@@ -258,7 +263,7 @@
failCB,
ex =>
{
- test(ex instanceof Ice.ConnectTimeoutException);
+ test(ex instanceof Ice.ConnectTimeoutException, ex);
return timeout.op(); // Ensure adapter is active.
}
).then(() => timeout.holdAdapter(750 * mult)
@@ -273,7 +278,7 @@
).then(() => test(false),
ex =>
{
- test(ex instanceof Ice.ConnectTimeoutException);
+ test(ex instanceof Ice.ConnectTimeoutException, ex);
return timeout.op(); // Ensure adapter is active.
}
).then(() =>
@@ -287,7 +292,7 @@
failCB,
ex =>
{
- test(ex instanceof Ice.TimeoutException);
+ test(ex instanceof Ice.TimeoutException, ex);
return comm.destroy();
}
).then(() =>
@@ -335,6 +340,7 @@
// buffers to fill up.
//
id.properties.setProperty("Ice.MessageSizeMax", "10000");
+ id.properties.setProperty("Ice.PrintStackTraces", "1");
var c = Ice.initialize(id);
return Ice.Promise.try(() =>