summaryrefslogtreecommitdiff
path: root/indra/viewer_components/login/tests
diff options
context:
space:
mode:
authorMark Palange (Mani) <palange@lindenlab.com>2009-11-11 14:28:40 -0800
committerMark Palange (Mani) <palange@lindenlab.com>2009-11-11 14:28:40 -0800
commit51e3a486c6de28eb0a722edeee685192e9bde1b2 (patch)
tree0c89215a9cdf0ce88a030018fa8d3a4bd1ffe50c /indra/viewer_components/login/tests
parentb34b82f7fea702b7cb4309195314c45fd3d2e630 (diff)
Changes to fix an LLERRS caused by SRV request timeout.
Added settings to config SRV request params Increased timeout to 10 seconds Changed timeout to generate login failure event instead of an error. Added unit test to cover SRV failure event.
Diffstat (limited to 'indra/viewer_components/login/tests')
-rw-r--r--indra/viewer_components/login/tests/lllogin_test.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/indra/viewer_components/login/tests/lllogin_test.cpp b/indra/viewer_components/login/tests/lllogin_test.cpp
index a8ae2883d5..c3b1838422 100644
--- a/indra/viewer_components/login/tests/lllogin_test.cpp
+++ b/indra/viewer_components/login/tests/lllogin_test.cpp
@@ -47,6 +47,7 @@ public:
bool call(const LLSD& event)
{
mDebug(STRINGIZE("LoginListener called!: " << event));
+
mLastEvent = event;
return false;
}
@@ -414,4 +415,32 @@ namespace tut
ensure_equals("Failed to offline", listener.lastEvent()["state"].asString(), "offline");
}
+
+ template<> template<>
+ void llviewerlogin_object::test<5>()
+ {
+ DEBUG;
+ // Test SRV request timeout.
+ set_test_name("LLLogin SRV timeout testing");
+
+ // Testing normal login procedure.
+ LLEventStream llaresPump("LLAres"); // Dummy LLAres pump.
+
+ // LLAresListener dummyLLAres("dummy_llares");
+ // dummyLLAres.listenTo(llaresPump);
+
+ LLLogin login;
+ LoginListener listener("test_ear");
+ listener.listenTo(login.getEventPump());
+
+ LLSD credentials;
+ credentials["first"] = "these";
+ credentials["last"] = "don't";
+ credentials["passwd"] = "matter";
+ credentials["cfg_srv_timeout"] = 0.0f;
+
+ login.connect("login.bar.com", credentials);
+
+ ensure_equals("Failed to offline", listener.lastEvent()["change"].asString(), "srvrequest");
+ }
}