Skip to content
Snippets Groups Projects
Commit 1149d806 authored by buczekp's avatar buczekp
Browse files

[LMS-1719] more reliable handling of session expired exception in tests

SVN: 22134
parent 7af07756
No related branches found
No related tags found
No related merge requests found
......@@ -212,7 +212,7 @@ public abstract class AbstractAsyncCallback<T> implements AsyncCallback<T>
if (isIncompatibleServerException(caught))
{
String sessionExpiredMessage = getMessage(Dict.SESSION_EXPIRED_MESSAGE);
handleSessionTerminated(sessionExpiredMessage);
handleSessionTerminated(sessionExpiredMessage, caught);
return;
}
......@@ -239,12 +239,7 @@ public abstract class AbstractAsyncCallback<T> implements AsyncCallback<T>
}
if (caught instanceof InvalidSessionException)
{
handleSessionTerminated(msg);
// only for tests
if (staticCallbackListener != DEFAULT_CALLBACK_LISTENER)
{
callbackListener.onFailureOf(viewContext, this, msg, caught);
}
handleSessionTerminated(msg, caught);
} else
{
callbackListener.onFailureOf(viewContext, this, msg, caught);
......@@ -281,7 +276,7 @@ public abstract class AbstractAsyncCallback<T> implements AsyncCallback<T>
}
}
private void handleSessionTerminated(String msg)
private void handleSessionTerminated(String msg, Throwable caught)
{
if (viewContext.isSimpleOrEmbeddedMode())
{
......@@ -290,6 +285,11 @@ public abstract class AbstractAsyncCallback<T> implements AsyncCallback<T>
{
showSessionTerminated(msg);
}
// only for tests
if (staticCallbackListener != DEFAULT_CALLBACK_LISTENER)
{
callbackListener.onFailureOf(viewContext, this, msg, caught);
}
}
private void showSessionTerminated(String msg)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment