Ejemplo n.º 1
0
 public void test() throws SQLException {
   if (config.memory) {
     return;
   }
   deleteDb("logfile");
   int old = SysProperties.getLogFileDeleteDelay();
   System.setProperty(SysProperties.H2_LOG_DELETE_DELAY, "0");
   try {
     reconnect(0);
     insert();
     // data, index, log
     int maxFiles = 3;
     for (int i = 0; i < 3; i++) {
       long length = reconnect(maxFiles);
       insert();
       long l2 = reconnect(maxFiles);
       trace("length:" + length + " l2:" + l2);
       assertTrue(l2 <= length * 2);
     }
     conn.close();
   } finally {
     System.setProperty(SysProperties.H2_LOG_DELETE_DELAY, "" + old);
   }
   deleteDb("logfile");
 }