A big bug has been squashed and I'm pleased to have found it.
JDBC has the concept of a Connection and a Statement. DBvolution has the concept of a statement and adds concepts for a database and a transaction, but nothing like a Connection.
This is because the difficulty of maintaining a connection while worrying about multiple threads wasn't worth it. However that meant Connection has been quietly ignored.
Additionally until recently most of the testing and production work of DBV happened on databases that provided no monitoring tools. Adding MySQL to the regular testing has changed that. And MySQL has driven a lot of work recently. While idly watching the tests flow through MySQL's connection monitor, and marvelling at the thousands of connections happening, I realised that my concept of the product and the tests didn't fit with what I was seeing.
Because the tests use the same database and, as much as possible, the same tables and data, the tests are necessarily single-threaded. So there might be a lot of tests going on but there should only be one SQL statement. One statement and one connection. So there shouldn't be thousands of connections in the monitor.
I've checked since, and testing quite happily makes 14,346 connections in 1 minute 24 seconds.
All the connections go away eventually but that was because the JVM quit and cleaned up. In a production environment, there would be a serious lack of connections in minutes.
Obviously the answer was to limit the number of connections that could be made.
Except it wasn't. That just led to testing not finishing and lots of computer crashes :(
Eventually I worked out that I was making the boneheaded mistake of not closing connections. That realisation led me to merge connections and statements properly, add an appropriate call to connection.close(), and even fix up all the stray references to statements that didn't close properly.
Now DBvolution testing uses exactly 1 connection. From 14,346 to 1 in a weekend. That's a pretty good diet.
Unless you use H2 when it will use exactly 2, but I'm sure it'll be fine.
A big bug, a big result, and a very important step towards version 1.0 :)
Anonymous
If anyone asks you "does it scale?" just mention that testing creates 14,000 connections in a minute and a half. They'll suddenly become worried that their database isn't good enough.