]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5007 - Implicit Commit when deleting nestedDto (Simplifies ES)
authorStephane Gamard <stephane.gamard@searchbox.com>
Fri, 13 Jun 2014 14:37:34 +0000 (16:37 +0200)
committerStephane Gamard <stephane.gamard@searchbox.com>
Fri, 13 Jun 2014 14:37:34 +0000 (16:37 +0200)
sonar-server/src/main/java/org/sonar/server/db/BaseDao.java
sonar-server/src/test/java/org/sonar/server/rule/RegisterRulesMediumTest.java

index 155214d5cc05195dbf06ba66568edb4e61113600..a1e7ea9c0cfe7f05ddb445fbae9ae2b3f9d3df40 100644 (file)
@@ -262,6 +262,7 @@ public abstract class BaseDao<M, E extends Dto<K>, K extends Serializable> imple
     if (hasIndex()) {
       session.enqueue(new EmbeddedIndexAction<K>(
         this.getIndexType(), IndexAction.Method.DELETE, key, nestedItem));
+      session.commit();
     }
   }
 
index 2cd88d6d386fde56fc9e8539341e6bfe2369a232..1ef6b2688244a8f73dc96811fbf34fef01ceed71 100644 (file)
 package org.sonar.server.rule;
 
 import com.google.common.collect.ImmutableMap;
-import org.junit.*;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.ClassRule;
+import org.junit.Test;
 import org.sonar.api.rule.RuleKey;
 import org.sonar.api.rule.RuleStatus;
 import org.sonar.api.rule.Severity;
@@ -250,7 +253,6 @@ public class RegisterRulesMediumTest {
   }
 
   @Test
-  @Ignore("Should be fixed by @steph")
   public void not_update_custom_rule_params_from_template() throws Exception {
     RuleIndex index = tester.get(RuleIndex.class);
     Rule templateRule = index.getByKey(RuleKey.of("xoo", "template1"));