summaryrefslogtreecommitdiff
path: root/js/test/Ice/acm/Client.js
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2017-10-02 18:12:06 +0200
committerJose <jose@zeroc.com>2017-10-02 18:12:06 +0200
commit336828d5ded57be680eee0fb8139ddfa0c422be0 (patch)
treed9021a80ad8be9b7545925cdef16fc356b60ba15 /js/test/Ice/acm/Client.js
parentJavaScript style fixes (diff)
downloadice-336828d5ded57be680eee0fb8139ddfa0c422be0.tar.bz2
ice-336828d5ded57be680eee0fb8139ddfa0c422be0.tar.xz
ice-336828d5ded57be680eee0fb8139ddfa0c422be0.zip
JavaScript testsuite improvements and simplifications
Diffstat (limited to 'js/test/Ice/acm/Client.js')
-rw-r--r--js/test/Ice/acm/Client.js33
1 files changed, 13 insertions, 20 deletions
diff --git a/js/test/Ice/acm/Client.js b/js/test/Ice/acm/Client.js
index aad7c24c378..0eb27122639 100644
--- a/js/test/Ice/acm/Client.js
+++ b/js/test/Ice/acm/Client.js
@@ -435,25 +435,19 @@
await proxy.startHeartbeatCount();
await proxy.waitForHeartbeatCount(2);
- {
- const p = new Promise(
- (resolve, reject) =>
- {
- con.setCloseCallback(() => resolve());
- });
- con.close(Ice.ConnectionClose.Gracefully);
- await p;
- }
-
- {
- const p = new Promise(
- (resolve, reject) =>
- {
- con.setCloseCallback(() => resolve());
- });
- await p;
- con.setHeartbeatCallback(c => test(false));
- }
+ await new Promise(
+ (resolve, reject) =>
+ {
+ con.setCloseCallback(() => resolve());
+ con.close(Ice.ConnectionClose.Gracefully);
+ });
+
+ await new Promise(
+ (resolve, reject) =>
+ {
+ con.setCloseCallback(() => resolve());
+ });
+ con.setHeartbeatCallback(c => test(false));
}
}
@@ -511,7 +505,6 @@
{
initData.properties.setProperty("Ice.Warn.Connections", "0");
communicator = Ice.initialize(initData);
-
await allTests(out, communicator);
}
finally