diff options
Diffstat (limited to 'js/test/Ice/timeout/Client.js')
-rw-r--r-- | js/test/Ice/timeout/Client.js | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/js/test/Ice/timeout/Client.js b/js/test/Ice/timeout/Client.js index 295405aa809..74b1a89e844 100644 --- a/js/test/Ice/timeout/Client.js +++ b/js/test/Ice/timeout/Client.js @@ -13,6 +13,24 @@ { async allTests() { + const controller = Test.ControllerPrx.uncheckedCast( + this.communicator().stringToProxy("controller:" + this.getTestEndpoint(1))); + test(controller !== null); + try + { + await this.allTestsWithController(controller); + } + catch(ex) + { + // Ensure the adapter is not in the holding state when an unexpected exception occurs to prevent the test + // from hanging on exit in case a connection which disables timeouts is still opened. + controller.resumeAdapter(); + throw ex; + } + } + + async allTestsWithController(controller) + { async function connect(prx) { let nRetry = 10; @@ -51,10 +69,6 @@ const timeout = await Test.TimeoutPrx.checkedCast(obj); test(timeout !== null); - const controller = Test.ControllerPrx.uncheckedCast( - communicator.stringToProxy("controller:" + this.getTestEndpoint(1))); - test(controller !== null); - out.write("testing connect timeout... "); { const to = Test.TimeoutPrx.uncheckedCast(obj.ice_timeout(100 * mult)); |