Hive Metastore uses the 'HikariCP' database connection pool. The default number of connections to the database is 10. For the Qtests, connecting to a local DerbyDB, there need not be more than 4 connections. Anymore simply adds undo overhead and by looking at the QTest logs, I see a bunch of 'connection refused' from HikariCP. It may be the case that the standalone DB does not support that many concurrent connections anyway.
I also unified all of the JDBC connection strings to ensure that each test is using an in-memory database.