Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connect to in memory Hsql (hypersonic) database with DatabaseManager while debugging tests

I would like to connect to an in-memory HSQL database instance using the hsql DatabaseManager (or the swing version, it doesn't matter) while debugging tests in my IDE (Intellij IDEA 11.1.2).

I have tried as was suggested by this answer, but every time I do so the DatabaseManager process/thread (I don't know which) starts and freezes once the debug breakpoint is hit. If kill/force quit it, the debug session also dies.

How can I do this without the DatabaseManager freezing?

like image 333
Paul D. Eden Avatar asked Dec 06 '22 13:12

Paul D. Eden


1 Answers

Your Spring/JUnit is starting the database in in-process mode.

Your options would be:

  1. Either starting hsqldb in server mode
  2. Or starting the DBmanager from your application
  3. Or make your breakpoint stop only the current thread, then your databasemanager will not freeze
like image 50
Eugenio Cuevas Avatar answered Dec 09 '22 03:12

Eugenio Cuevas