Hi Nikolas,

 

I must admit that the code was not really a unit test but a command line
programming that needed to access my Stripersist DAO classes. I was kind of
abusing the stripes mock classes so that I got access to Stripersist from a
command line context (I did not find any other way to start Stripersist from
the command line). 

 

After I recoded the program to use native JPA
(EntityManager/EntityMangerFactor) everything worked fine. As the
Stripersist code is fairly small and does seem to include code that can
timeout, I assume the problem came from the MockServletContext. Anyway I
dropped the whole Stripersist AP and replaced it for Google Guice
persistence injection. It gives me more flexibility in how I use my DAO
classes.

 

Thanks anyway. 

 

 

From: Nikolaos Giannopoulos [mailto:nikol...@brightminds.org] 
Sent: Tuesday, 01 March, 2011 14:35
To: Stripes Users List
Subject: Re: [Stripes-users] Stripersist fails in long running JUnit test

 

Karen,

I haven't seen this but then again our tests run under 60 seconds.

Moreover, do you have a stack trace?  Because if you did the Stripersist
code is quite compact and might offer clues as to what is happening.

Also are you accessing your DB in these tests via connection pooling?  If
so, perhaps there is something in there that gets reset after 90 seconds.

HTH,

--Nikolaos



Karen wrote: 

Hi everybody,

 

I have a few JUnit test that use
net.sourceforge.stripes.mock.MockServletContext to test some persistent
classes that use Stripersist, but when the unit test runs long then after
about 90 seconds, the Hibernate EntityManagerFactory gets terminated
(without any clear reason in the log that explains why).

 

Anybody has experienced the same issue?

 

  _____  

 
----------------------------------------------------------------------------
--
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT
data 
generated by your applications, servers and devices whether physical,
virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
 

  _____  

 
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users
  
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to