From adc975ff91ab89ebb3f0035110964e9aaea308b4 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 9 Dec 2009 10:20:08 -0500 Subject: Reduce likelihood of indefinite wait in viewer integration tests. Introduce LLStartupListener to allow viewerclient-based test script to query startup state. This handles the scenario in which, by the time the test script manages to connect, the viewer already IS in STATE_STARTED. Fix ViewerSession to invoke that query before waiting for STATE_STARTED. Make that wait time out eventually to deal with "System currently logging you off, please wait 5 minutes." Timeout raises new ViewerWontLogin exception. Fix testlangs to catch ViewerWontLogin and retry a limited number of times. --- indra/newview/llstartup.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'indra/newview/llstartup.cpp') diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 58df2ffb19..12ae12d4ae 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -193,6 +193,7 @@ #include "lllogin.h" #include "llevents.h" +#include "llstartuplistener.h" #if LL_WINDOWS #include "llwindebug.h" @@ -241,7 +242,8 @@ static std::string gFirstSimSeedCap; static LLVector3 gAgentStartLookAt(1.0f, 0.f, 0.f); static std::string gAgentStartLocation = "safe"; -static LLEventStream sStartupStateWatcher("StartupState"); +boost::scoped_ptr LLStartUp::sStateWatcher(new LLEventStream("StartupState")); +boost::scoped_ptr LLStartUp::sListener(new LLStartupListener()); // // local function declaration @@ -2725,10 +2727,15 @@ void LLStartUp::setStartupState( EStartupState state ) getStartupStateString() << " to " << startupStateToString(state) << LL_ENDL; gStartupState = state; + postStartupState(); +} + +void LLStartUp::postStartupState() +{ LLSD stateInfo; stateInfo["str"] = getStartupStateString(); - stateInfo["enum"] = state; - sStartupStateWatcher.post(stateInfo); + stateInfo["enum"] = gStartupState; + sStateWatcher->post(stateInfo); } -- cgit v1.2.3 From 9f68163179cda136a696f8e2d4d6b39fbf588bdb Mon Sep 17 00:00:00 2001 From: "Mark Palange (Mani)" Date: Wed, 9 Dec 2009 16:38:37 -0800 Subject: EXT-2896 Fixed poor handling of login error. Added more cleanup to the reset_login call. Added new settings to control UseCircuitCode message timeouts to allow testing of this failure. Reviewed by Richard --- indra/newview/llstartup.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'indra/newview/llstartup.cpp') diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index be0c92a76d..697a530d33 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -367,8 +367,6 @@ bool idle_startup() LLMemType mt1(LLMemType::MTYPE_STARTUP); const F32 PRECACHING_DELAY = gSavedSettings.getF32("PrecachingDelay"); - const F32 TIMEOUT_SECONDS = 5.f; - const S32 MAX_TIMEOUT_COUNT = 3; static LLTimer timeout; static S32 timeout_count = 0; @@ -1436,9 +1434,9 @@ bool idle_startup() msg->addUUIDFast(_PREHASH_ID, gAgent.getID()); msg->sendReliable( gFirstSim, - MAX_TIMEOUT_COUNT, + gSavedSettings.getS32("UseCircuitCodeMaxRetries"), FALSE, - TIMEOUT_SECONDS, + gSavedSettings.getF32("UseCircuitCodeTimeout"), use_circuit_callback, NULL); @@ -2734,6 +2732,9 @@ void LLStartUp::setStartupState( EStartupState state ) void reset_login() { + gAgent.cleanup(); + LLWorld::getInstance()->destroyClass(); + LLStartUp::setStartupState( STATE_LOGIN_SHOW ); if ( gViewerWindow ) -- cgit v1.2.3