summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2010-01-06 14:48:01 -0500
committerNat Goodspeed <nat@lindenlab.com>2010-01-06 14:48:01 -0500
commitd16f6a6e1a2c26bb87e3abea7a1b95a63b68594c (patch)
treeb3e4268be2f8ec37187602337b1f896f22aa775f
parent2978609575eac6067b84fb4734228a81014ae26f (diff)
parentfed5834238f554a784f4d44118a00b8da4026ca5 (diff)
Automated merge with ssh://hg.lindenlab.com/viewer/viewer-2-0/
-rw-r--r--indra/viewer_components/login/lllogin.cpp7
-rw-r--r--indra/viewer_components/login/tests/lllogin_test.cpp14
2 files changed, 15 insertions, 6 deletions
diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp
index 364088ab31..f5bda71846 100644
--- a/indra/viewer_components/login/lllogin.cpp
+++ b/indra/viewer_components/login/lllogin.cpp
@@ -160,8 +160,11 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD credential
seconds_to_timeout = credentials["cfg_srv_timeout"].asReal();
}
- filter.eventAfter(seconds_to_timeout,
- getProgressEventLLSD("offline", "fail.login"));
+ // If the SRV request times out (e.g. EXT-3934), simulate response: an
+ // array containing our original URI.
+ LLSD fakeResponse(LLSD::emptyArray());
+ fakeResponse.append(uri);
+ filter.eventAfter(seconds_to_timeout, fakeResponse);
std::string srv_pump_name = "LLAres";
if(credentials.has("cfg_srv_pump"))
diff --git a/indra/viewer_components/login/tests/lllogin_test.cpp b/indra/viewer_components/login/tests/lllogin_test.cpp
index 7159959a4f..8463e6d2ca 100644
--- a/indra/viewer_components/login/tests/lllogin_test.cpp
+++ b/indra/viewer_components/login/tests/lllogin_test.cpp
@@ -215,14 +215,14 @@ namespace tut
void llviewerlogin_object::test<1>()
{
DEBUG;
- // Testing login with immediate repsonses from Ares and XMLPRC
+ // Testing login with immediate responses from Ares and XMLPRC
// The response from both requests will come before the post request exits.
// This tests an edge case of the login state handling.
LLEventStream llaresPump("LLAres"); // Dummy LLAres pump.
LLEventStream xmlrpcPump("LLXMLRPCTransaction"); // Dummy XMLRPC pump
bool respond_immediately = true;
- // Have 'dummy ares' repsond immediately.
+ // Have 'dummy ares' respond immediately.
LLAresListener dummyLLAres("dummy_llares", respond_immediately);
dummyLLAres.listenTo(llaresPump);
@@ -251,7 +251,7 @@ namespace tut
DEBUG;
// Tests a successful login in with delayed responses.
// Also includes 'failure' that cause the login module
- // To re-attempt connection, once from a basic failure
+ // to re-attempt connection, once from a basic failure
// and once from the 'indeterminate' response.
set_test_name("LLLogin multiple srv uris w/ success");
@@ -464,6 +464,12 @@ namespace tut
LLSD frame_event;
mainloop.post(frame_event);
- ensure_equals("SRV Failure", listener.lastEvent()["change"].asString(), "fail.login");
+ // In this state we have NOT sent a reply from LLAresListener -- in
+ // fact there's no such object. Nonetheless, we expect the timeout to
+ // have stepped the login module forward to try to authenticate with
+ // the original URI.
+ ensure_equals("Auth state", listener.lastEvent()["change"].asString(), "authenticating");
+ ensure_equals("Attempt", listener.lastEvent()["data"]["attempt"].asInteger(), 1);
+ ensure_equals("URI", listener.lastEvent()["data"]["request"]["uri"].asString(), "login.bar.com");
}
}