diff options
author | Jose <jose@zeroc.com> | 2017-06-22 18:08:11 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2017-06-22 18:08:11 +0200 |
commit | 6a5403f10a7e47a9e418cfd10bb965c4ef220c27 (patch) | |
tree | 1d3df8b14470f9919968ac049256281f34f91837 /js | |
parent | Disable unreliable Ice/timeout PHP test (diff) | |
download | ice-6a5403f10a7e47a9e418cfd10bb965c4ef220c27.tar.bz2 ice-6a5403f10a7e47a9e418cfd10bb965c4ef220c27.tar.xz ice-6a5403f10a7e47a9e418cfd10bb965c4ef220c27.zip |
Fix (ICE-8034) - JS Ice/exceptions failure
Diffstat (limited to 'js')
-rw-r--r-- | js/test/Ice/exceptions/Client.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/js/test/Ice/exceptions/Client.js b/js/test/Ice/exceptions/Client.js index fce60ec4a84..a5e34edc27b 100644 --- a/js/test/Ice/exceptions/Client.js +++ b/js/test/Ice/exceptions/Client.js @@ -380,6 +380,30 @@ ).then( function() { + // The above test can cause a close connection between the echo server and + // bidir server, we need to wait until the bidir server has reopen the + // connection with the echo server. + var reconnect = function(retries) + { + return thrower.ice_ping().catch( + (ex) => + { + if(ex instanceof Ice.ObjectNotExistException && retries > 0) + { + return Ice.Promise.delay(20).then(() => reconnect(retries--)); + } + else + { + throw ex; + } + }); + }; + + return reconnect(5); + } + ).then( + function() + { out.write("catching object not exist exception... "); var id = Ice.stringToIdentity("does not exist"); var thrower2 = Test.ThrowerPrx.uncheckedCast(thrower.ice_identity(id)); |