diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2012-02-07 19:12:13 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2012-02-07 19:12:13 +0100 |
commit | 6f567b6f58819b8bbc6aeeddf780c4931f06315d (patch) | |
tree | 7e6a5f55e0827c3660fbf6d6d11213b73c6611dc | |
parent | ebb549a44bce98a13e9de1569bdcfad52d8ca3db (diff) | |
download | sonarqube-6f567b6f58819b8bbc6aeeddf780c4931f06315d.tar.gz sonarqube-6f567b6f58819b8bbc6aeeddf780c4931f06315d.zip |
SONAR-2754 change default value of sonar.dbcleaner.cleanDirectory
2 files changed, 4 insertions, 4 deletions
diff --git a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/DefaultPurgeTask.java b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/DefaultPurgeTask.java index 0027fcc3bf4..08a3c64ddec 100644 --- a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/DefaultPurgeTask.java +++ b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/DefaultPurgeTask.java @@ -37,7 +37,7 @@ import org.sonar.plugins.dbcleaner.period.DefaultPeriodCleaner; @Properties({ @Property( key = DbCleanerConstants.PROPERTY_CLEAN_DIRECTORY, - defaultValue = "false", + defaultValue = "true", name = "Clean history data of directories/packages") }) public class DefaultPurgeTask implements PurgeTask { diff --git a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/DefaultPurgeTaskTest.java b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/DefaultPurgeTaskTest.java index f40c61b5fb2..51dee76ba54 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/DefaultPurgeTaskTest.java +++ b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/DefaultPurgeTaskTest.java @@ -34,9 +34,10 @@ import static org.mockito.Mockito.*; public class DefaultPurgeTaskTest { @Test - public void shouldNotDeleteHistoricalDataOfDirectoriesByDefault() { + public void shouldNotDeleteHistoricalDataOfDirectories() { PurgeDao purgeDao = mock(PurgeDao.class); Settings settings = new Settings(new PropertyDefinitions(DefaultPurgeTask.class)); + settings.setProperty(DbCleanerConstants.PROPERTY_CLEAN_DIRECTORY, "false"); DefaultPurgeTask task = new DefaultPurgeTask(purgeDao, settings, mock(DefaultPeriodCleaner.class)); task.purgeProject(1L); @@ -45,10 +46,9 @@ public class DefaultPurgeTaskTest { } @Test - public void shouldDeleteHistoricalDataOfDirectories() { + public void shouldDeleteHistoricalDataOfDirectoriesByDefault() { PurgeDao purgeDao = mock(PurgeDao.class); Settings settings = new Settings(new PropertyDefinitions(DefaultPurgeTask.class)); - settings.setProperty(DbCleanerConstants.PROPERTY_CLEAN_DIRECTORY, "true"); DefaultPurgeTask task = new DefaultPurgeTask(purgeDao, settings, mock(DefaultPeriodCleaner.class)); task.purgeProject(1L); |