diff options
Diffstat (limited to 'js/test/Ice/acm/Client.js')
-rw-r--r-- | js/test/Ice/acm/Client.js | 33 |
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 |