posted 19 years ago
If it is unit tests it is advisable to avoid making db connections, and to hard code expected data within unit test
If it is integration/system testing, making database connections is valid. But to answer your question, I dont think JUnit as such provides any specific connection reuse mechanism
You would resort to using Connection Pool, but since performance is not a consideration while testing, you can get a new connection everytime to simplify your test logic
Padma