The test looks a little off to me. I am not sure I fully understand
what it is trying to do, but I suspect that the reason that it fails
sporadically (I have seen this myself) is that to succeed it needs to
run two evictor cycles when it is set to wait for only one. I may be
wrong as I don't fully follow the intent or logic of the test.
Looks to me like what it is trying to do is:
1. Create and force initialization of a BDS with initialsize = 10,
minIdle = 5, maxIdle = 10, numTestsPerEvictionRun = 3,
timeBetweenEvictionRuns = 1000, minEvictableIdleTime = 100
2. Execute a loop whose guard I don't understand that appears to wait
for an eviction cycle to complete, waiting at least 1 second between
iterations
3. Expect to see no more than 5 idle connections.
I don't understand the search for eviction threads in the guard in 2.
Just waiting would work if what we are trying to do is to verify that
old connections are being evicted (basically duplicating tests in
[pool]). In any case, in order to get down to 5, you need to run 2
cycles, because each only visits 3. It would seem to me that to make it
succeed consistently, you need to either increase numTestsPerEvictionRun
to 5 or have it wait for two cycles.
Phil
On 7/5/20 6:04 AM, Gary Gregory wrote:
This must be some timing issue as the test passed on GitHub and Travis,
but, I do see one failure for that on Java 11 on GitHub.
I am guessing the test might need to be set up differently.
Gary
On Fri, Jul 3, 2020, 14:35 Robert Paschek <robert.pasc...@comm-unity.at>
wrote:
Hello,
when I'm running mvn clean test on the current master branch, testEvict
always fails with the same error.
[ERROR] Failures:
[ERROR] TestAbandonedBasicDataSource>TestBasicDataSource.testEvict:946
EvictionTimer thread was destroyed with numIdle=7(expected: less or equal
than 5)
[ERROR] TestBasicDataSource.testEvict:946 EvictionTimer thread was
destroyed with numIdle=7(expected: less or equal than 5)
[ERROR] TestBasicManagedDataSource>TestBasicDataSource.testEvict:946
EvictionTimer thread was destroyed with numIdle=7(expected: less or equal
than 5)
[ERROR]
TestDataSourceXAConnectionFactory>TestBasicDataSource.testEvict:946
EvictionTimer thread was destroyed with numIdle=7(expected: less or equal
than 5)
Is there something wrong with my setup? I'm using Maven 3.6.3 with
AdoptOpenJDK 8.0.252.
Thanks for help.
Regards,
Robert
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org