diff options
Diffstat (limited to 'sonar-db')
58 files changed, 55 insertions, 174 deletions
diff --git a/sonar-db/pom.xml b/sonar-db/pom.xml index 9cb8dc2b64c..06406d3470f 100644 --- a/sonar-db/pom.xml +++ b/sonar-db/pom.xml @@ -200,9 +200,6 @@ <name>with-db-drivers</name> </property> </activation> - <properties> - <junitGroups>org.sonar.test.DbTests</junitGroups> - </properties> <dependencies> <dependency> <groupId>mysql</groupId> diff --git a/sonar-db/src/test/java/org/sonar/core/user/DeprecatedUserFinderTest.java b/sonar-db/src/test/java/org/sonar/core/user/DeprecatedUserFinderTest.java index 39af3583edc..427b0473118 100644 --- a/sonar-db/src/test/java/org/sonar/core/user/DeprecatedUserFinderTest.java +++ b/sonar-db/src/test/java/org/sonar/core/user/DeprecatedUserFinderTest.java @@ -22,19 +22,17 @@ package org.sonar.core.user; import org.junit.Before; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.sonar.api.database.model.User; import org.sonar.api.utils.System2; import org.sonar.db.DbTester; import org.sonar.db.user.UserDao; -import org.sonar.test.DbTests; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.nullValue; import static org.junit.Assert.assertThat; import static org.mockito.Mockito.mock; -@Category(DbTests.class) + public class DeprecatedUserFinderTest { @Rule diff --git a/sonar-db/src/test/java/org/sonar/db/DatabaseUtilsTest.java b/sonar-db/src/test/java/org/sonar/db/DatabaseUtilsTest.java index 31c928808f1..b529c18ebd6 100644 --- a/sonar-db/src/test/java/org/sonar/db/DatabaseUtilsTest.java +++ b/sonar-db/src/test/java/org/sonar/db/DatabaseUtilsTest.java @@ -33,14 +33,12 @@ import java.util.Objects; import javax.annotation.Nullable; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.junit.rules.ExpectedException; import org.sonar.api.utils.System2; import org.sonar.api.utils.log.LogTester; import org.sonar.api.utils.log.LoggerLevel; import org.sonar.api.utils.log.Loggers; import org.sonar.db.dialect.Oracle; -import org.sonar.test.DbTests; import static com.google.common.collect.Lists.newArrayList; import static java.util.Arrays.asList; @@ -55,7 +53,7 @@ import static org.sonar.db.WildcardPosition.AFTER; import static org.sonar.db.WildcardPosition.BEFORE; import static org.sonar.db.WildcardPosition.BEFORE_AND_AFTER; -@Category(DbTests.class) + public class DatabaseUtilsTest { @Rule diff --git a/sonar-db/src/test/java/org/sonar/db/IsAliveMapperTest.java b/sonar-db/src/test/java/org/sonar/db/IsAliveMapperTest.java index 34e7b76c17c..50a893e9d06 100644 --- a/sonar-db/src/test/java/org/sonar/db/IsAliveMapperTest.java +++ b/sonar-db/src/test/java/org/sonar/db/IsAliveMapperTest.java @@ -23,13 +23,11 @@ import org.junit.After; import org.junit.Before; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.sonar.api.utils.System2; -import org.sonar.test.DbTests; import static org.assertj.core.api.Assertions.assertThat; -@Category(DbTests.class) + public class IsAliveMapperTest { @Rule diff --git a/sonar-db/src/test/java/org/sonar/db/ResultSetIteratorTest.java b/sonar-db/src/test/java/org/sonar/db/ResultSetIteratorTest.java index da9e6a5797f..3124f158fad 100644 --- a/sonar-db/src/test/java/org/sonar/db/ResultSetIteratorTest.java +++ b/sonar-db/src/test/java/org/sonar/db/ResultSetIteratorTest.java @@ -26,14 +26,12 @@ import java.sql.SQLException; import java.util.NoSuchElementException; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.sonar.api.utils.System2; -import org.sonar.test.DbTests; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.fail; -@Category(DbTests.class) + public class ResultSetIteratorTest { @Rule diff --git a/sonar-db/src/test/java/org/sonar/db/activity/ActivityDaoTest.java b/sonar-db/src/test/java/org/sonar/db/activity/ActivityDaoTest.java index 752336c0b8e..d43fb92738f 100644 --- a/sonar-db/src/test/java/org/sonar/db/activity/ActivityDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/activity/ActivityDaoTest.java @@ -22,16 +22,14 @@ package org.sonar.db.activity; import java.util.Map; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.sonar.api.utils.System2; import org.sonar.db.DbTester; -import org.sonar.test.DbTests; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -@Category(DbTests.class) + public class ActivityDaoTest { System2 system = mock(System2.class); diff --git a/sonar-db/src/test/java/org/sonar/db/ce/CeActivityDaoTest.java b/sonar-db/src/test/java/org/sonar/db/ce/CeActivityDaoTest.java index 05ab62daee3..8b2b03adde9 100644 --- a/sonar-db/src/test/java/org/sonar/db/ce/CeActivityDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/ce/CeActivityDaoTest.java @@ -24,16 +24,14 @@ import java.util.Collections; import java.util.List; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.sonar.api.utils.internal.TestSystem2; import org.sonar.db.DbTester; -import org.sonar.test.DbTests; import static java.util.Collections.singletonList; import static org.assertj.core.api.Assertions.assertThat; import static org.sonar.db.ce.CeTaskTypes.REPORT; -@Category(DbTests.class) + public class CeActivityDaoTest { TestSystem2 system2 = new TestSystem2().setNow(1_450_000_000_000L); diff --git a/sonar-db/src/test/java/org/sonar/db/ce/CeQueueDaoTest.java b/sonar-db/src/test/java/org/sonar/db/ce/CeQueueDaoTest.java index 471c0a29944..9cefc290f36 100644 --- a/sonar-db/src/test/java/org/sonar/db/ce/CeQueueDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/ce/CeQueueDaoTest.java @@ -24,19 +24,17 @@ import java.util.Collections; import java.util.List; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.sonar.api.utils.Paging; import org.sonar.api.utils.System2; import org.sonar.api.utils.internal.TestSystem2; import org.sonar.db.DbTester; -import org.sonar.test.DbTests; import static com.google.common.collect.Lists.newArrayList; import static java.util.Collections.singletonList; import static org.assertj.core.api.Assertions.assertThat; import static org.sonar.db.ce.CeQueueTesting.newCeQueueDto; -@Category(DbTests.class) + public class CeQueueDaoTest { System2 system2 = new TestSystem2().setNow(1_450_000_000_000L); diff --git a/sonar-db/src/test/java/org/sonar/db/component/ComponentDaoTest.java b/sonar-db/src/test/java/org/sonar/db/component/ComponentDaoTest.java index dd5c13782ca..edbb597dc98 100644 --- a/sonar-db/src/test/java/org/sonar/db/component/ComponentDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/component/ComponentDaoTest.java @@ -24,7 +24,6 @@ import java.util.Collections; import java.util.List; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.junit.rules.ExpectedException; import org.sonar.api.resources.Qualifiers; import org.sonar.api.utils.DateUtils; @@ -32,7 +31,6 @@ import org.sonar.api.utils.System2; import org.sonar.db.DbSession; import org.sonar.db.DbTester; import org.sonar.db.RowNotFoundException; -import org.sonar.test.DbTests; import static com.google.common.collect.Lists.newArrayList; import static com.google.common.collect.Sets.newHashSet; @@ -48,7 +46,7 @@ import static org.sonar.db.component.ComponentTesting.newProjectDto; import static org.sonar.db.component.ComponentTesting.newSubView; import static org.sonar.db.component.ComponentTesting.newView; -@Category(DbTests.class) + public class ComponentDaoTest { @Rule diff --git a/sonar-db/src/test/java/org/sonar/db/component/ComponentDaoWithDuplicatedKeysTest.java b/sonar-db/src/test/java/org/sonar/db/component/ComponentDaoWithDuplicatedKeysTest.java index 122c108ed03..6adf642245d 100644 --- a/sonar-db/src/test/java/org/sonar/db/component/ComponentDaoWithDuplicatedKeysTest.java +++ b/sonar-db/src/test/java/org/sonar/db/component/ComponentDaoWithDuplicatedKeysTest.java @@ -21,12 +21,10 @@ package org.sonar.db.component; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.sonar.api.utils.System2; import org.sonar.db.DbClient; import org.sonar.db.DbSession; import org.sonar.db.DbTester; -import org.sonar.test.DbTests; import static org.assertj.core.api.Assertions.assertThat; import static org.sonar.db.component.ComponentTesting.newProjectDto; @@ -34,7 +32,7 @@ import static org.sonar.db.component.ComponentTesting.newProjectDto; /** * On H2, the index on PROJECTS.KEE is unique. In order to simulate the MySQL behaviour where the index is not unique, we need to create a schema where there's no unique index on PROJECTS.KEE */ -@Category(DbTests.class) + public class ComponentDaoWithDuplicatedKeysTest { static final String PROJECT_KEY = "PROJECT_KEY"; diff --git a/sonar-db/src/test/java/org/sonar/db/component/ComponentLinkDaoTest.java b/sonar-db/src/test/java/org/sonar/db/component/ComponentLinkDaoTest.java index 3700d5cc1a7..39ad48d9ae5 100644 --- a/sonar-db/src/test/java/org/sonar/db/component/ComponentLinkDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/component/ComponentLinkDaoTest.java @@ -22,14 +22,12 @@ package org.sonar.db.component; import java.util.List; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.sonar.api.utils.System2; import org.sonar.db.DbTester; -import org.sonar.test.DbTests; import static org.assertj.core.api.Assertions.assertThat; -@Category(DbTests.class) + public class ComponentLinkDaoTest { @Rule diff --git a/sonar-db/src/test/java/org/sonar/db/component/ResourceDaoTest.java b/sonar-db/src/test/java/org/sonar/db/component/ResourceDaoTest.java index 4d918699a40..0c13476bde8 100644 --- a/sonar-db/src/test/java/org/sonar/db/component/ResourceDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/component/ResourceDaoTest.java @@ -26,20 +26,18 @@ import java.util.List; import javax.annotation.Nullable; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.sonar.api.component.Component; import org.sonar.api.resources.Qualifiers; import org.sonar.api.resources.Scopes; import org.sonar.api.utils.System2; import org.sonar.db.DbTester; -import org.sonar.test.DbTests; import static com.google.common.collect.Lists.newArrayList; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -@Category(DbTests.class) + public class ResourceDaoTest { static System2 system = mock(System2.class); diff --git a/sonar-db/src/test/java/org/sonar/db/component/ResourceIndexDaoTest.java b/sonar-db/src/test/java/org/sonar/db/component/ResourceIndexDaoTest.java index 9c393f0e67c..9c33e3e3d4d 100644 --- a/sonar-db/src/test/java/org/sonar/db/component/ResourceIndexDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/component/ResourceIndexDaoTest.java @@ -22,16 +22,14 @@ package org.sonar.db.component; import org.junit.Before; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.sonar.api.resources.Qualifiers; import org.sonar.api.utils.System2; import org.sonar.db.DbSession; import org.sonar.db.DbTester; -import org.sonar.test.DbTests; import static org.assertj.core.api.Assertions.assertThat; -@Category(DbTests.class) + public class ResourceIndexDaoTest { @Rule diff --git a/sonar-db/src/test/java/org/sonar/db/component/ResourceKeyUpdaterDaoTest.java b/sonar-db/src/test/java/org/sonar/db/component/ResourceKeyUpdaterDaoTest.java index 6ddbf7e99e3..c71fd65f1b4 100644 --- a/sonar-db/src/test/java/org/sonar/db/component/ResourceKeyUpdaterDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/component/ResourceKeyUpdaterDaoTest.java @@ -22,15 +22,13 @@ package org.sonar.db.component; import java.util.Map; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.junit.rules.ExpectedException; import org.sonar.api.utils.System2; import org.sonar.db.DbTester; -import org.sonar.test.DbTests; import static org.assertj.core.api.Assertions.assertThat; -@Category(DbTests.class) + public class ResourceKeyUpdaterDaoTest { @Rule diff --git a/sonar-db/src/test/java/org/sonar/db/component/SnapshotDaoTest.java b/sonar-db/src/test/java/org/sonar/db/component/SnapshotDaoTest.java index 59bbea74db0..4fdd5c749bd 100644 --- a/sonar-db/src/test/java/org/sonar/db/component/SnapshotDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/component/SnapshotDaoTest.java @@ -23,7 +23,6 @@ import java.util.Date; import java.util.List; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.junit.rules.ExpectedException; import org.sonar.api.resources.Qualifiers; import org.sonar.api.resources.Scopes; @@ -31,7 +30,6 @@ import org.sonar.api.utils.DateUtils; import org.sonar.api.utils.System2; import org.sonar.db.DbSession; import org.sonar.db.DbTester; -import org.sonar.test.DbTests; import static com.google.common.collect.Lists.newArrayList; import static org.assertj.core.api.Assertions.assertThat; @@ -41,7 +39,7 @@ import static org.sonar.db.component.SnapshotQuery.SORT_ORDER.ASC; import static org.sonar.db.component.SnapshotQuery.SORT_ORDER.DESC; import static org.sonar.db.component.SnapshotTesting.newSnapshotForProject; -@Category(DbTests.class) + public class SnapshotDaoTest { @Rule diff --git a/sonar-db/src/test/java/org/sonar/db/dashboard/ActiveDashboardDaoTest.java b/sonar-db/src/test/java/org/sonar/db/dashboard/ActiveDashboardDaoTest.java index 38d0d20bff9..ba0fa867d56 100644 --- a/sonar-db/src/test/java/org/sonar/db/dashboard/ActiveDashboardDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/dashboard/ActiveDashboardDaoTest.java @@ -21,15 +21,13 @@ package org.sonar.db.dashboard; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.sonar.api.utils.System2; import org.sonar.db.DbSession; import org.sonar.db.DbTester; -import org.sonar.test.DbTests; import static org.assertj.core.api.Assertions.assertThat; -@Category(DbTests.class) + public class ActiveDashboardDaoTest { @Rule diff --git a/sonar-db/src/test/java/org/sonar/db/dashboard/DashboardDaoTest.java b/sonar-db/src/test/java/org/sonar/db/dashboard/DashboardDaoTest.java index e9c1c5de4ba..d3185180edc 100644 --- a/sonar-db/src/test/java/org/sonar/db/dashboard/DashboardDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/dashboard/DashboardDaoTest.java @@ -22,17 +22,15 @@ package org.sonar.db.dashboard; import java.util.Date; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.sonar.api.utils.System2; import org.sonar.db.DbTester; -import org.sonar.test.DbTests; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.nullValue; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertThat; -@Category(DbTests.class) + public class DashboardDaoTest { @Rule diff --git a/sonar-db/src/test/java/org/sonar/db/dashboard/WidgetDaoTest.java b/sonar-db/src/test/java/org/sonar/db/dashboard/WidgetDaoTest.java index 52719045e3b..569235c609f 100644 --- a/sonar-db/src/test/java/org/sonar/db/dashboard/WidgetDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/dashboard/WidgetDaoTest.java @@ -22,14 +22,11 @@ package org.sonar.db.dashboard; import java.util.Collection; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.sonar.api.utils.System2; import org.sonar.db.DbTester; -import org.sonar.test.DbTests; import static org.assertj.core.api.Assertions.assertThat; -@Category(DbTests.class) public class WidgetDaoTest { @Rule diff --git a/sonar-db/src/test/java/org/sonar/db/duplication/DuplicationDaoTest.java b/sonar-db/src/test/java/org/sonar/db/duplication/DuplicationDaoTest.java index b9cd5e367dc..eeaf8e5e07a 100644 --- a/sonar-db/src/test/java/org/sonar/db/duplication/DuplicationDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/duplication/DuplicationDaoTest.java @@ -22,16 +22,14 @@ package org.sonar.db.duplication; import java.util.List; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.sonar.api.utils.System2; import org.sonar.db.DbSession; import org.sonar.db.DbTester; -import org.sonar.test.DbTests; import static java.util.Collections.singletonList; import static org.assertj.core.api.Assertions.assertThat; -@Category(DbTests.class) + public class DuplicationDaoTest { @Rule diff --git a/sonar-db/src/test/java/org/sonar/db/event/EventDaoTest.java b/sonar-db/src/test/java/org/sonar/db/event/EventDaoTest.java index cf62f001775..649b941006a 100644 --- a/sonar-db/src/test/java/org/sonar/db/event/EventDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/event/EventDaoTest.java @@ -22,14 +22,12 @@ package org.sonar.db.event; import java.util.List; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.sonar.api.utils.System2; import org.sonar.db.DbTester; -import org.sonar.test.DbTests; import static org.assertj.core.api.Assertions.assertThat; -@Category(DbTests.class) + public class EventDaoTest { @Rule diff --git a/sonar-db/src/test/java/org/sonar/db/issue/ActionPlanDaoTest.java b/sonar-db/src/test/java/org/sonar/db/issue/ActionPlanDaoTest.java index 86a52e8e491..2d9edc4db87 100644 --- a/sonar-db/src/test/java/org/sonar/db/issue/ActionPlanDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/issue/ActionPlanDaoTest.java @@ -23,15 +23,12 @@ import java.util.Collection; import java.util.List; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.sonar.api.utils.System2; import org.sonar.db.DbTester; -import org.sonar.test.DbTests; import static com.google.common.collect.Lists.newArrayList; import static org.assertj.core.api.Assertions.assertThat; -@Category(DbTests.class) public class ActionPlanDaoTest { private static final String[] EXCLUDED_COLUMNS = new String[] {"id", "created_at", "updated_at"}; diff --git a/sonar-db/src/test/java/org/sonar/db/issue/ActionPlanStatsDaoTest.java b/sonar-db/src/test/java/org/sonar/db/issue/ActionPlanStatsDaoTest.java index 6425575b858..fed54670c62 100644 --- a/sonar-db/src/test/java/org/sonar/db/issue/ActionPlanStatsDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/issue/ActionPlanStatsDaoTest.java @@ -22,14 +22,12 @@ package org.sonar.db.issue; import java.util.Collection; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.sonar.api.utils.System2; import org.sonar.db.DbTester; -import org.sonar.test.DbTests; import static org.assertj.core.api.Assertions.assertThat; -@Category(DbTests.class) + public class ActionPlanStatsDaoTest { @Rule diff --git a/sonar-db/src/test/java/org/sonar/db/issue/IssueChangeDaoTest.java b/sonar-db/src/test/java/org/sonar/db/issue/IssueChangeDaoTest.java index a87dd5370b1..c6cd4492344 100644 --- a/sonar-db/src/test/java/org/sonar/db/issue/IssueChangeDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/issue/IssueChangeDaoTest.java @@ -24,20 +24,18 @@ import java.util.Collections; import java.util.List; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.sonar.api.utils.DateUtils; import org.sonar.api.utils.System2; import org.sonar.core.issue.DefaultIssueComment; import org.sonar.core.issue.FieldDiffs; import org.sonar.db.DbSession; import org.sonar.db.DbTester; -import org.sonar.test.DbTests; import static com.google.common.collect.Lists.newArrayList; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; -@Category(DbTests.class) + public class IssueChangeDaoTest { @Rule diff --git a/sonar-db/src/test/java/org/sonar/db/issue/IssueChangeMapperTest.java b/sonar-db/src/test/java/org/sonar/db/issue/IssueChangeMapperTest.java index f1b62efdfc9..0d929d96185 100644 --- a/sonar-db/src/test/java/org/sonar/db/issue/IssueChangeMapperTest.java +++ b/sonar-db/src/test/java/org/sonar/db/issue/IssueChangeMapperTest.java @@ -22,12 +22,10 @@ package org.sonar.db.issue; import org.junit.Before; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.sonar.api.utils.System2; import org.sonar.db.DbTester; -import org.sonar.test.DbTests; -@Category(DbTests.class) + public class IssueChangeMapperTest { @Rule diff --git a/sonar-db/src/test/java/org/sonar/db/issue/IssueDaoTest.java b/sonar-db/src/test/java/org/sonar/db/issue/IssueDaoTest.java index 853205ccf4a..c6b6f214611 100644 --- a/sonar-db/src/test/java/org/sonar/db/issue/IssueDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/issue/IssueDaoTest.java @@ -23,7 +23,6 @@ import java.util.List; import org.apache.ibatis.executor.result.DefaultResultHandler; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.junit.rules.ExpectedException; import org.sonar.api.rule.RuleKey; import org.sonar.api.utils.System2; @@ -33,12 +32,11 @@ import org.sonar.db.component.ComponentDto; import org.sonar.db.component.ComponentTesting; import org.sonar.db.rule.RuleDto; import org.sonar.db.rule.RuleTesting; -import org.sonar.test.DbTests; import static java.util.Arrays.asList; import static org.assertj.core.api.Assertions.assertThat; -@Category(DbTests.class) + public class IssueDaoTest { public static final RuleDto RULE = RuleTesting.newXooX1(); diff --git a/sonar-db/src/test/java/org/sonar/db/issue/IssueFilterDaoTest.java b/sonar-db/src/test/java/org/sonar/db/issue/IssueFilterDaoTest.java index cdea57dde3c..e4d9af8d143 100644 --- a/sonar-db/src/test/java/org/sonar/db/issue/IssueFilterDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/issue/IssueFilterDaoTest.java @@ -22,14 +22,12 @@ package org.sonar.db.issue; import java.util.List; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.sonar.api.utils.System2; import org.sonar.db.DbTester; -import org.sonar.test.DbTests; import static org.assertj.core.api.Assertions.assertThat; -@Category(DbTests.class) + public class IssueFilterDaoTest { @Rule diff --git a/sonar-db/src/test/java/org/sonar/db/issue/IssueFilterFavouriteDaoTest.java b/sonar-db/src/test/java/org/sonar/db/issue/IssueFilterFavouriteDaoTest.java index 142a66f22eb..1450adb0994 100644 --- a/sonar-db/src/test/java/org/sonar/db/issue/IssueFilterFavouriteDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/issue/IssueFilterFavouriteDaoTest.java @@ -22,14 +22,12 @@ package org.sonar.db.issue; import java.util.List; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.sonar.api.utils.System2; import org.sonar.db.DbTester; -import org.sonar.test.DbTests; import static org.assertj.core.api.Assertions.assertThat; -@Category(DbTests.class) + public class IssueFilterFavouriteDaoTest { @Rule diff --git a/sonar-db/src/test/java/org/sonar/db/issue/IssueMapperTest.java b/sonar-db/src/test/java/org/sonar/db/issue/IssueMapperTest.java index af47700e03e..812f5a7452b 100644 --- a/sonar-db/src/test/java/org/sonar/db/issue/IssueMapperTest.java +++ b/sonar-db/src/test/java/org/sonar/db/issue/IssueMapperTest.java @@ -21,15 +21,13 @@ package org.sonar.db.issue; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.sonar.api.utils.DateUtils; import org.sonar.api.utils.System2; import org.sonar.db.DbTester; -import org.sonar.test.DbTests; import static org.assertj.core.api.Assertions.assertThat; -@Category(DbTests.class) + public class IssueMapperTest { @Rule diff --git a/sonar-db/src/test/java/org/sonar/db/measure/MeasureDaoTest.java b/sonar-db/src/test/java/org/sonar/db/measure/MeasureDaoTest.java index fa2985530b7..a807759c70b 100644 --- a/sonar-db/src/test/java/org/sonar/db/measure/MeasureDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/measure/MeasureDaoTest.java @@ -31,7 +31,6 @@ import java.util.Map; import javax.annotation.Nullable; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.sonar.api.utils.System2; import org.sonar.db.DbClient; import org.sonar.db.DbSession; @@ -39,14 +38,13 @@ import org.sonar.db.DbTester; import org.sonar.db.component.ComponentDto; import org.sonar.db.component.ComponentTesting; import org.sonar.db.component.SnapshotDto; -import org.sonar.test.DbTests; import static com.google.common.collect.Lists.newArrayList; import static com.google.common.collect.Sets.newHashSet; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.guava.api.Assertions.assertThat; -@Category(DbTests.class) + public class MeasureDaoTest { private static final int SNAPSHOT_ID = 5; diff --git a/sonar-db/src/test/java/org/sonar/db/measure/custom/CustomMeasureDaoTest.java b/sonar-db/src/test/java/org/sonar/db/measure/custom/CustomMeasureDaoTest.java index 1c9216a6887..29de726f6c7 100644 --- a/sonar-db/src/test/java/org/sonar/db/measure/custom/CustomMeasureDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/measure/custom/CustomMeasureDaoTest.java @@ -24,19 +24,17 @@ import java.util.List; import org.junit.Before; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.junit.rules.ExpectedException; import org.sonar.api.utils.System2; import org.sonar.db.DbSession; import org.sonar.db.DbTester; import org.sonar.db.RowNotFoundException; -import org.sonar.test.DbTests; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.offset; import static org.sonar.db.measure.custom.CustomMeasureTesting.newCustomMeasureDto; -@Category(DbTests.class) + public class CustomMeasureDaoTest { @Rule public DbTester db = DbTester.create(System2.INSTANCE); diff --git a/sonar-db/src/test/java/org/sonar/db/metric/MetricDaoTest.java b/sonar-db/src/test/java/org/sonar/db/metric/MetricDaoTest.java index 5cdff639b91..369e263b383 100644 --- a/sonar-db/src/test/java/org/sonar/db/metric/MetricDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/metric/MetricDaoTest.java @@ -25,19 +25,17 @@ import org.junit.After; import org.junit.Before; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.junit.rules.ExpectedException; import org.sonar.api.utils.System2; import org.sonar.db.DbSession; import org.sonar.db.DbTester; import org.sonar.db.RowNotFoundException; -import org.sonar.test.DbTests; import static com.google.common.collect.Sets.newHashSet; import static org.assertj.core.api.Assertions.assertThat; import static org.sonar.db.metric.MetricTesting.newMetricDto; -@Category(DbTests.class) + public class MetricDaoTest { @Rule diff --git a/sonar-db/src/test/java/org/sonar/db/permission/GroupWithPermissionDaoTest.java b/sonar-db/src/test/java/org/sonar/db/permission/GroupWithPermissionDaoTest.java index ddb3b5b9923..a77ea0debe8 100644 --- a/sonar-db/src/test/java/org/sonar/db/permission/GroupWithPermissionDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/permission/GroupWithPermissionDaoTest.java @@ -27,13 +27,11 @@ import org.apache.ibatis.session.ResultContext; import org.apache.ibatis.session.ResultHandler; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.sonar.api.utils.System2; import org.sonar.db.DbSession; import org.sonar.db.DbTester; import org.sonar.db.user.GroupDto; import org.sonar.db.user.GroupRoleDto; -import org.sonar.test.DbTests; import static org.assertj.core.api.Assertions.assertThat; import static org.sonar.api.web.UserRole.ADMIN; @@ -41,7 +39,7 @@ import static org.sonar.api.web.UserRole.ISSUE_ADMIN; import static org.sonar.api.web.UserRole.USER; import static org.sonar.db.user.GroupTesting.newGroupDto; -@Category(DbTests.class) + public class GroupWithPermissionDaoTest { private static final long COMPONENT_ID = 100L; diff --git a/sonar-db/src/test/java/org/sonar/db/permission/GroupWithPermissionTemplateDaoTest.java b/sonar-db/src/test/java/org/sonar/db/permission/GroupWithPermissionTemplateDaoTest.java index 97f08216a52..b6838b1df55 100644 --- a/sonar-db/src/test/java/org/sonar/db/permission/GroupWithPermissionTemplateDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/permission/GroupWithPermissionTemplateDaoTest.java @@ -22,16 +22,14 @@ package org.sonar.db.permission; import java.util.List; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.sonar.api.utils.System2; import org.sonar.api.web.UserRole; import org.sonar.db.DbSession; import org.sonar.db.DbTester; -import org.sonar.test.DbTests; import static org.assertj.core.api.Assertions.assertThat; -@Category(DbTests.class) + public class GroupWithPermissionTemplateDaoTest { private static final long TEMPLATE_ID = 50L; diff --git a/sonar-db/src/test/java/org/sonar/db/permission/PermissionRepositoryTest.java b/sonar-db/src/test/java/org/sonar/db/permission/PermissionRepositoryTest.java index 241730df743..fbce7f1857e 100644 --- a/sonar-db/src/test/java/org/sonar/db/permission/PermissionRepositoryTest.java +++ b/sonar-db/src/test/java/org/sonar/db/permission/PermissionRepositoryTest.java @@ -22,7 +22,6 @@ package org.sonar.db.permission; import org.junit.Before; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.junit.rules.ExpectedException; import org.sonar.api.config.Settings; import org.sonar.api.utils.System2; @@ -30,13 +29,12 @@ import org.sonar.api.web.UserRole; import org.sonar.db.DbSession; import org.sonar.db.DbTester; import org.sonar.db.user.RoleDao; -import org.sonar.test.DbTests; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -@Category(DbTests.class) + public class PermissionRepositoryTest { static final String DEFAULT_TEMPLATE = "default_20130101_010203"; diff --git a/sonar-db/src/test/java/org/sonar/db/permission/PermissionTemplateDaoTest.java b/sonar-db/src/test/java/org/sonar/db/permission/PermissionTemplateDaoTest.java index a6a2696806b..6998f5c7cce 100644 --- a/sonar-db/src/test/java/org/sonar/db/permission/PermissionTemplateDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/permission/PermissionTemplateDaoTest.java @@ -30,7 +30,6 @@ import org.apache.ibatis.session.ResultContext; import org.apache.ibatis.session.ResultHandler; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.junit.rules.ExpectedException; import org.sonar.api.utils.System2; import org.sonar.db.DbClient; @@ -38,7 +37,6 @@ import org.sonar.db.DbSession; import org.sonar.db.DbTester; import org.sonar.db.user.GroupDto; import org.sonar.db.user.UserDto; -import org.sonar.test.DbTests; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; @@ -51,7 +49,7 @@ import static org.sonar.db.permission.PermissionTemplateTesting.newPermissionTem import static org.sonar.db.user.GroupTesting.newGroupDto; import static org.sonar.db.user.UserTesting.newUserDto; -@Category(DbTests.class) + public class PermissionTemplateDaoTest { System2 system = mock(System2.class); diff --git a/sonar-db/src/test/java/org/sonar/db/permission/UserWithPermissionDaoTest.java b/sonar-db/src/test/java/org/sonar/db/permission/UserWithPermissionDaoTest.java index 62654a5fdf6..a7891ba046c 100644 --- a/sonar-db/src/test/java/org/sonar/db/permission/UserWithPermissionDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/permission/UserWithPermissionDaoTest.java @@ -29,13 +29,11 @@ import org.apache.ibatis.session.ResultContext; import org.apache.ibatis.session.ResultHandler; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.sonar.api.utils.System2; import org.sonar.db.DbSession; import org.sonar.db.DbTester; import org.sonar.db.user.UserDto; import org.sonar.db.user.UserRoleDto; -import org.sonar.test.DbTests; import static org.assertj.core.api.Assertions.assertThat; import static org.sonar.api.web.UserRole.ADMIN; @@ -43,7 +41,7 @@ import static org.sonar.api.web.UserRole.ISSUE_ADMIN; import static org.sonar.api.web.UserRole.USER; import static org.sonar.db.user.UserTesting.newUserDto; -@Category(DbTests.class) + public class UserWithPermissionDaoTest { private static final long COMPONENT_ID = 100L; diff --git a/sonar-db/src/test/java/org/sonar/db/permission/UserWithPermissionTemplateDaoTest.java b/sonar-db/src/test/java/org/sonar/db/permission/UserWithPermissionTemplateDaoTest.java index cd4c537b827..7665ce965ea 100644 --- a/sonar-db/src/test/java/org/sonar/db/permission/UserWithPermissionTemplateDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/permission/UserWithPermissionTemplateDaoTest.java @@ -25,14 +25,12 @@ import java.util.List; import javax.annotation.Nullable; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.sonar.api.utils.System2; import org.sonar.db.DbTester; -import org.sonar.test.DbTests; import static org.assertj.core.api.Assertions.assertThat; -@Category(DbTests.class) + public class UserWithPermissionTemplateDaoTest { private static final Long TEMPLATE_ID = 50L; diff --git a/sonar-db/src/test/java/org/sonar/db/property/PropertiesDaoTest.java b/sonar-db/src/test/java/org/sonar/db/property/PropertiesDaoTest.java index 1df9b30d760..0071be12609 100644 --- a/sonar-db/src/test/java/org/sonar/db/property/PropertiesDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/property/PropertiesDaoTest.java @@ -24,17 +24,15 @@ import java.util.Arrays; import java.util.List; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.junit.rules.ExpectedException; import org.sonar.api.utils.System2; import org.sonar.db.DbTester; -import org.sonar.test.DbTests; import static org.assertj.core.api.Assertions.assertThat; import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertThat; -@Category(DbTests.class) + public class PropertiesDaoTest { @Rule diff --git a/sonar-db/src/test/java/org/sonar/db/purge/PurgeCommandsTest.java b/sonar-db/src/test/java/org/sonar/db/purge/PurgeCommandsTest.java index 35beff8a242..c2955d9d029 100644 --- a/sonar-db/src/test/java/org/sonar/db/purge/PurgeCommandsTest.java +++ b/sonar-db/src/test/java/org/sonar/db/purge/PurgeCommandsTest.java @@ -22,15 +22,13 @@ package org.sonar.db.purge; import java.util.List; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.sonar.api.utils.System2; import org.sonar.db.DbTester; -import org.sonar.test.DbTests; import static com.google.common.collect.Lists.newArrayList; import static org.assertj.core.api.Assertions.assertThat; -@Category(DbTests.class) + public class PurgeCommandsTest { @Rule diff --git a/sonar-db/src/test/java/org/sonar/db/purge/PurgeDaoTest.java b/sonar-db/src/test/java/org/sonar/db/purge/PurgeDaoTest.java index 5c7192d66ee..9f4099b8ea1 100644 --- a/sonar-db/src/test/java/org/sonar/db/purge/PurgeDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/purge/PurgeDaoTest.java @@ -22,7 +22,6 @@ package org.sonar.db.purge; import java.util.List; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.sonar.api.resources.Scopes; import org.sonar.api.utils.System2; import org.sonar.core.util.Uuids; @@ -33,14 +32,13 @@ import org.sonar.db.ce.CeActivityDto; import org.sonar.db.ce.CeQueueDto; import org.sonar.db.component.ComponentDto; import org.sonar.db.component.ComponentTesting; -import org.sonar.test.DbTests; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import static org.sonar.db.ce.CeTaskTypes.REPORT; -@Category(DbTests.class) + public class PurgeDaoTest { System2 system2 = mock(System2.class); diff --git a/sonar-db/src/test/java/org/sonar/db/qualitygate/ProjectQgateAssociationDaoTest.java b/sonar-db/src/test/java/org/sonar/db/qualitygate/ProjectQgateAssociationDaoTest.java index a02e6b67b24..cc83b038bcc 100644 --- a/sonar-db/src/test/java/org/sonar/db/qualitygate/ProjectQgateAssociationDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/qualitygate/ProjectQgateAssociationDaoTest.java @@ -22,14 +22,12 @@ package org.sonar.db.qualitygate; import java.util.List; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.sonar.api.utils.System2; import org.sonar.db.DbTester; -import org.sonar.test.DbTests; import static org.assertj.core.api.Assertions.assertThat; -@Category(DbTests.class) + public class ProjectQgateAssociationDaoTest { @Rule diff --git a/sonar-db/src/test/java/org/sonar/db/qualitygate/QualityGateConditionDaoTest.java b/sonar-db/src/test/java/org/sonar/db/qualitygate/QualityGateConditionDaoTest.java index 84a6c4d446f..93e54d3b518 100644 --- a/sonar-db/src/test/java/org/sonar/db/qualitygate/QualityGateConditionDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/qualitygate/QualityGateConditionDaoTest.java @@ -21,14 +21,12 @@ package org.sonar.db.qualitygate; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.sonar.api.utils.System2; import org.sonar.db.DbTester; -import org.sonar.test.DbTests; import static org.assertj.core.api.Assertions.assertThat; -@Category(DbTests.class) + public class QualityGateConditionDaoTest { private static final String[] COLUMNS_WITHOUT_TIMESTAMPS = { diff --git a/sonar-db/src/test/java/org/sonar/db/qualitygate/QualityGateDaoTest.java b/sonar-db/src/test/java/org/sonar/db/qualitygate/QualityGateDaoTest.java index 423db45d1fb..9520893eead 100644 --- a/sonar-db/src/test/java/org/sonar/db/qualitygate/QualityGateDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/qualitygate/QualityGateDaoTest.java @@ -23,14 +23,12 @@ import java.util.Collection; import java.util.Iterator; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.sonar.api.utils.System2; import org.sonar.db.DbTester; -import org.sonar.test.DbTests; import static org.assertj.core.api.Assertions.assertThat; -@Category(DbTests.class) + public class QualityGateDaoTest { @Rule diff --git a/sonar-db/src/test/java/org/sonar/db/qualityprofile/ActiveRuleDaoTest.java b/sonar-db/src/test/java/org/sonar/db/qualityprofile/ActiveRuleDaoTest.java index e04b39f9296..2286653cbfa 100644 --- a/sonar-db/src/test/java/org/sonar/db/qualityprofile/ActiveRuleDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/qualityprofile/ActiveRuleDaoTest.java @@ -22,7 +22,6 @@ package org.sonar.db.qualityprofile; import org.junit.Before; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.sonar.api.rule.Severity; import org.sonar.api.utils.System2; import org.sonar.db.DbClient; @@ -30,7 +29,6 @@ import org.sonar.db.DbSession; import org.sonar.db.DbTester; import org.sonar.db.rule.RuleDto; import org.sonar.db.rule.RuleTesting; -import org.sonar.test.DbTests; import static java.util.Arrays.asList; import static org.assertj.core.api.Assertions.assertThat; @@ -38,7 +36,7 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; // TODO add missing tests -@Category(DbTests.class) + public class ActiveRuleDaoTest { static final long NOW = 10000000L; diff --git a/sonar-db/src/test/java/org/sonar/db/qualityprofile/QualityProfileDaoTest.java b/sonar-db/src/test/java/org/sonar/db/qualityprofile/QualityProfileDaoTest.java index ca6ff253912..f53a1edd2b1 100644 --- a/sonar-db/src/test/java/org/sonar/db/qualityprofile/QualityProfileDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/qualityprofile/QualityProfileDaoTest.java @@ -24,17 +24,15 @@ import org.assertj.core.data.MapEntry; import org.junit.Before; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.sonar.api.utils.System2; import org.sonar.core.util.UtcDateUtils; import org.sonar.db.DbTester; -import org.sonar.test.DbTests; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -@Category(DbTests.class) + public class QualityProfileDaoTest { System2 system = mock(System2.class); diff --git a/sonar-db/src/test/java/org/sonar/db/rule/RuleDaoTest.java b/sonar-db/src/test/java/org/sonar/db/rule/RuleDaoTest.java index 8da2677ea43..41d2b9dcb70 100644 --- a/sonar-db/src/test/java/org/sonar/db/rule/RuleDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/rule/RuleDaoTest.java @@ -29,7 +29,6 @@ import org.apache.ibatis.session.ResultContext; import org.apache.ibatis.session.ResultHandler; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.junit.rules.ExpectedException; import org.sonar.api.rule.RuleKey; import org.sonar.api.rule.RuleStatus; @@ -40,14 +39,13 @@ import org.sonar.api.utils.DateUtils; import org.sonar.api.utils.System2; import org.sonar.db.DbTester; import org.sonar.db.RowNotFoundException; -import org.sonar.test.DbTests; import static java.util.Arrays.asList; import static java.util.Collections.singletonList; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.guava.api.Assertions.assertThat; -@Category(DbTests.class) + public class RuleDaoTest { @Rule diff --git a/sonar-db/src/test/java/org/sonar/db/source/FileSourceDaoTest.java b/sonar-db/src/test/java/org/sonar/db/source/FileSourceDaoTest.java index 454df6985cd..7047b7a34e4 100644 --- a/sonar-db/src/test/java/org/sonar/db/source/FileSourceDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/source/FileSourceDaoTest.java @@ -25,16 +25,14 @@ import java.io.Reader; import org.apache.commons.io.IOUtils; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.sonar.api.utils.System2; import org.sonar.db.DbSession; import org.sonar.db.DbTester; import org.sonar.db.source.FileSourceDto.Type; -import org.sonar.test.DbTests; import static org.assertj.core.api.Assertions.assertThat; -@Category(DbTests.class) + public class FileSourceDaoTest { @Rule diff --git a/sonar-db/src/test/java/org/sonar/db/user/AuthorDaoTest.java b/sonar-db/src/test/java/org/sonar/db/user/AuthorDaoTest.java index bfc70d53abc..6b930fe76cb 100644 --- a/sonar-db/src/test/java/org/sonar/db/user/AuthorDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/user/AuthorDaoTest.java @@ -22,16 +22,14 @@ package org.sonar.db.user; import org.junit.After; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.junit.rules.ExpectedException; import org.sonar.api.utils.System2; import org.sonar.db.DbSession; import org.sonar.db.DbTester; -import org.sonar.test.DbTests; import static org.assertj.core.api.Assertions.assertThat; -@Category(DbTests.class) + public class AuthorDaoTest { @Rule diff --git a/sonar-db/src/test/java/org/sonar/db/user/AuthorizationDaoTest.java b/sonar-db/src/test/java/org/sonar/db/user/AuthorizationDaoTest.java index 75cfe32d742..635c8da8cc8 100644 --- a/sonar-db/src/test/java/org/sonar/db/user/AuthorizationDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/user/AuthorizationDaoTest.java @@ -24,14 +24,12 @@ import java.util.Collection; import java.util.Collections; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.sonar.api.utils.System2; import org.sonar.db.DbTester; -import org.sonar.test.DbTests; import static org.assertj.core.api.Assertions.assertThat; -@Category(DbTests.class) + public class AuthorizationDaoTest { private static final int USER = 100; diff --git a/sonar-db/src/test/java/org/sonar/db/user/GroupDaoTest.java b/sonar-db/src/test/java/org/sonar/db/user/GroupDaoTest.java index efd1887a503..cf6fedb69fb 100644 --- a/sonar-db/src/test/java/org/sonar/db/user/GroupDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/user/GroupDaoTest.java @@ -22,19 +22,17 @@ package org.sonar.db.user; import java.util.List; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.sonar.api.utils.DateUtils; import org.sonar.api.utils.System2; import org.sonar.db.DbSession; import org.sonar.db.DbTester; -import org.sonar.test.DbTests; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import static org.sonar.db.user.GroupTesting.newGroupDto; -@Category(DbTests.class) + public class GroupDaoTest { @Rule diff --git a/sonar-db/src/test/java/org/sonar/db/user/GroupMembershipDaoTest.java b/sonar-db/src/test/java/org/sonar/db/user/GroupMembershipDaoTest.java index 6b82b32bf70..ec8203c87cb 100644 --- a/sonar-db/src/test/java/org/sonar/db/user/GroupMembershipDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/user/GroupMembershipDaoTest.java @@ -24,15 +24,13 @@ import java.util.Arrays; import java.util.List; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.sonar.api.utils.System2; import org.sonar.db.DbTester; -import org.sonar.test.DbTests; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.data.MapEntry.entry; -@Category(DbTests.class) + public class GroupMembershipDaoTest { @Rule diff --git a/sonar-db/src/test/java/org/sonar/db/user/RoleDaoTest.java b/sonar-db/src/test/java/org/sonar/db/user/RoleDaoTest.java index 808b732d9f5..70fde5c27c1 100644 --- a/sonar-db/src/test/java/org/sonar/db/user/RoleDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/user/RoleDaoTest.java @@ -21,18 +21,16 @@ package org.sonar.db.user; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.sonar.api.security.DefaultGroups; import org.sonar.api.utils.System2; import org.sonar.api.web.UserRole; import org.sonar.core.permission.GlobalPermissions; import org.sonar.db.DbClient; import org.sonar.db.DbTester; -import org.sonar.test.DbTests; import static org.assertj.core.api.Assertions.assertThat; -@Category(DbTests.class) + public class RoleDaoTest { @Rule diff --git a/sonar-db/src/test/java/org/sonar/db/user/RoleMapperTest.java b/sonar-db/src/test/java/org/sonar/db/user/RoleMapperTest.java index 2d6ebbc22a8..83826c130fe 100644 --- a/sonar-db/src/test/java/org/sonar/db/user/RoleMapperTest.java +++ b/sonar-db/src/test/java/org/sonar/db/user/RoleMapperTest.java @@ -21,14 +21,12 @@ package org.sonar.db.user; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.sonar.api.utils.System2; import org.sonar.db.DbTester; -import org.sonar.test.DbTests; import static org.assertj.core.api.Assertions.assertThat; -@Category(DbTests.class) + public class RoleMapperTest { @Rule diff --git a/sonar-db/src/test/java/org/sonar/db/user/UserDaoTest.java b/sonar-db/src/test/java/org/sonar/db/user/UserDaoTest.java index 55d413370f2..6724dbe11ad 100644 --- a/sonar-db/src/test/java/org/sonar/db/user/UserDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/user/UserDaoTest.java @@ -26,7 +26,6 @@ import java.util.List; import org.junit.Before; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.junit.rules.ExpectedException; import org.sonar.api.user.UserQuery; import org.sonar.api.utils.DateUtils; @@ -43,7 +42,6 @@ import org.sonar.db.measure.MeasureFilterDto; import org.sonar.db.measure.MeasureFilterFavouriteDto; import org.sonar.db.property.PropertyDto; import org.sonar.db.property.PropertyQuery; -import org.sonar.test.DbTests; import static java.util.Arrays.asList; import static org.apache.commons.lang.RandomStringUtils.randomAlphanumeric; @@ -54,7 +52,7 @@ import static org.mockito.Mockito.when; import static org.sonar.db.user.GroupMembershipQuery.IN; import static org.sonar.db.user.GroupMembershipQuery.builder; -@Category(DbTests.class) + public class UserDaoTest { @Rule diff --git a/sonar-db/src/test/java/org/sonar/db/user/UserGroupDaoTest.java b/sonar-db/src/test/java/org/sonar/db/user/UserGroupDaoTest.java index b7cb5c7a3a7..af1ae76cb62 100644 --- a/sonar-db/src/test/java/org/sonar/db/user/UserGroupDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/user/UserGroupDaoTest.java @@ -21,12 +21,10 @@ package org.sonar.db.user; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.sonar.api.utils.System2; import org.sonar.db.DbTester; -import org.sonar.test.DbTests; -@Category(DbTests.class) + public class UserGroupDaoTest { @Rule diff --git a/sonar-db/src/test/java/org/sonar/db/user/UserTokenDaoTest.java b/sonar-db/src/test/java/org/sonar/db/user/UserTokenDaoTest.java index bfe27081188..2cc593393ac 100644 --- a/sonar-db/src/test/java/org/sonar/db/user/UserTokenDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/user/UserTokenDaoTest.java @@ -25,19 +25,17 @@ import org.assertj.guava.api.Assertions; import org.junit.Before; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.junit.rules.ExpectedException; import org.sonar.api.utils.System2; import org.sonar.db.DbSession; import org.sonar.db.DbTester; import org.sonar.db.RowNotFoundException; -import org.sonar.test.DbTests; import static com.google.common.collect.Lists.newArrayList; import static org.assertj.core.api.Assertions.assertThat; import static org.sonar.db.user.UserTokenTesting.newUserToken; -@Category(DbTests.class) + public class UserTokenDaoTest { @Rule public DbTester db = DbTester.create(System2.INSTANCE); diff --git a/sonar-db/src/test/java/org/sonar/db/version/BaseDataChangeTest.java b/sonar-db/src/test/java/org/sonar/db/version/BaseDataChangeTest.java index b5bba854537..329f54955e2 100644 --- a/sonar-db/src/test/java/org/sonar/db/version/BaseDataChangeTest.java +++ b/sonar-db/src/test/java/org/sonar/db/version/BaseDataChangeTest.java @@ -26,19 +26,17 @@ import java.util.concurrent.atomic.AtomicBoolean; import org.junit.Before; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.junit.rules.ExpectedException; import org.sonar.api.utils.System2; import org.sonar.db.BatchSession; import org.sonar.db.DbTester; import org.sonar.db.version.Select.Row; import org.sonar.db.version.Select.RowReader; -import org.sonar.test.DbTests; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.fail; -@Category(DbTests.class) + public class BaseDataChangeTest { @Rule diff --git a/sonar-db/src/test/java/org/sonar/db/version/DatabaseVersionTest.java b/sonar-db/src/test/java/org/sonar/db/version/DatabaseVersionTest.java index 5f937f0eb06..a36ae4045a0 100644 --- a/sonar-db/src/test/java/org/sonar/db/version/DatabaseVersionTest.java +++ b/sonar-db/src/test/java/org/sonar/db/version/DatabaseVersionTest.java @@ -21,14 +21,12 @@ package org.sonar.db.version; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.sonar.api.utils.System2; import org.sonar.db.DbTester; -import org.sonar.test.DbTests; import static org.assertj.core.api.Assertions.assertThat; -@Category(DbTests.class) + public class DatabaseVersionTest { @Rule |