summaryrefslogtreecommitdiff
path: root/js/test/Ice/inheritance
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2017-03-23 15:29:25 +0100
committerBenoit Foucher <benoit@zeroc.com>2017-03-23 15:29:25 +0100
commit1597a75419cd8049252cfbca6fce6ae95ef8b2c7 (patch)
tree2b2c858df1dbe68c1d576cae06c4713fd2ad5c40 /js/test/Ice/inheritance
parentUse Ice\None with PHP namespace mapping (diff)
downloadice-1597a75419cd8049252cfbca6fce6ae95ef8b2c7.tar.bz2
ice-1597a75419cd8049252cfbca6fce6ae95ef8b2c7.tar.xz
ice-1597a75419cd8049252cfbca6fce6ae95ef8b2c7.zip
Fix for ICE-7125 - Added support for Ice.ClassGraphDepthMax
Diffstat (limited to 'js/test/Ice/inheritance')
-rw-r--r--js/test/Ice/inheritance/ClientBidir.js73
-rw-r--r--js/test/Ice/inheritance/Server.js49
-rw-r--r--js/test/Ice/inheritance/Test.ice1
3 files changed, 50 insertions, 73 deletions
diff --git a/js/test/Ice/inheritance/ClientBidir.js b/js/test/Ice/inheritance/ClientBidir.js
deleted file mode 100644
index 0c908cfd4f0..00000000000
--- a/js/test/Ice/inheritance/ClientBidir.js
+++ /dev/null
@@ -1,73 +0,0 @@
-// **********************************************************************
-//
-// Copyright (c) 2003-2017 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.
-//
-// **********************************************************************
-
-(function(module, require, exports)
-{
- var Ice = require("ice").Ice;
- var Test = require("Test").Test;
- var InitialI = require("InitialI").InitialI;
- var Client = require("Client");
-
- var allTests = function(out, communicator)
- {
- return Ice.Promise.try(
- function()
- {
- return communicator.createObjectAdapter("").then(
- function(adapter)
- {
- var base = communicator.stringToProxy("initial:default -p 12010");
- adapter.add(new InitialI(adapter, base), Ice.stringToIdentity("initial"));
- return base.ice_getConnection().then(
- function(conn)
- {
- conn.setAdapter(adapter);
- return Client._clientAllTests(out, communicator);
- });
- });
- });
- };
-
- var run = function(out, id)
- {
- var communicator = Ice.initialize(id);
- return Ice.Promise.try(
- function()
- {
- out.writeLine("testing bidir callbacks with synchronous dispatch...");
- return allTests(out, communicator);
- }
- ).then(
- function()
- {
- return communicator.destroy();
- }
- ).then(
- function()
- {
- communicator = Ice.initialize(id);
- return Test.EchoPrx.checkedCast(communicator.stringToProxy("__echo:default -p 12010"));
- }
- ).then(
- function(prx)
- {
- return prx.shutdown();
- }
- ).finally(
- function()
- {
- return communicator.destroy();
- }
- );
- };
- exports._testBidir = run;
-}
-(typeof(global) !== "undefined" && typeof(global.process) !== "undefined" ? module : undefined,
- typeof(global) !== "undefined" && typeof(global.process) !== "undefined" ? require : this.Ice._require,
- typeof(global) !== "undefined" && typeof(global.process) !== "undefined" ? exports : this));
diff --git a/js/test/Ice/inheritance/Server.js b/js/test/Ice/inheritance/Server.js
new file mode 100644
index 00000000000..3b104cf02c0
--- /dev/null
+++ b/js/test/Ice/inheritance/Server.js
@@ -0,0 +1,49 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2017 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.
+//
+// **********************************************************************
+
+(function(module, require, exports)
+{
+ var Ice = require("ice").Ice;
+ var Test = require("Test").Test;
+ var InitialI = require("InitialI").InitialI;
+
+ var run = function(out, id, ready)
+ {
+ var communicator = Ice.initialize(id);
+ var adapter;
+ var echo = Test.EchoPrx.uncheckedCast(communicator.stringToProxy("__echo:default -p 12010"));
+ return Ice.Promise.try(() =>
+ {
+ return communicator.createObjectAdapter("");
+ }
+ ).then(adpt =>
+ {
+ adapter = adpt;
+ var base = communicator.stringToProxy("initial:default -p 12010");
+ adapter.add(new InitialI(adapter, base), Ice.stringToIdentity("initial"));
+ return echo.setConnection();
+ }
+ ).then(() =>
+ {
+ echo.ice_getCachedConnection().setAdapter(adapter);
+ adapter.activate();
+ ready.resolve();
+ return communicator.waitForShutdown();
+ }
+ ).then(() =>
+ {
+ return echo.shutdown();
+ }
+ ).finally(() => communicator.destroy());
+ };
+ exports._server = run;
+}
+(typeof(global) !== "undefined" && typeof(global.process) !== "undefined" ? module : undefined,
+ typeof(global) !== "undefined" && typeof(global.process) !== "undefined" ? require : this.Ice._require,
+ typeof(global) !== "undefined" && typeof(global.process) !== "undefined" ? exports : this));
diff --git a/js/test/Ice/inheritance/Test.ice b/js/test/Ice/inheritance/Test.ice
index fe15a5c29bb..b0924bb8cdd 100644
--- a/js/test/Ice/inheritance/Test.ice
+++ b/js/test/Ice/inheritance/Test.ice
@@ -235,6 +235,7 @@ class D extends C
interface Echo
{
+ void setConnection();
void startBatch();
void flushBatch();
void shutdown();