Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Could not get a good connection to the database ?

 
Peter Primrose
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,

when I run *all* my test (~100) I receive the trace bellow. but when I run them one by one, they are all green.

what does it mean: Could not get a good connection to the database, and how can I avoid it

thank you


[ April 11, 2007: Message edited by: Bear Bibeault ]
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34422
347
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Peter,
Some databases throw exceptions if you ask for a lot of connections and don't close them all (something that happens more often in test code.) Some take time to close the connection causing the resource to appear unavailable even if you are properly closing the connection. Since the integration tests run so quickly, this is a stress on the resources.

We hit this with Oracle and switched our test code to use a connection pool data source. The code under test was fine because it was already using connection pooling.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic