This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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.