commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: [pool] 1.x and TestGenericObjectPoolClassLoaders
Date Fri, 17 May 2013 13:03:53 GMT
On 17/05/2013 13:51, Gary Gregory wrote:
> On Thu, May 16, 2013 at 6:30 PM, Mark Thomas <markt@apache.org> wrote:
> 
>> On 16/05/2013 20:58, Gary Gregory wrote:
>>> TestGenericObjectPoolClassLoaders (1)
>>> org.apache.commons.pool.impl.TestGenericObjectPoolClassLoaders
>>>
>> testContextClassLoader(org.apache.commons.pool.impl.TestGenericObjectPoolClassLoaders)
>>> junit.framework.AssertionFailedError: Wrong number of idle objects in
>> pool1
>>> expected:<1> but was:<0>
>>
>> <snip/>
>>
>>>     at
>> org.apache.commons.pool.impl.TestGenericObjectPoolClassLoaders.testContextClassLoader(TestGenericObjectPoolClassLoaders.java:46)
>>
>> <snip/>
>>
>> Looking at line 46 of the test, it is possible that it could fail
>> depending on the execution timing. Maybe try increasing the Thread.sleep()
>> ?
>>
> 
> I am glad it works on your end.
> 
> It fails no matter what I change the numbers to, for example:

OK. That makes a timing issue unlikely.

> 
>             pool1.setTimeBetweenEvictionRunsMillis(20);
>             Thread.sleep(5000);
> 
> or:
> 
>             pool1.setTimeBetweenEvictionRunsMillis(1000);
>             Thread.sleep(5000);
> 
> arg :(
> 
> I makes it hard to cut an RC!

Indeed.

I'd suggest it is time to step through that test case with the debugger
in Eclipse and figure out why the object isn't being created.

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message