Convert one more unit test over to improved waiting scheme to avoid build failures.

Fri, 04 Oct 2013 18:24:59 -0400

author
Monty Brandenberg <monty@lindenlab.com>
date
Fri, 04 Oct 2013 18:24:59 -0400
changeset 40733
4558989b7313
parent 40732
17bbce4fb7bb
child 40734
12872e1718f4

Convert one more unit test over to improved waiting scheme to avoid build failures.

indra/llcorehttp/tests/test_httprequest.hpp file | annotate | diff | revisions
     1.1 --- a/indra/llcorehttp/tests/test_httprequest.hpp	Fri Oct 04 15:36:52 2013 -0400
     1.2 +++ b/indra/llcorehttp/tests/test_httprequest.hpp	Fri Oct 04 18:24:59 2013 -0400
     1.3 @@ -3241,11 +3241,11 @@
     1.4  
     1.5  		// Run the notification pump.
     1.6  		int count(0);
     1.7 -		int limit(300);				// One retry but several seconds needed
     1.8 +		int limit(LOOP_COUNT_LONG);
     1.9  		while (count++ < limit && mHandlerCalls < url_limit)
    1.10  		{
    1.11  			req->update(0);
    1.12 -			usleep(100000);
    1.13 +			usleep(LOOP_SLEEP_INTERVAL);
    1.14  		}
    1.15  		ensure("Request executed in reasonable time", count < limit);
    1.16  		ensure("One handler invocation for request", mHandlerCalls == url_limit);
    1.17 @@ -3258,21 +3258,21 @@
    1.18  	
    1.19  		// Run the notification pump again
    1.20  		count = 0;
    1.21 -		limit = 100;
    1.22 +		limit = LOOP_COUNT_LONG;
    1.23  		while (count++ < limit && mHandlerCalls < 1)
    1.24  		{
    1.25  			req->update(1000000);
    1.26 -			usleep(100000);
    1.27 +			usleep(LOOP_SLEEP_INTERVAL);
    1.28  		}
    1.29  		ensure("Second request executed in reasonable time", count < limit);
    1.30  		ensure("Second handler invocation", mHandlerCalls == 1);
    1.31  
    1.32  		// See that we actually shutdown the thread
    1.33  		count = 0;
    1.34 -		limit = 10;
    1.35 +		limit = LOOP_COUNT_SHORT;
    1.36  		while (count++ < limit && ! HttpService::isStopped())
    1.37  		{
    1.38 -			usleep(100000);
    1.39 +			usleep(LOOP_SLEEP_INTERVAL);
    1.40  		}
    1.41  		ensure("Thread actually stopped running", HttpService::isStopped());
    1.42  

mercurial