You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Dirk Verbeeck <di...@pandora.be> on 2004/05/01 15:05:52 UTC
Re: [dbcp][bug 28579] JUnit test
JUnit test committed.
Using spaces is preferred:
http://jakarta.apache.org/commons/patches.html
Cheers
Dirk
Wayne Woodfield wrote:
> This JUnit test will test the fix for bug 28579. It takes between 1-2
> seconds to complete on my computer. Even though it simulates a threading
> issue, it's very reliable. I haven't been able to get it to generate a false
> positive yet. If you commit this new test to CVS, please insert a line for
> this test into the org.apache.commons.dbcp.TestAll class. I haven't done so
> yet.
>
> By the way, I often use tab characters for indentation, and so I have done so
> with this file. If it is the jakarta or commons standard to use spaces for
> indentation, I'll use that convention from now on.
>
> Look it over -- if any questions or comments, let me know.
>
> Wayne Woodfield
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
Re: [dbcp][bug 28579] JUnit test
Posted by Dirk Verbeeck <di...@pandora.be>.
applied...
-- Dirk
Wayne Woodfield wrote:
> When I wrote this JUnit test, my fake PoolableObjectFactory simulated destroying an
> object by waiting 30ms. I did this to ensure that the threads waited right there,
> allowing other threads to run and cause errors. Well, it turns out that I didn't
> really need to wait for any time at all. I can get the same testing effect by just
> calling Thread.yield() instead of sleeping. And it makes the test run much faster.
>
> Also, since spaces are preferred, I removed a few lingering tabs as well. The
> attached patch implements these two things.
>
> Thanks!
> Wayne
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
Re: [dbcp][bug 28579] JUnit test
Posted by Wayne Woodfield <ja...@woodfieldfamily.org>.
When I wrote this JUnit test, my fake PoolableObjectFactory simulated destroying an
object by waiting 30ms. I did this to ensure that the threads waited right there,
allowing other threads to run and cause errors. Well, it turns out that I didn't
really need to wait for any time at all. I can get the same testing effect by just
calling Thread.yield() instead of sleeping. And it makes the test run much faster.
Also, since spaces are preferred, I removed a few lingering tabs as well. The
attached patch implements these two things.
Thanks!
Wayne
Dirk Verbeeck wrote:
> JUnit test committed.
>
> Using spaces is preferred:
> http://jakarta.apache.org/commons/patches.html