- Notifications
You must be signed in to change notification settings - Fork29
Open
Milestone
Description
PROBLEM:
Sometimes Sakuli prints out after all is down the following log line
ERROR [2018-03-07 19:19:27.543] - Connection refused (Connection refused)
This comes from the SahiShutDownHookl
class. WhenSystem.exit()
is called at theSakuliStarter
. This is basically no Error because the Sahi Proxy is just already down.
TODO:
- Find a way to suppress this misleading log message
- Logger
- Maybe Aspect around and call the hook earlier
publicclassShutDownHookimplementsRunnable {privateStringsahiHost;privateStringport;privateStringsessionId;publicShutDownHook(StringsahiHost,Stringport,StringsessionId) {this.sahiHost =sahiHost;this.port =port;this.sessionId =sessionId; }publicvoidrun() {try {System.out.println("Shutting down ...");StringurlStr ="http://" +this.sahiHost +":" +this.port +"/_s_/dyn/Suite_kill/?sahisid=" +this.sessionId;URLurl =newURL(urlStr);url.getContent(); }catch (IOExceptionvar3) {System.err.println(var3.getMessage()); } }}