diff options
author | Mark Spruiell <mes@zeroc.com> | 2017-01-30 13:45:21 -0800 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2017-01-30 13:45:21 -0800 |
commit | 61270a10f980933cf582edb766f10c8ac6d86e8a (patch) | |
tree | 45ab4a7c2986954054fce613bc3c8f7967e7951e /js/test/Ice/acm/Client.js | |
parent | Fix slice2cpp build failure (diff) | |
download | ice-61270a10f980933cf582edb766f10c8ac6d86e8a.tar.bz2 ice-61270a10f980933cf582edb766f10c8ac6d86e8a.tar.xz ice-61270a10f980933cf582edb766f10c8ac6d86e8a.zip |
merging IceBridge into master
Diffstat (limited to 'js/test/Ice/acm/Client.js')
-rw-r--r-- | js/test/Ice/acm/Client.js | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/js/test/Ice/acm/Client.js b/js/test/Ice/acm/Client.js index e18f45ec0ac..58f8efdf313 100644 --- a/js/test/Ice/acm/Client.js +++ b/js/test/Ice/acm/Client.js @@ -391,6 +391,37 @@ } } + class HeartbeatManualTest extends TestCase + { + constructor(com, out) + { + super("manual heartbeats", com, out); + // + // Disable heartbeats. + // + this.setClientACM(10, -1, 0); + this.setServerACM(10, -1, 0); + } + + runTestCase(adapter, proxy) + { + function sendHeartbeats(con) + { + var p = Promise.resolve(); + for(var i = 0; i < 5; ++i) + { + p = p.then(con.heartbeat()); + } + return p; + } + + return proxy.startHeartbeatCount().then( + () => proxy.ice_getConnection()).then( + con => sendHeartbeats(con)).then( + () => proxy.waitForHeartbeatCount(5)); + } + } + class SetACMTest extends TestCase { constructor(com, out) @@ -421,7 +452,7 @@ test(acm.close === Ice.ACMClose.CloseOnInvocationAndIdle); test(acm.heartbeat === Ice.ACMHeartbeat.HeartbeatAlways); - return proxy.waitForHeartbeat(2); + return proxy.startHeartbeatCount().then(() => proxy.waitForHeartbeatCount(2)); } } @@ -459,6 +490,7 @@ tests.push(new HeartbeatOnIdleTest(com, out)); tests.push(new HeartbeatAlwaysTest(com, out)); + tests.push(new HeartbeatManualTest(com, out)); tests.push(new SetACMTest(com, out)); } |