Hi Ron,

What JVM are you using where you are encountering this issue? The test
spawns 2000 threads but only about 10 should be running at any time.
However, on a slower machine than my development machine, maybe you
could get problems if the threads aren't completing before the next set
of 10 spawns. Can you edit the test and try increasing the
Thread.sleep(200) at the end until your system works? Or if you want,
you could change the test to use a set of thread pools. The idea is just
to have several threads all running at the same time, connecting to the
database with contention, and throwing SQLExceptions.

This test exists because this case was causing problems with the
Atomikos connection pool when running outside of a JTA transaction
manager until I made a change to the test query for the pool.

-- Seth


On 3/2/14, 11:24 PM, Ronald Roskens wrote:
> I’m having trouble running the unit tests for master right now. Everything is 
> running ok until it starts working on org.opennms.core.db and then I get an 
> OutOfMemory exception that fails the test run there. I’m using the default 
> maven opts.
>
> If I change the ConnectionFactoryTest so it only creates 200 threads instead 
> of 2000, the unit tests run through to completion for all projects.
>
> My VM has 10GB of memory, but I’m also running instances of jenkins, sonar, 
> and nexus in it so I don’t have too much extra memory to dedicate towards 
> these tests.
>
> Would making the unit test take a property for the number of threads be 
> acceptable or is there a better way of running that test?
>
> Ron
>
>
>
>
> ------------------------------------------------------------------------------
> Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
> With Perforce, you get hassle-free workflows. Merge that actually works. 
> Faster operations. Version large binaries.  Built-in WAN optimization and the
> freedom to use Git, Perforce or both. Make the move to Perforce.
> http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
> _______________________________________________
> Please read the OpenNMS Mailing List FAQ:
> http://www.opennms.org/index.php/Mailing_List_FAQ
>
> opennms-devel mailing list
>
> To *unsubscribe* or change your subscription options, see the bottom of this 
> page:
> https://lists.sourceforge.net/lists/listinfo/opennms-devel


------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ

opennms-devel mailing list

To *unsubscribe* or change your subscription options, see the bottom of this 
page:
https://lists.sourceforge.net/lists/listinfo/opennms-devel

Reply via email to