summaryrefslogtreecommitdiff
path: root/js/test/Ice/exceptions/Client.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/test/Ice/exceptions/Client.js')
-rw-r--r--js/test/Ice/exceptions/Client.js36
1 files changed, 22 insertions, 14 deletions
diff --git a/js/test/Ice/exceptions/Client.js b/js/test/Ice/exceptions/Client.js
index ecb23e4d560..ebfd35e6549 100644
--- a/js/test/Ice/exceptions/Client.js
+++ b/js/test/Ice/exceptions/Client.js
@@ -14,7 +14,7 @@
var Promise = Ice.Promise;
- var allTests = function(out, communicator, Test)
+ var allTests = function(out, communicator, Test, bidir)
{
var EmptyI = function()
{
@@ -369,22 +369,29 @@
).then(
function()
{
- out.write("testing memory limit marshal exception...");
- return thrower.throwMemoryLimitException(null);
- }
- ).then(
- failCB,
- function(ex)
- {
- test(ex instanceof Ice.UnknownLocalException);
- return thrower.throwMemoryLimitException(new Array(20 * 1024));
+ if(!bidir)
+ {
+ out.write("testing memory limit marshal exception...");
+ return thrower.throwMemoryLimitException(null).then(
+ failCB,
+ function(ex)
+ {
+ test(ex instanceof Ice.MemoryLimitException);
+ return thrower.throwMemoryLimitException(Ice.Buffer.createNative(20 * 1024));
+ }
+ ).then(
+ failCB,
+ function(ex)
+ {
+ test(ex instanceof Ice.ConnectionLostException);
+ out.writeLine("ok");
+ }
+ );
+ }
}
).then(
- failCB,
- function(ex)
+ function()
{
- test(ex instanceof Ice.MemoryLimitException);
- out.writeLine("ok");
out.write("catching object not exist exception... ");
var id = communicator.stringToIdentity("does not exist");
var thrower2 = Test.ThrowerPrx.uncheckedCast(thrower.ice_identity(id));
@@ -477,6 +484,7 @@
var run = function(out, id)
{
id.properties.setProperty("Ice.MessageSizeMax", "10");
+ id.properties.setProperty("Ice.Warn.Connections", "0");
var c = Ice.initialize(id);
return Promise.try(
function()