starting and stopping hsqldb from unit tests

后端 未结 6 781
清歌不尽
清歌不尽 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条回答
  •  礼貌的吻别
    2021-01-21 05:01

    I use the following configuration (directly inspired by the Hibernate tutorial) without any problem:

    
      
    
        
        
        
        
        
    
        
        1
    
        
        
    
        
        thread
    
        
        org.hibernate.cache.NoCacheProvider
    
        
        true
    
        
        
    
        
    
      
    
    

    When using an in-memory HSQLDB, there is no need to start anything explicitly. Just use the mem: protocol and the in-memory database will get started from JDBC.

    See also

    • Unit-Testing Hibernate With HSQLDB

提交回复
热议问题