starting and stopping hsqldb from unit tests

后端 未结 6 850
清歌不尽
清歌不尽 2021-01-21 04:07

I\'m trying to create integration tests using hsqldb in an in memory mode. At the moment, I have to start the hsqldb server from the command line before running the unit tests.

6条回答
  •  Happy的楠姐
    2021-01-21 04:58

    Maybe this might help to start HSQL in server mode in a Unit test, but in the same JVM. Sample code runs org.hsqldb.server.WebServer (i.e. port 80) but you may use org.hsqldb.server.Server. You may call setPort on either to override default port.

    https://stackoverflow.com/a/37784679/15789

提交回复
热议问题