]> source.dussan.org Git - sonarqube.git/commitdiff
Attempt to speed-up db tests on non-H2
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Wed, 21 Jan 2015 17:03:57 +0000 (18:03 +0100)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Wed, 21 Jan 2015 17:03:57 +0000 (18:03 +0100)
Replace TRUNCATE requests by DELETE FROM

sonar-core/src/test/java/org/sonar/core/persistence/DatabaseCommands.java

index 52db5b3a811e7a9792805b51e080ed44b9bf66ab..a10d7cba64b329f4711bcd4d4b769098aeb4ba45 100644 (file)
@@ -64,7 +64,7 @@ public abstract class DatabaseCommands {
   abstract List<String> resetPrimaryKey(String table, int minSequenceValue);
 
   String getTruncateCommand(String table) {
-    return "TRUNCATE TABLE " + table;
+    return "DELETE FROM " + table;
   }
 
   public static DatabaseCommands forDialect(Dialect dialect) {