summaryrefslogtreecommitdiffstats
path: root/sonar-server
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-server')
-rw-r--r--sonar-server/src/main/java/org/sonar/server/db/migrations/v44/ChangeLogMigration.java2
-rw-r--r--sonar-server/src/main/java/org/sonar/server/qualityprofile/RuleActivator.java4
-rw-r--r--sonar-server/src/test/java/org/sonar/server/activity/ActivityBackendMediumTest.java6
-rw-r--r--sonar-server/src/test/java/org/sonar/server/activity/ActivityServiceMediumTest.java12
-rw-r--r--sonar-server/src/test/java/org/sonar/server/activity/db/ActivityDaoTest.java6
-rw-r--r--sonar-server/src/test/java/org/sonar/server/activity/ws/ActivitiesWebServiceMediumTest.java4
-rw-r--r--sonar-server/src/test/java/org/sonar/server/qualityprofile/ActiveRuleChangeMediumTest.java2
7 files changed, 18 insertions, 18 deletions
diff --git a/sonar-server/src/main/java/org/sonar/server/db/migrations/v44/ChangeLogMigration.java b/sonar-server/src/main/java/org/sonar/server/db/migrations/v44/ChangeLogMigration.java
index 777cfad509e..2e7f8eab6c9 100644
--- a/sonar-server/src/main/java/org/sonar/server/db/migrations/v44/ChangeLogMigration.java
+++ b/sonar-server/src/main/java/org/sonar/server/db/migrations/v44/ChangeLogMigration.java
@@ -211,7 +211,7 @@ public class ChangeLogMigration implements DatabaseMigration {
private void saveActiveRuleChange(ActiveRuleChange ruleChange, String author, Date currentTimeStamp) {
ActivityDto activity = ActivityDto.createFor(ruleChange);
- activity.setType(Activity.Type.ACTIVE_RULE);
+ activity.setType(Activity.Type.QPROFILE);
activity.setAuthor(author);
activity.setCreatedAt(currentTimeStamp);
dao.insert(session, activity);
diff --git a/sonar-server/src/main/java/org/sonar/server/qualityprofile/RuleActivator.java b/sonar-server/src/main/java/org/sonar/server/qualityprofile/RuleActivator.java
index 318ed039670..37bdf34355a 100644
--- a/sonar-server/src/main/java/org/sonar/server/qualityprofile/RuleActivator.java
+++ b/sonar-server/src/main/java/org/sonar/server/qualityprofile/RuleActivator.java
@@ -144,7 +144,7 @@ public class RuleActivator implements ServerComponent {
}
if (!changes.isEmpty()) {
- log.write(dbSession, Activity.Type.ACTIVE_RULE, changes);
+ log.write(dbSession, Activity.Type.QPROFILE, changes);
previewCache.reportGlobalModification();
}
return changes;
@@ -305,7 +305,7 @@ public class RuleActivator implements ServerComponent {
}
if (!changes.isEmpty()) {
- log.write(dbSession, Activity.Type.ACTIVE_RULE, changes);
+ log.write(dbSession, Activity.Type.QPROFILE, changes);
previewCache.reportGlobalModification();
}
diff --git a/sonar-server/src/test/java/org/sonar/server/activity/ActivityBackendMediumTest.java b/sonar-server/src/test/java/org/sonar/server/activity/ActivityBackendMediumTest.java
index 237669d09e9..df489a132ed 100644
--- a/sonar-server/src/test/java/org/sonar/server/activity/ActivityBackendMediumTest.java
+++ b/sonar-server/src/test/java/org/sonar/server/activity/ActivityBackendMediumTest.java
@@ -67,7 +67,7 @@ public class ActivityBackendMediumTest {
@Test
public void insert_find_text_log() throws InterruptedException {
final String testValue = "hello world";
- service.write(dbSession, Activity.Type.ACTIVE_RULE, testValue);
+ service.write(dbSession, Activity.Type.QPROFILE, testValue);
dbSession.commit();
assertThat(index.findAll().getTotal()).isEqualTo(1);
@@ -80,7 +80,7 @@ public class ActivityBackendMediumTest {
public void insert_find_loggable_log() {
final String testKey = "message";
final String testValue = "hello world";
- service.write(dbSession, Activity.Type.ACTIVE_RULE, new ActivityLog() {
+ service.write(dbSession, Activity.Type.QPROFILE, new ActivityLog() {
@Override
public Map<String, String> getDetails() {
@@ -109,7 +109,7 @@ public class ActivityBackendMediumTest {
int max = 200;
final String testValue = "hello world";
for (int i = 0; i < max; i++) {
- service.write(dbSession, Activity.Type.ACTIVE_RULE, testValue + "_" + i);
+ service.write(dbSession, Activity.Type.QPROFILE, testValue + "_" + i);
}
dbSession.commit();
diff --git a/sonar-server/src/test/java/org/sonar/server/activity/ActivityServiceMediumTest.java b/sonar-server/src/test/java/org/sonar/server/activity/ActivityServiceMediumTest.java
index 664e25315c7..ffb530adf45 100644
--- a/sonar-server/src/test/java/org/sonar/server/activity/ActivityServiceMediumTest.java
+++ b/sonar-server/src/test/java/org/sonar/server/activity/ActivityServiceMediumTest.java
@@ -70,7 +70,7 @@ public class ActivityServiceMediumTest {
@Test
public void find_all() throws InterruptedException {
- service.write(dbSession, Activity.Type.ACTIVE_RULE, testValue);
+ service.write(dbSession, Activity.Type.QPROFILE, testValue);
dbSession.commit();
assertThat(index.findAll().getTotal()).isEqualTo(1);
@@ -81,7 +81,7 @@ public class ActivityServiceMediumTest {
@Test
public void search_message_log() throws InterruptedException {
- service.write(dbSession, Activity.Type.ACTIVE_RULE, testValue);
+ service.write(dbSession, Activity.Type.QPROFILE, testValue);
dbSession.commit();
assertThat(index.findAll().getTotal()).isEqualTo(1);
@@ -94,7 +94,7 @@ public class ActivityServiceMediumTest {
@Test
public void search_activity_log() throws InterruptedException {
- service.write(dbSession, Activity.Type.ACTIVE_RULE, getActivity());
+ service.write(dbSession, Activity.Type.QPROFILE, getActivity());
dbSession.commit();
assertThat(index.findAll().getTotal()).isEqualTo(1);
@@ -109,7 +109,7 @@ public class ActivityServiceMediumTest {
service.write(dbSession, Activity.Type.NONE, getActivity());
service.write(dbSession, Activity.Type.SERVER, getActivity());
service.write(dbSession, Activity.Type.SERVER, testValue);
- service.write(dbSession, Activity.Type.ACTIVE_RULE, getActivity());
+ service.write(dbSession, Activity.Type.QPROFILE, getActivity());
dbSession.commit();
assertThat(service.search(new ActivityQuery(),
@@ -120,7 +120,7 @@ public class ActivityServiceMediumTest {
new QueryOptions()).getHits()).hasSize(2);
assertThat(service.search(new ActivityQuery()
- .setTypes(ImmutableSet.of(Activity.Type.ACTIVE_RULE)),
+ .setTypes(ImmutableSet.of(Activity.Type.QPROFILE)),
new QueryOptions()).getHits()).hasSize(1);
}
@@ -168,7 +168,7 @@ public class ActivityServiceMediumTest {
int max = QueryOptions.DEFAULT_LIMIT + 3;
final String testValue = "hello world";
for (int i = 0; i < max; i++) {
- service.write(dbSession, Activity.Type.ACTIVE_RULE, testValue + "_" + i);
+ service.write(dbSession, Activity.Type.QPROFILE, testValue + "_" + i);
}
dbSession.commit();
diff --git a/sonar-server/src/test/java/org/sonar/server/activity/db/ActivityDaoTest.java b/sonar-server/src/test/java/org/sonar/server/activity/db/ActivityDaoTest.java
index bda18de33c0..57b371a3ea9 100644
--- a/sonar-server/src/test/java/org/sonar/server/activity/db/ActivityDaoTest.java
+++ b/sonar-server/src/test/java/org/sonar/server/activity/db/ActivityDaoTest.java
@@ -71,7 +71,7 @@ public class ActivityDaoTest extends AbstractDaoTestCase {
public void fail_insert_missing_author() {
String testValue = "hello world";
ActivityDto log = ActivityDto.createFor(testValue)
- .setType(Activity.Type.ACTIVE_RULE);
+ .setType(Activity.Type.QPROFILE);
try {
dao.insert(session, log);
} catch (IllegalArgumentException e) {
@@ -83,7 +83,7 @@ public class ActivityDaoTest extends AbstractDaoTestCase {
public void insert_text_log() {
String testValue = "hello world";
ActivityDto log = ActivityDto.createFor(testValue)
- .setType(Activity.Type.ACTIVE_RULE)
+ .setType(Activity.Type.QPROFILE)
.setAuthor("jUnit");
dao.insert(session, log);
@@ -110,7 +110,7 @@ public class ActivityDaoTest extends AbstractDaoTestCase {
}
})
.setAuthor("jUnit")
- .setType(Activity.Type.ACTIVE_RULE);
+ .setType(Activity.Type.QPROFILE);
dao.insert(session, log);
diff --git a/sonar-server/src/test/java/org/sonar/server/activity/ws/ActivitiesWebServiceMediumTest.java b/sonar-server/src/test/java/org/sonar/server/activity/ws/ActivitiesWebServiceMediumTest.java
index 20c255c416c..ef5886c417f 100644
--- a/sonar-server/src/test/java/org/sonar/server/activity/ws/ActivitiesWebServiceMediumTest.java
+++ b/sonar-server/src/test/java/org/sonar/server/activity/ws/ActivitiesWebServiceMediumTest.java
@@ -26,8 +26,8 @@ import org.junit.Test;
import org.sonar.api.server.ws.WebService;
import org.sonar.core.activity.Activity;
import org.sonar.core.persistence.DbSession;
-import org.sonar.server.db.DbClient;
import org.sonar.server.activity.ActivityService;
+import org.sonar.server.db.DbClient;
import org.sonar.server.tester.ServerTester;
import org.sonar.server.user.MockUserSession;
import org.sonar.server.ws.WsTester;
@@ -71,7 +71,7 @@ public class ActivitiesWebServiceMediumTest {
@Test
public void search_logs() throws Exception {
- service.write(session, Activity.Type.ACTIVE_RULE, "Hello World");
+ service.write(session, Activity.Type.QPROFILE, "Hello World");
session.commit();
MockUserSession.set();
diff --git a/sonar-server/src/test/java/org/sonar/server/qualityprofile/ActiveRuleChangeMediumTest.java b/sonar-server/src/test/java/org/sonar/server/qualityprofile/ActiveRuleChangeMediumTest.java
index 7841c00437a..7480058bb77 100644
--- a/sonar-server/src/test/java/org/sonar/server/qualityprofile/ActiveRuleChangeMediumTest.java
+++ b/sonar-server/src/test/java/org/sonar/server/qualityprofile/ActiveRuleChangeMediumTest.java
@@ -70,7 +70,7 @@ public class ActiveRuleChangeMediumTest {
.setSeverity("BLOCKER")
.setParameter("param1", "value1");
- service.write(dbSession, Activity.Type.ACTIVE_RULE, change);
+ service.write(dbSession, Activity.Type.QPROFILE, change);
dbSession.commit();
// 0. AssertBase case