diff options
author | Jean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com> | 2014-01-24 08:56:36 +0100 |
---|---|---|
committer | Jean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com> | 2014-01-24 08:56:46 +0100 |
commit | e9fd017d7c253e0e9556d22b43b3c73974a1aab4 (patch) | |
tree | f7faa01ba5e902ec70aee53f1fd61c397e479656 /sonar-server | |
parent | 2b1f374217ecbc177d0cab4bb2adae7212ce10b1 (diff) | |
download | sonarqube-e9fd017d7c253e0e9556d22b43b3c73974a1aab4.tar.gz sonarqube-e9fd017d7c253e0e9556d22b43b3c73974a1aab4.zip |
SONAR-4326 Fix ES test cleanup
Diffstat (limited to 'sonar-server')
-rw-r--r-- | sonar-server/src/test/java/org/sonar/server/qualityprofile/ESActiveRuleTest.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sonar-server/src/test/java/org/sonar/server/qualityprofile/ESActiveRuleTest.java b/sonar-server/src/test/java/org/sonar/server/qualityprofile/ESActiveRuleTest.java index 999306d5e1c..55b6b5fd780 100644 --- a/sonar-server/src/test/java/org/sonar/server/qualityprofile/ESActiveRuleTest.java +++ b/sonar-server/src/test/java/org/sonar/server/qualityprofile/ESActiveRuleTest.java @@ -19,8 +19,6 @@ */ package org.sonar.server.qualityprofile; -import org.sonar.server.rule.RuleRegistry; - import com.github.tlrx.elasticsearch.test.EsSetup; import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.Multimap; @@ -29,6 +27,7 @@ import org.apache.ibatis.session.SqlSession; import org.elasticsearch.client.Requests; import org.elasticsearch.common.settings.ImmutableSettings; import org.elasticsearch.search.SearchHit; +import org.junit.After; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -43,6 +42,7 @@ import org.sonar.core.qualityprofile.db.ActiveRuleDto; import org.sonar.core.qualityprofile.db.ActiveRuleParamDto; import org.sonar.server.es.ESIndex; import org.sonar.server.es.ESNode; +import org.sonar.server.rule.RuleRegistry; import org.sonar.test.TestUtils; import java.io.IOException; @@ -103,6 +103,12 @@ public class ESActiveRuleTest { ); } + @After + public void tearDown() { + searchIndex.stop(); + esSetup.terminate(); + } + @Test public void should_register_mapping_at_startup() { assertThat(esSetup.exists("rules")).isTrue(); |