diff options
Diffstat (limited to 'server')
557 files changed, 602 insertions, 722 deletions
diff --git a/server/sonar-auth-github/src/test/java/org/sonar/auth/github/GitHubSettingsTest.java b/server/sonar-auth-github/src/test/java/org/sonar/auth/github/GitHubSettingsTest.java index c2ddf5cf2cd..5edd93d982c 100644 --- a/server/sonar-auth-github/src/test/java/org/sonar/auth/github/GitHubSettingsTest.java +++ b/server/sonar-auth-github/src/test/java/org/sonar/auth/github/GitHubSettingsTest.java @@ -39,7 +39,7 @@ import static org.mockito.Mockito.when; public class GitHubSettingsTest { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private MapSettings settings = new MapSettings(new PropertyDefinitions(System2.INSTANCE, GitHubSettings.definitions())); private InternalProperties internalProperties = mock(InternalProperties.class); diff --git a/server/sonar-auth-github/src/test/java/org/sonar/auth/github/IntegrationTest.java b/server/sonar-auth-github/src/test/java/org/sonar/auth/github/IntegrationTest.java index ef39a34c06d..f7ba8e35dd7 100644 --- a/server/sonar-auth-github/src/test/java/org/sonar/auth/github/IntegrationTest.java +++ b/server/sonar-auth-github/src/test/java/org/sonar/auth/github/IntegrationTest.java @@ -59,7 +59,7 @@ public class IntegrationTest { public MockWebServer github = new MockWebServer(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); // load settings with default values private MapSettings settings = new MapSettings(new PropertyDefinitions(System2.INSTANCE, GitHubSettings.definitions())); diff --git a/server/sonar-auth-saml/src/it/java/org/sonar/auth/saml/SamlIdentityProviderIT.java b/server/sonar-auth-saml/src/it/java/org/sonar/auth/saml/SamlIdentityProviderIT.java index 4318530e2b8..ea83ab6ad49 100644 --- a/server/sonar-auth-saml/src/it/java/org/sonar/auth/saml/SamlIdentityProviderIT.java +++ b/server/sonar-auth-saml/src/it/java/org/sonar/auth/saml/SamlIdentityProviderIT.java @@ -68,7 +68,7 @@ public class SamlIdentityProviderIT { private static final String SP_PRIVATE_KEY = "-----BEGIN PRIVATE KEY-----MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDSFoT371C0/klZuPgvKbGItkmTaf5CweNXL8u389d98aOXRpDQ7maTXdV/W+VcL8vUWg8yG6nn8CRwweYnGTNdn9UAdhgknvxQe3pq3EwOJyls4Fpiq6YTh+DQfiZUQizjFjDOr/GG5O2lNvTRkI4XZj/XnWjRqVZwttiA5tm1sKkvGdyOQljwn4Jja/VbITdV8GASumx66Bil/wamSsqIzm2RjsOOGSsf5VjYUPwDobpuSf+j4DLtWjem/9vIzI2wcE30uC8LBAgO3JAlIS9NQrchjS9xhMJRohOoitaSPmqsOy7D2BH0h7XX6TNgv/WYTkBY4eZPao3PsL2A6AmhAgMBAAECggEBAJj11HJAR96/leBBkFGmZaBIOGGgNoOcb023evfADhGgsZ8evamhKgX5t8w2uFPaaOl/eLje82Hvslh2lH+7FW8BRDBFy2Y+ay6d+I99PdLAKKUg5C4bE5v8vm6OqpGGbPAZ5AdYit3QKEa2MKG0QgA/bhQqg3rDdDA0sIWJjtF9MLv7LI7Tm0qgiHOKsI0MEBFk+ZoibgKWYh/dnfGDRWyC3Puqe13rdSheNJYUDR/0QMkd/EJNpLWv06uk+w8w2lU4RgN6TiV76ZZUIGZAAHFgMELJysgtBTCkOQY5roPu17OmMZjKfxngeIfNyd42q3/T6DmUbbwNYfP2HRMoiMECgYEA6SVc1mZ4ykytC9M61rZwT+2zXtJKudQVa0qpTtkf0aznRmnDOuc1bL7ewKIIIp9r5HKVteO6SKgpHmrP+qmvbwZ0Pz51Zg0MetoSmT9m0599/tOU2k6OI09dvQ4Xa3ccN5Czl61Q/HkMeAIDny8MrhGVBwhallE4J4fm/OjuVK0CgYEA5q6IVgqZtfcV1azIF6uOFt6blfn142zrwq0fF39jog2f+4jXaBKw6L4aP0HvIL83UArGppYY31894bLb6YL4EjS2JNbABM2VnJpJd4oGopOE42GCZlZRpf751zOptYAN23NFSujLlfaUfMbyrqIbRFC2DCdzNTU50GT5SAXX80UCgYEAlyvQvHwJCjMZaTd3SU1WGZ1o1qzIIyHvGXh5u1Rxm0TfWPquyfys2WwRhxoI6FoyXRgnFp8oZIAU2VIstL1dsUGgEnnvKVKAqw/HS3Keu80IpziNpdeVtjN59mGysc2zkBvVNx38Cxh6Cz5TFt4s/JkN5ld2VU0oeglWrtph3qkCgYALszZ/BrKdJBcba1QKv0zJpCjIBpGOI2whx54YFwH6qi4/F8W1JZ2LcHjsVG/IfWpUyPciY+KHEdGVrPiyc04Zvkquu6WpmLPJ6ZloUrvbaxgGYF+4yRADF1ecrqYg6onJY6NUFVKeHI+TdJPCf75aTK2vGCEjxbtU8ooiOQmm8QKBgEGe9ZdrwTP9rMQ35jYtzU+dT06k1r9BE9Q8CmrXl0HwK717ZWboX4J0YoFjxZC8PDsMl3p46MJ83rKbLU728uKig1AkZo7/OedxTWvezjZ1+lDyjC2EguXbgY1ecSC2HbJh9g+v8RUuhWxuA7RYoW92xVtKj+6l4vMadVP4Myp8-----END PRIVATE KEY-----"; @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public LogTester log = new LogTester(); diff --git a/server/sonar-auth-saml/src/it/java/org/sonar/auth/saml/SamlMessageIdCheckerIT.java b/server/sonar-auth-saml/src/it/java/org/sonar/auth/saml/SamlMessageIdCheckerIT.java index 59c759fe877..517269fe80a 100644 --- a/server/sonar-auth-saml/src/it/java/org/sonar/auth/saml/SamlMessageIdCheckerIT.java +++ b/server/sonar-auth-saml/src/it/java/org/sonar/auth/saml/SamlMessageIdCheckerIT.java @@ -38,7 +38,7 @@ import static org.mockito.Mockito.when; public class SamlMessageIdCheckerIT { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private DbSession dbSession = db.getSession(); diff --git a/server/sonar-ce-common/src/it/java/org/sonar/ce/queue/CeQueueImplIT.java b/server/sonar-ce-common/src/it/java/org/sonar/ce/queue/CeQueueImplIT.java index 6f2d78562db..32f62b39957 100644 --- a/server/sonar-ce-common/src/it/java/org/sonar/ce/queue/CeQueueImplIT.java +++ b/server/sonar-ce-common/src/it/java/org/sonar/ce/queue/CeQueueImplIT.java @@ -70,7 +70,7 @@ public class CeQueueImplIT { private System2 system2 = new TestSystem2().setNow(NOW); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); private DbSession session = db.getSession(); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/component/BranchPersisterImplIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/component/BranchPersisterImplIT.java index 657bebd7d8e..627e4a4a9e8 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/component/BranchPersisterImplIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/component/BranchPersisterImplIT.java @@ -64,7 +64,7 @@ public class BranchPersisterImplIT { @Rule public AnalysisMetadataHolderRule analysisMetadataHolder = new AnalysisMetadataHolderRule(); @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); @Rule public TreeRootHolderRule treeRootHolder = new TreeRootHolderRule(); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/component/ComponentUuidFactoryImplIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/component/ComponentUuidFactoryImplIT.java index 7e911f1a09a..6da6104b038 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/component/ComponentUuidFactoryImplIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/component/ComponentUuidFactoryImplIT.java @@ -39,7 +39,7 @@ public class ComponentUuidFactoryImplIT { private final Branch mockedBranch = mock(Branch.class); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); @Test public void getOrCreateForKey_when_existingComponentsInDbForMainBranch_should_load() { diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/component/ProjectPersisterIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/component/ProjectPersisterIT.java index 729c85f9f7e..45d0ef5e8a5 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/component/ProjectPersisterIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/component/ProjectPersisterIT.java @@ -48,7 +48,7 @@ public class ProjectPersisterIT { @Rule public AnalysisMetadataHolderRule analysisMetadataHolder = new AnalysisMetadataHolderRule(); @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); @Rule public TreeRootHolderRule treeRootHolder = new TreeRootHolderRule(); public TestSystem2 system2 = new TestSystem2(); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/component/ReferenceBranchComponentUuidsIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/component/ReferenceBranchComponentUuidsIT.java index fbced257b75..e899db1ea63 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/component/ReferenceBranchComponentUuidsIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/component/ReferenceBranchComponentUuidsIT.java @@ -40,7 +40,7 @@ public class ReferenceBranchComponentUuidsIT { public AnalysisMetadataHolderRule analysisMetadataHolder = new AnalysisMetadataHolderRule(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private ReferenceBranchComponentUuids underTest; private Branch branch = mock(Branch.class); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/component/SiblingComponentsWithOpenIssuesIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/component/SiblingComponentsWithOpenIssuesIT.java index d2129bcbfd2..98d4c7880bc 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/component/SiblingComponentsWithOpenIssuesIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/component/SiblingComponentsWithOpenIssuesIT.java @@ -45,7 +45,7 @@ public class SiblingComponentsWithOpenIssuesIT { public AnalysisMetadataHolderRule metadataHolder = new AnalysisMetadataHolderRule(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private SiblingComponentsWithOpenIssues underTest; diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/filemove/FileMoveDetectionStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/filemove/FileMoveDetectionStepIT.java index 4efa02ec5f0..6a83f4ce017 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/filemove/FileMoveDetectionStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/filemove/FileMoveDetectionStepIT.java @@ -219,7 +219,7 @@ public class FileMoveDetectionStepIT { @Rule public MutableMovedFilesRepositoryRule movedFilesRepository = new MutableMovedFilesRepositoryRule(); @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); @Rule public LogTester logTester = new LogTester(); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/filemove/PullRequestFileMoveDetectionStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/filemove/PullRequestFileMoveDetectionStepIT.java index 82c7809cca7..423e91a5fc4 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/filemove/PullRequestFileMoveDetectionStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/filemove/PullRequestFileMoveDetectionStepIT.java @@ -86,7 +86,7 @@ public class PullRequestFileMoveDetectionStepIT { @Rule public MutableMovedFilesRepositoryRule movedFilesRepository = new MutableMovedFilesRepositoryRule(); @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); @Rule public LogTester logTester = new LogTester(); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/AdHocRuleCreatorIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/AdHocRuleCreatorIT.java index 65d9b253d0e..df05ba8d268 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/AdHocRuleCreatorIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/AdHocRuleCreatorIT.java @@ -39,7 +39,7 @@ import static org.assertj.core.api.Assertions.assertThat; public class AdHocRuleCreatorIT { @org.junit.Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); @org.junit.Rule public EsTester es = EsTester.create(); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/ComponentIssuesLoaderIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/ComponentIssuesLoaderIT.java index 2278482e1ff..96e634feadc 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/ComponentIssuesLoaderIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/ComponentIssuesLoaderIT.java @@ -69,7 +69,7 @@ public class ComponentIssuesLoaderIT { private static final Date DATE_LIMIT_30_DAYS_BACK_MIDNIGHT = parseDateTime("2018-07-18T00:00:00+0000"); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final DbClient dbClient = db.getDbClient(); private final System2 system2 = mock(System2.class); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/DefaultAssigneeIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/DefaultAssigneeIT.java index d6494aa8910..e7b36137021 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/DefaultAssigneeIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/DefaultAssigneeIT.java @@ -36,7 +36,7 @@ public class DefaultAssigneeIT { public static final String PROJECT_KEY = "PROJECT_KEY"; @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final MapSettings settings = new MapSettings(); private final ConfigurationRepository settingsRepository = new TestSettingsRepository(settings.asConfig()); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/IntegrateIssuesVisitorIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/IntegrateIssuesVisitorIT.java index 38ef3e334bf..fd2da91f154 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/IntegrateIssuesVisitorIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/IntegrateIssuesVisitorIT.java @@ -103,7 +103,7 @@ public class IntegrateIssuesVisitorIT { @Rule public TemporaryFolder temp = new TemporaryFolder(); @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); @Rule public TreeRootHolderRule treeRootHolder = new TreeRootHolderRule(); @Rule diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/ProjectTrackerBaseLazyInputIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/ProjectTrackerBaseLazyInputIT.java index f6bce05a107..a2b3e3db5cf 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/ProjectTrackerBaseLazyInputIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/ProjectTrackerBaseLazyInputIT.java @@ -48,7 +48,7 @@ public class ProjectTrackerBaseLazyInputIT { @Rule public AnalysisMetadataHolderRule analysisMetadataHolder = new AnalysisMetadataHolderRule().setAnalysisDate(ANALYSIS_DATE); @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); @Rule public ActiveRulesHolderRule activeRulesHolderRule = new ActiveRulesHolderRule(); @Rule diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/ScmAccountToUserLoaderIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/ScmAccountToUserLoaderIT.java index a65dbf661b3..86d15f426d2 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/ScmAccountToUserLoaderIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/ScmAccountToUserLoaderIT.java @@ -36,7 +36,7 @@ import static org.junit.Assert.fail; public class ScmAccountToUserLoaderIT { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public EsTester es = EsTester.create(); @Rule diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/SiblingsIssueMergerIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/SiblingsIssueMergerIT.java index 95800f5a6f9..a44ffda6cd1 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/SiblingsIssueMergerIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/SiblingsIssueMergerIT.java @@ -62,7 +62,7 @@ public class SiblingsIssueMergerIT { private final Branch branch = mock(Branch.class); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public TreeRootHolderRule treeRootHolder = new TreeRootHolderRule() diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/SourceBranchComponentUuidsIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/SourceBranchComponentUuidsIT.java index 0b142e55b32..5bfa15b1957 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/SourceBranchComponentUuidsIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/SourceBranchComponentUuidsIT.java @@ -46,7 +46,7 @@ public class SourceBranchComponentUuidsIT { public AnalysisMetadataHolderRule analysisMetadataHolder = new AnalysisMetadataHolderRule(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private SourceBranchComponentUuids underTest; private final Branch branch = mock(Branch.class); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/TargetBranchComponentUuidsIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/TargetBranchComponentUuidsIT.java index ff9788baf3d..f28f35ac08c 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/TargetBranchComponentUuidsIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/TargetBranchComponentUuidsIT.java @@ -45,7 +45,7 @@ public class TargetBranchComponentUuidsIT { public AnalysisMetadataHolderRule analysisMetadataHolder = new AnalysisMetadataHolderRule(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private TargetBranchComponentUuids underTest; private final Branch branch = mock(Branch.class); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/TrackerReferenceBranchInputFactoryIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/TrackerReferenceBranchInputFactoryIT.java index a361edd235e..916a98c5714 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/TrackerReferenceBranchInputFactoryIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/TrackerReferenceBranchInputFactoryIT.java @@ -40,7 +40,7 @@ public class TrackerReferenceBranchInputFactoryIT { private final static String COMPONENT_UUID = "uuid1"; @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private ComponentIssuesLoader componentIssuesLoader = mock(ComponentIssuesLoader.class); private ReferenceBranchComponentUuids referenceBranchComponentUuids = mock(ReferenceBranchComponentUuids.class); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/TrackerSourceBranchInputFactoryIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/TrackerSourceBranchInputFactoryIT.java index 89bcb79c356..6cf56ee40fb 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/TrackerSourceBranchInputFactoryIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/TrackerSourceBranchInputFactoryIT.java @@ -39,7 +39,7 @@ public class TrackerSourceBranchInputFactoryIT { private final static String COMPONENT_UUID = "uuid1"; @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final ComponentIssuesLoader componentIssuesLoader = mock(ComponentIssuesLoader.class); private final SourceBranchComponentUuids sourceBranchComponentUuids = mock(SourceBranchComponentUuids.class); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/TrackerTargetBranchInputFactoryIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/TrackerTargetBranchInputFactoryIT.java index bd1a2eb80a6..6bbebc16b2e 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/TrackerTargetBranchInputFactoryIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/issue/TrackerTargetBranchInputFactoryIT.java @@ -44,7 +44,7 @@ public class TrackerTargetBranchInputFactoryIT { private final static String ORIGINAL_COMPONENT_UUID = "uuid2"; @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final ComponentIssuesLoader componentIssuesLoader = mock(ComponentIssuesLoader.class); private final TargetBranchComponentUuids targetBranchComponentUuids = mock(TargetBranchComponentUuids.class); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/measure/MeasureRepositoryImplIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/measure/MeasureRepositoryImplIT.java index c9027fed4e3..5412d9a16f9 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/measure/MeasureRepositoryImplIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/measure/MeasureRepositoryImplIT.java @@ -67,7 +67,7 @@ public class MeasureRepositoryImplIT { @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); @Rule public BatchReportReaderRule reportReader = new BatchReportReaderRule(); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/metric/MetricRepositoryImplIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/metric/MetricRepositoryImplIT.java index 189eb10d7b4..5f0aecb379a 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/metric/MetricRepositoryImplIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/metric/MetricRepositoryImplIT.java @@ -38,7 +38,7 @@ public class MetricRepositoryImplIT { private static final String SOME_UUID = "uuid"; @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private DbClient dbClient = dbTester.getDbClient(); private MetricRepositoryImpl underTest = new MetricRepositoryImpl(dbClient); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/period/NewCodeReferenceBranchComponentUuidsIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/period/NewCodeReferenceBranchComponentUuidsIT.java index e3d8a739c52..6bf055de612 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/period/NewCodeReferenceBranchComponentUuidsIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/period/NewCodeReferenceBranchComponentUuidsIT.java @@ -44,7 +44,7 @@ public class NewCodeReferenceBranchComponentUuidsIT { @Rule public PeriodHolderRule periodHolder = new PeriodHolderRule(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private NewCodeReferenceBranchComponentUuids underTest = new NewCodeReferenceBranchComponentUuids(analysisMetadataHolder, periodHolder, db.getDbClient()); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/scm/ScmInfoDbLoaderIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/scm/ScmInfoDbLoaderIT.java index 17d60e3010c..c647e7f5bac 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/scm/ScmInfoDbLoaderIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/scm/ScmInfoDbLoaderIT.java @@ -69,7 +69,7 @@ public class ScmInfoDbLoaderIT { @Rule public AnalysisMetadataHolderRule analysisMetadataHolder = new AnalysisMetadataHolderRule(); @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); @Rule public BatchReportReaderRule reportReader = new BatchReportReaderRule(); @Rule diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/source/DbLineHashVersionIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/source/DbLineHashVersionIT.java index b7d7a1b061f..a72c0820d15 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/source/DbLineHashVersionIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/source/DbLineHashVersionIT.java @@ -37,7 +37,7 @@ import static org.mockito.Mockito.when; public class DbLineHashVersionIT { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final AnalysisMetadataHolder analysisMetadataHolder = mock(AnalysisMetadataHolder.class); private final ReferenceBranchComponentUuids referenceBranchComponentUuids = mock(ReferenceBranchComponentUuids.class); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/source/PersistFileSourcesStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/source/PersistFileSourcesStepIT.java index 0a2c41239c2..eb795c894ed 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/source/PersistFileSourcesStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/source/PersistFileSourcesStepIT.java @@ -66,7 +66,7 @@ public class PersistFileSourcesStepIT extends BaseStepTest { private final System2 system2 = mock(System2.class); @Rule - public DbTester dbTester = DbTester.create(system2, true); + public DbTester dbTester = DbTester.create(system2); @Rule public TreeRootHolderRule treeRootHolder = new TreeRootHolderRule(); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/BuildComponentTreeStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/BuildComponentTreeStepIT.java index 90dae4147fc..1f3ea60f944 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/BuildComponentTreeStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/BuildComponentTreeStepIT.java @@ -86,7 +86,7 @@ public class BuildComponentTreeStepIT { private static final long ANALYSIS_DATE = 123456789L; @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); @Rule public BatchReportReaderRule reportReader = new BatchReportReaderRule().setMetadata(createReportMetadata(NO_SCANNER_PROJECT_VERSION, NO_SCANNER_BUILD_STRING)); @Rule diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/CleanIssueChangesStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/CleanIssueChangesStepIT.java index 45cb83cc282..7911b15ac40 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/CleanIssueChangesStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/CleanIssueChangesStepIT.java @@ -32,7 +32,7 @@ import static org.assertj.core.api.Assertions.assertThat; public class CleanIssueChangesStepIT { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final IssueChangesToDeleteRepository repository = new IssueChangesToDeleteRepository(); private final CleanIssueChangesStep cleanIssueChangesStep = new CleanIssueChangesStep(repository, db.getDbClient()); private final TestComputationStepContext context = new TestComputationStepContext(); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/EnableAnalysisStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/EnableAnalysisStepIT.java index f92e394c9b4..e96c977b34d 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/EnableAnalysisStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/EnableAnalysisStepIT.java @@ -43,7 +43,7 @@ public class EnableAnalysisStepIT { private static final String CURRENT_ANALYSIS_UUID = "ANALYSIS_2"; @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); @Rule public TreeRootHolderRule treeRootHolder = new TreeRootHolderRule(); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/ExtractReportStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/ExtractReportStepIT.java index 73365564da5..ed2499f48ae 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/ExtractReportStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/ExtractReportStepIT.java @@ -55,7 +55,7 @@ public class ExtractReportStepIT { @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private MutableBatchReportDirectoryHolder reportDirectoryHolder = new BatchReportDirectoryHolderImpl(); private CeTask ceTask = new CeTask.Builder() diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/LoadCrossProjectDuplicationsRepositoryStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/LoadCrossProjectDuplicationsRepositoryStepIT.java index e1a812d52e9..58eb5d52083 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/LoadCrossProjectDuplicationsRepositoryStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/LoadCrossProjectDuplicationsRepositoryStepIT.java @@ -89,7 +89,7 @@ public class LoadCrossProjectDuplicationsRepositoryStepIT { private CrossProjectDuplicationStatusHolder crossProjectDuplicationStatusHolder = mock(CrossProjectDuplicationStatusHolder.class); @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private DbClient dbClient = dbTester.getDbClient(); private DbSession dbSession = dbTester.getSession(); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/LoadFileHashesAndStatusStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/LoadFileHashesAndStatusStepIT.java index 2f9c470a280..a81d08fab74 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/LoadFileHashesAndStatusStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/LoadFileHashesAndStatusStepIT.java @@ -43,7 +43,7 @@ import static org.mockito.Mockito.when; public class LoadFileHashesAndStatusStepIT { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public TreeRootHolderRule treeRootHolder = new TreeRootHolderRule(); public PreviousSourceHashRepositoryImpl previousFileHashesRepository = new PreviousSourceHashRepositoryImpl(); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/LoadPeriodsStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/LoadPeriodsStepIT.java index 768822c55b1..3b603c1c055 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/LoadPeriodsStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/LoadPeriodsStepIT.java @@ -76,7 +76,7 @@ import static org.sonar.db.event.EventTesting.newEvent; @RunWith(DataProviderRunner.class) public class LoadPeriodsStepIT extends BaseStepTest { @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); @Rule public TreeRootHolderRule treeRootHolder = new TreeRootHolderRule(); @Rule diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/LoadReportAnalysisMetadataHolderStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/LoadReportAnalysisMetadataHolderStepIT.java index 543b2874d46..5836586d0e6 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/LoadReportAnalysisMetadataHolderStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/LoadReportAnalysisMetadataHolderStepIT.java @@ -63,7 +63,7 @@ public class LoadReportAnalysisMetadataHolderStepIT { private static final long ANALYSIS_DATE = 123456789L; @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); @Rule public BatchReportReaderRule reportReader = new BatchReportReaderRule(); @Rule diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistAdHocRulesStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistAdHocRulesStepIT.java index 70c999b7947..85319db1187 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistAdHocRulesStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistAdHocRulesStepIT.java @@ -45,7 +45,7 @@ import static org.assertj.core.api.Assertions.assertThat; public class PersistAdHocRulesStepIT extends BaseStepTest { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private DbClient dbClient = db.getDbClient(); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistAnalysisPropertiesStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistAnalysisPropertiesStepIT.java index 104214d686a..0430fa3d8a3 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistAnalysisPropertiesStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistAnalysisPropertiesStepIT.java @@ -64,7 +64,7 @@ public class PersistAnalysisPropertiesStepIT { private static final String SCM_REV_ID = "sha1"; @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private BatchReportReader batchReportReader = mock(BatchReportReader.class); private AnalysisMetadataHolder analysisMetadataHolder = mock(AnalysisMetadataHolder.class); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistCrossProjectDuplicationIndexStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistCrossProjectDuplicationIndexStepIT.java index 5b09bf11a8b..003826e72ab 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistCrossProjectDuplicationIndexStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistCrossProjectDuplicationIndexStepIT.java @@ -69,7 +69,7 @@ public class PersistCrossProjectDuplicationIndexStepIT { private static final String BASE_ANALYSIS_UUID = "base analysis uuid"; @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); @Rule public BatchReportReaderRule reportReader = new BatchReportReaderRule(); @Rule diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistDuplicationDataStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistDuplicationDataStepIT.java index d1dc1027bfe..169fe2696a0 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistDuplicationDataStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistDuplicationDataStepIT.java @@ -59,7 +59,7 @@ public class PersistDuplicationDataStepIT extends BaseStepTest { private static final String FILE_2_UUID = "u3"; @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); @Rule public TreeRootHolderRule treeRootHolder = new TreeRootHolderRule() .setRoot( diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistEventsStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistEventsStepIT.java index 1fda6e1f294..2cafcaca9a1 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistEventsStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistEventsStepIT.java @@ -76,7 +76,7 @@ public class PersistEventsStepIT extends BaseStepTest { System2 system2 = mock(System2.class); @Rule - public DbTester dbTester = DbTester.create(system2, true); + public DbTester dbTester = DbTester.create(system2); @Rule public AnalysisMetadataHolderRule analysisMetadataHolder = new AnalysisMetadataHolderRule(); @Rule diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistIssuesStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistIssuesStepIT.java index dc141151410..4c97694f98b 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistIssuesStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistIssuesStepIT.java @@ -80,7 +80,7 @@ public class PersistIssuesStepIT extends BaseStepTest { @Rule public TemporaryFolder temp = new TemporaryFolder(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); @Rule public BatchReportReaderRule reportReader = new BatchReportReaderRule(); @Rule diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistLiveMeasuresStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistLiveMeasuresStepIT.java index 6f39071550a..f4829de256f 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistLiveMeasuresStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistLiveMeasuresStepIT.java @@ -73,7 +73,7 @@ public class PersistLiveMeasuresStepIT extends BaseStepTest { private static final int REF_4 = 4; @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); @Rule public TreeRootHolderRule treeRootHolder = new TreeRootHolderRule(); @Rule diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistMeasuresStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistMeasuresStepIT.java index 055c9376af1..6064b72700d 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistMeasuresStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistMeasuresStepIT.java @@ -64,7 +64,7 @@ public class PersistMeasuresStepIT extends BaseStepTest { private static final int REF_4 = 4; @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); @Rule public TreeRootHolderRule treeRootHolder = new TreeRootHolderRule(); @Rule diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistProjectLinksStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistProjectLinksStepIT.java index c0469bda4b8..2b30ff4359a 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistProjectLinksStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistProjectLinksStepIT.java @@ -60,7 +60,7 @@ public class PersistProjectLinksStepIT extends BaseStepTest { @Rule public AnalysisMetadataHolderRule analysisMetadataHolder = new AnalysisMetadataHolderRule(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); @Rule public TreeRootHolderRule treeRootHolder = new TreeRootHolderRule(); @Rule diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistPushEventsStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistPushEventsStepIT.java index c6c19834067..7cbd62ae3d0 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistPushEventsStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistPushEventsStepIT.java @@ -55,7 +55,7 @@ public class PersistPushEventsStepIT { private final TestSystem2 system2 = new TestSystem2().setNow(1L); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); public final PushEventFactory pushEventFactory = mock(PushEventFactory.class); @Rule diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistScannerAnalysisCacheStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistScannerAnalysisCacheStepIT.java index 33be7c2539d..b55016055cc 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistScannerAnalysisCacheStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistScannerAnalysisCacheStepIT.java @@ -41,7 +41,7 @@ public class PersistScannerAnalysisCacheStepIT { @Rule public BatchReportReaderRule reader = new BatchReportReaderRule(); @Rule - public DbTester dbTester = DbTester.create(true); + public DbTester dbTester = DbTester.create(); private final DbClient client = dbTester.getDbClient(); private final TreeRootHolderRule treeRootHolder = new TreeRootHolderRule(); private final PersistScannerAnalysisCacheStep step = new PersistScannerAnalysisCacheStep(reader, dbTester.getDbClient(), treeRootHolder); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistScannerContextStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistScannerContextStepIT.java index 75ffd3be6a2..d85d967f103 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistScannerContextStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistScannerContextStepIT.java @@ -42,7 +42,7 @@ public class PersistScannerContextStepIT { private static final String ANALYSIS_UUID = "UUID"; @ClassRule - public static final DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public static final DbTester dbTester = DbTester.create(System2.INSTANCE); @Rule public BatchReportReaderRule reportReader = new BatchReportReaderRule(); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/ProjectNclocComputationStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/ProjectNclocComputationStepIT.java index 86f55ee584c..d6c3845caaa 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/ProjectNclocComputationStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/ProjectNclocComputationStepIT.java @@ -27,7 +27,6 @@ import org.sonar.db.DbClient; import org.sonar.db.DbTester; import org.sonar.db.component.BranchDto; import org.sonar.db.component.BranchType; -import org.sonar.db.component.ComponentDto; import org.sonar.db.metric.MetricDto; import org.sonar.db.project.ProjectDto; import org.sonar.server.project.Project; @@ -38,7 +37,7 @@ import static org.sonar.api.measures.Metric.ValueType.INT; public class ProjectNclocComputationStepIT { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final DbClient dbClient = db.getDbClient(); @Rule diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/ReportPersistAnalysisStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/ReportPersistAnalysisStepIT.java index e7caa7ab9e3..d6f66880716 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/ReportPersistAnalysisStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/ReportPersistAnalysisStepIT.java @@ -54,7 +54,7 @@ public class ReportPersistAnalysisStepIT extends BaseStepTest { private static final String REVISION_ID = "5f6432a1"; @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); @Rule public TreeRootHolderRule treeRootHolder = new TreeRootHolderRule(); @Rule diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/ReportPersistComponentsStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/ReportPersistComponentsStepIT.java index 2875e742dcb..7dd7d3449c9 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/ReportPersistComponentsStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/ReportPersistComponentsStepIT.java @@ -67,7 +67,7 @@ public class ReportPersistComponentsStepIT extends BaseStepTest { private static final String PROJECT_KEY = "PROJECT_KEY"; @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); @Rule public TreeRootHolderRule treeRootHolder = new TreeRootHolderRule(); @Rule diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/SendIssueNotificationsStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/SendIssueNotificationsStepIT.java index 2c80401f8d8..c048f544747 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/SendIssueNotificationsStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/SendIssueNotificationsStepIT.java @@ -134,7 +134,7 @@ public class SendIssueNotificationsStepIT extends BaseStepTest { @Rule public TemporaryFolder temp = new TemporaryFolder(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final Random random = new Random(); private final RuleType[] RULE_TYPES_EXCEPT_HOTSPOTS = Stream.of(RuleType.values()).filter(r -> r != SECURITY_HOTSPOT).toArray(RuleType[]::new); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/UpdateNeedIssueSyncStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/UpdateNeedIssueSyncStepIT.java index ec67cdc0a76..99ef5311432 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/UpdateNeedIssueSyncStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/UpdateNeedIssueSyncStepIT.java @@ -37,7 +37,7 @@ public class UpdateNeedIssueSyncStepIT { private static final Component PROJECT = ReportComponent.DUMB_PROJECT; @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); @Rule public TreeRootHolderRule treeRootHolder = new TreeRootHolderRule().setRoot(PROJECT); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/UpdateQualityProfilesLastUsedDateStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/UpdateQualityProfilesLastUsedDateStepIT.java index aac33312e66..69bcb33dbb2 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/UpdateQualityProfilesLastUsedDateStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/UpdateQualityProfilesLastUsedDateStepIT.java @@ -58,7 +58,7 @@ public class UpdateQualityProfilesLastUsedDateStepIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); @Rule public AnalysisMetadataHolderRule analysisMetadataHolder = new AnalysisMetadataHolderRule().setAnalysisDate(ANALYSIS_DATE); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/ValidateProjectStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/ValidateProjectStepIT.java index ca99be5ec18..bdb52642505 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/ValidateProjectStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/ValidateProjectStepIT.java @@ -52,7 +52,7 @@ public class ValidateProjectStepIT { static final Branch DEFAULT_BRANCH = new DefaultBranchImpl(DEFAULT_MAIN_BRANCH_NAME); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); @Rule public TreeRootHolderRule treeRootHolder = new TreeRootHolderRule(); @Rule diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/ViewsPersistAnalysisStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/ViewsPersistAnalysisStepIT.java index 4c28414e9b3..2b07a07158c 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/ViewsPersistAnalysisStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/ViewsPersistAnalysisStepIT.java @@ -53,7 +53,7 @@ public class ViewsPersistAnalysisStepIT extends BaseStepTest { private static final String ANALYSIS_UUID = "U1"; @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); @Rule public TreeRootHolderRule treeRootHolder = new TreeRootHolderRule(); @Rule diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/ViewsPersistComponentsStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/ViewsPersistComponentsStepIT.java index bd047c767ed..1972a83bb76 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/ViewsPersistComponentsStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/ViewsPersistComponentsStepIT.java @@ -46,7 +46,6 @@ import org.sonar.ce.task.step.ComputationStep; import org.sonar.ce.task.step.TestComputationStepContext; import org.sonar.db.DbClient; import org.sonar.db.DbTester; -import org.sonar.db.component.ComponentDbTester; import org.sonar.db.component.ComponentDto; import org.sonar.db.component.ComponentTesting; @@ -80,7 +79,7 @@ public class ViewsPersistComponentsStepIT extends BaseStepTest { private static final String PROJECT_VIEW_1_UUID = "PV1_UUID"; @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); @Rule public TreeRootHolderRule treeRootHolder = new TreeRootHolderRule(); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/taskprocessor/AuditPurgeStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/taskprocessor/AuditPurgeStepIT.java index 683dc2e9cd4..e24e30454ca 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/taskprocessor/AuditPurgeStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/taskprocessor/AuditPurgeStepIT.java @@ -51,14 +51,14 @@ public class AuditPurgeStepIT { .setValue(MONTHLY.name()); @Rule - public final DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public final DbTester dbTester = DbTester.create(System2.INSTANCE); private final DbClient dbClient = dbTester.getDbClient(); private final System2 system2 = new System2(); @Rule - public final DbTester db = DbTester.create(system2, true); + public final DbTester db = DbTester.create(system2); private final AuditHousekeepingFrequencyHelper auditHousekeepingFrequencyHelper = mock(AuditHousekeepingFrequencyHelper.class); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/taskprocessor/IgnoreOrphanBranchStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/taskprocessor/IgnoreOrphanBranchStepIT.java index 79eeea41d04..495476db7ff 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/taskprocessor/IgnoreOrphanBranchStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/taskprocessor/IgnoreOrphanBranchStepIT.java @@ -37,7 +37,7 @@ public class IgnoreOrphanBranchStepIT { private final String BRANCH_UUID = "branch_uuid"; @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private final CeTask.Component entity = new CeTask.Component(ENTITY_UUID, "component key", "component name"); private final CeTask.Component component = new CeTask.Component(BRANCH_UUID, "component key", "component name"); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/taskprocessor/IndexIssuesStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/taskprocessor/IndexIssuesStepIT.java index fe3cbb234b5..007ffd44a98 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/taskprocessor/IndexIssuesStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/taskprocessor/IndexIssuesStepIT.java @@ -42,7 +42,7 @@ public class IndexIssuesStepIT { private final String BRANCH_UUID = "branch_uuid"; @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private final DbClient dbClient = dbTester.getDbClient(); private final CeTask.Component entity = new CeTask.Component(ENTITY_UUID, "component key", "component name"); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/analysis/ExportAnalysesStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/analysis/ExportAnalysesStepIT.java index 99176b7efae..7cd38451189 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/analysis/ExportAnalysesStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/analysis/ExportAnalysesStepIT.java @@ -96,7 +96,7 @@ public class ExportAnalysesStepIT { .setBranchUuid(PROJECT_UUID); @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); @Rule public LogTester logTester = new LogTester(); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/branches/ExportBranchesStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/branches/ExportBranchesStepIT.java index 662525f15e3..9c82b10856b 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/branches/ExportBranchesStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/branches/ExportBranchesStepIT.java @@ -30,8 +30,6 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.slf4j.event.Level; -import org.sonar.api.resources.Qualifiers; -import org.sonar.api.resources.Scopes; import org.sonar.api.testfixtures.log.LogTester; import org.sonar.api.utils.System2; import org.sonar.ce.task.projectexport.steps.DumpElement; @@ -41,7 +39,6 @@ import org.sonar.ce.task.step.TestComputationStepContext; import org.sonar.db.DbTester; import org.sonar.db.component.BranchDto; import org.sonar.db.component.BranchType; -import org.sonar.db.component.ComponentDto; import org.sonar.db.component.ProjectData; import org.sonar.db.project.ProjectExportMapper; @@ -50,13 +47,12 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -import static org.sonar.db.component.ComponentDto.UUID_PATH_OF_ROOT; public class ExportBranchesStepIT { private static final String PROJECT_UUID = "PROJECT_UUID"; @Rule - public DbTester dbTester = DbTester.createWithExtensionMappers(System2.INSTANCE, true, ProjectExportMapper.class); + public DbTester dbTester = DbTester.createWithExtensionMappers(System2.INSTANCE, ProjectExportMapper.class); @Rule public LogTester logTester = new LogTester(); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/component/ExportComponentsStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/component/ExportComponentsStepIT.java index dd9913cca8a..67a2285b2f5 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/component/ExportComponentsStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/component/ExportComponentsStepIT.java @@ -78,7 +78,7 @@ public class ExportComponentsStepIT { .setBranchUuid(PROJECT_UUID); @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); @Rule public LogTester logTester = new LogTester(); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/file/ExportLineHashesStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/file/ExportLineHashesStepIT.java index 6e63b776cc3..27ec83ba6a0 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/file/ExportLineHashesStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/file/ExportLineHashesStepIT.java @@ -55,7 +55,7 @@ public class ExportLineHashesStepIT { private static final String FILE_UUID_2 = "file-2-uuid"; @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); @Rule public LogTester logTester = new LogTester(); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/issue/ExportIssuesChangelogStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/issue/ExportIssuesChangelogStepIT.java index 94ff9c8d49d..96d35ff7aeb 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/issue/ExportIssuesChangelogStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/issue/ExportIssuesChangelogStepIT.java @@ -38,11 +38,9 @@ import org.sonar.db.DbClient; import org.sonar.db.DbSession; import org.sonar.db.DbTester; import org.sonar.db.component.BranchDto; -import org.sonar.db.component.BranchType; import org.sonar.db.component.ProjectData; import org.sonar.db.issue.IssueChangeDto; import org.sonar.db.issue.IssueDto; -import org.sonar.db.project.ProjectDto; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; @@ -63,7 +61,7 @@ public class ExportIssuesChangelogStepIT { private static final String ISSUE_CLOSED_UUID = "issue closed uuid"; @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); @Rule public LogTester logTester = new LogTester(); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/issue/ExportIssuesStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/issue/ExportIssuesStepIT.java index 93e23a07e27..af669dcc260 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/issue/ExportIssuesStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/issue/ExportIssuesStepIT.java @@ -83,7 +83,7 @@ public class ExportIssuesStepIT { public static final DbIssues.MessageFormatting MESSAGE_FORMATTING = DbIssues.MessageFormatting.newBuilder().setStart(0).setEnd(4).setType(MessageFormattingType.CODE).build(); @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); @Rule public LogTester logTester = new LogTester(); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/rule/ExportAdHocRulesStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/rule/ExportAdHocRulesStepIT.java index 6b4bd209228..0490a7dd965 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/rule/ExportAdHocRulesStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/rule/ExportAdHocRulesStepIT.java @@ -28,8 +28,6 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.slf4j.event.Level; -import org.sonar.api.resources.Qualifiers; -import org.sonar.api.resources.Scopes; import org.sonar.api.rule.RuleKey; import org.sonar.api.rule.RuleStatus; import org.sonar.api.rule.Severity; @@ -53,7 +51,6 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -import static org.sonar.db.component.ComponentDto.UUID_PATH_OF_ROOT; public class ExportAdHocRulesStepIT { private static final String PROJECT_UUID = "some-uuid"; @@ -67,7 +64,7 @@ public class ExportAdHocRulesStepIT { @Rule public LogTester logTester = new LogTester(); @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private int issueUuidGenerator = 1; private ComponentDto mainBranch; diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/steps/ExportEventsStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/steps/ExportEventsStepIT.java index d96797304a1..806c6975c76 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/steps/ExportEventsStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/steps/ExportEventsStepIT.java @@ -58,7 +58,7 @@ public class ExportEventsStepIT { @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); @Rule public LogTester logTester = new LogTester(); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/steps/ExportLinksStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/steps/ExportLinksStepIT.java index 693621a22ff..dc89786b68d 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/steps/ExportLinksStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/steps/ExportLinksStepIT.java @@ -46,7 +46,7 @@ public class ExportLinksStepIT { private ProjectDto projectDto; @Rule - public DbTester db = DbTester.createWithExtensionMappers(System2.INSTANCE, true, ProjectExportMapper.class); + public DbTester db = DbTester.createWithExtensionMappers(System2.INSTANCE, ProjectExportMapper.class); @Rule public LogTester logTester = new LogTester(); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/steps/ExportLiveMeasuresStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/steps/ExportLiveMeasuresStepIT.java index a8a874f1b4f..bcb54787f39 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/steps/ExportLiveMeasuresStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/steps/ExportLiveMeasuresStepIT.java @@ -47,7 +47,7 @@ public class ExportLiveMeasuresStepIT { @Rule public LogTester logTester = new LogTester(); @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private final ComponentRepositoryImpl componentRepository = new ComponentRepositoryImpl(); private final MutableMetricRepository metricRepository = new MutableMetricRepositoryImpl(); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/steps/ExportMeasuresStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/steps/ExportMeasuresStepIT.java index 86c0c0387e0..9f3b3da287a 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/steps/ExportMeasuresStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/steps/ExportMeasuresStepIT.java @@ -97,7 +97,7 @@ public class ExportMeasuresStepIT { public LogTester logTester = new LogTester(); @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private ComponentRepositoryImpl componentRepository = new ComponentRepositoryImpl(); private MutableMetricRepository metricRepository = new MutableMetricRepositoryImpl(); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/steps/ExportMetricsStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/steps/ExportMetricsStepIT.java index 325d91d1fd9..4304b5fc353 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/steps/ExportMetricsStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/steps/ExportMetricsStepIT.java @@ -52,7 +52,7 @@ public class ExportMetricsStepIT { public LogTester logTester = new LogTester(); @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); MutableMetricRepository metricsHolder = new MutableMetricRepositoryImpl(); FakeDumpWriter dumpWriter = new FakeDumpWriter(); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/steps/ExportNewCodePeriodsStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/steps/ExportNewCodePeriodsStepIT.java index c2921880f7b..02e7f87db13 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/steps/ExportNewCodePeriodsStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/steps/ExportNewCodePeriodsStepIT.java @@ -75,7 +75,7 @@ public class ExportNewCodePeriodsStepIT { @Rule public LogTester logTester = new LogTester(); @Rule - public DbTester dbTester = DbTester.createWithExtensionMappers(System2.INSTANCE, true, ProjectExportMapper.class); + public DbTester dbTester = DbTester.createWithExtensionMappers(System2.INSTANCE, ProjectExportMapper.class); private MutableProjectHolder projectHolder = new MutableProjectHolderImpl(); private FakeDumpWriter dumpWriter = new FakeDumpWriter(); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/steps/ExportSettingsStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/steps/ExportSettingsStepIT.java index e41a08af8d2..a4ad1058d47 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/steps/ExportSettingsStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/steps/ExportSettingsStepIT.java @@ -29,12 +29,9 @@ import org.slf4j.event.Level; import org.sonar.api.resources.Qualifiers; import org.sonar.api.testfixtures.log.LogTester; import org.sonar.api.utils.System2; -import org.sonar.ce.task.projectexport.component.ComponentRepositoryImpl; -import org.sonar.ce.task.projectexport.component.MutableComponentRepository; import org.sonar.ce.task.step.TestComputationStepContext; import org.sonar.db.DbTester; import org.sonar.db.component.ComponentDto; -import org.sonar.db.component.ProjectData; import org.sonar.db.entity.EntityDto; import org.sonar.db.project.ProjectDto; import org.sonar.db.project.ProjectExportMapper; @@ -60,7 +57,7 @@ public class ExportSettingsStepIT { @Rule public LogTester logTester = new LogTester(); @Rule - public DbTester dbTester = DbTester.createWithExtensionMappers(System2.INSTANCE, true, ProjectExportMapper.class); + public DbTester dbTester = DbTester.createWithExtensionMappers(System2.INSTANCE, ProjectExportMapper.class); private final MutableProjectHolder projectHolder = new MutableProjectHolderImpl(); private final FakeDumpWriter dumpWriter = new FakeDumpWriter(); private final ExportSettingsStep underTest = new ExportSettingsStep(dbTester.getDbClient(), projectHolder, dumpWriter); diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/steps/LoadProjectStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/steps/LoadProjectStepIT.java index 5fce2aafedb..29e1180b6fc 100644 --- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/steps/LoadProjectStepIT.java +++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/steps/LoadProjectStepIT.java @@ -37,7 +37,7 @@ public class LoadProjectStepIT { private static final String PROJECT_KEY = "project_key"; @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private final ProjectDescriptor descriptor = new ProjectDescriptor("project_uuid", PROJECT_KEY, "Project Name"); private final MutableProjectHolder definitionHolder = new MutableProjectHolderImpl(); diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/analysis/ProjectConfigurationFactoryTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/analysis/ProjectConfigurationFactoryTest.java index 4c283773e12..c70c6545bcb 100644 --- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/analysis/ProjectConfigurationFactoryTest.java +++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/analysis/ProjectConfigurationFactoryTest.java @@ -31,7 +31,7 @@ import static org.sonar.db.property.PropertyTesting.newComponentPropertyDto; public class ProjectConfigurationFactoryTest { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final MapSettings settings = new MapSettings(); private final ProjectConfigurationFactory underTest = new ProjectConfigurationFactory(settings, db.getDbClient()); diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/component/ConfigurationRepositoryTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/component/ConfigurationRepositoryTest.java index c52c58c866b..56570aba1d3 100644 --- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/component/ConfigurationRepositoryTest.java +++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/component/ConfigurationRepositoryTest.java @@ -39,7 +39,7 @@ import static org.sonar.db.component.ComponentTesting.newPrivateProjectDto; public class ConfigurationRepositoryTest { @Rule - public final DbTester db = DbTester.create(System2.INSTANCE, true); + public final DbTester db = DbTester.create(System2.INSTANCE); @Rule public AnalysisMetadataHolderRule analysisMetadataHolder = new AnalysisMetadataHolderRule(); diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/PullRequestSourceBranchMergerTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/PullRequestSourceBranchMergerTest.java index 76283d740a2..b8214e4fdec 100644 --- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/PullRequestSourceBranchMergerTest.java +++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/PullRequestSourceBranchMergerTest.java @@ -73,7 +73,7 @@ public class PullRequestSourceBranchMergerTest { private NonClosedTracking<DefaultIssue, DefaultIssue> prTracking; @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private PullRequestSourceBranchMerger underTest; private RuleDto rule; diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/RuleRepositoryImplTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/RuleRepositoryImplTest.java index e910496ad99..59498fe155a 100644 --- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/RuleRepositoryImplTest.java +++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/RuleRepositoryImplTest.java @@ -66,7 +66,7 @@ public class RuleRepositoryImplTest { @org.junit.Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private DbClient dbClient = mock(DbClient.class); private DbSession dbSession = mock(DbSession.class); diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/measure/MapBasedRawMeasureRepositoryTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/measure/MapBasedRawMeasureRepositoryTest.java index 57f8c1f5ea9..6d1988ff476 100644 --- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/measure/MapBasedRawMeasureRepositoryTest.java +++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/measure/MapBasedRawMeasureRepositoryTest.java @@ -51,7 +51,7 @@ import static org.mockito.Mockito.when; @RunWith(DataProviderRunner.class) public class MapBasedRawMeasureRepositoryTest { @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private static final String FILE_COMPONENT_KEY = "file cpt key"; private static final ReportComponent FILE_COMPONENT = ReportComponent.builder(Component.Type.FILE, 1) diff --git a/server/sonar-ce-task/src/it/java/org/sonar/ce/task/log/CeTaskMessagesImplIT.java b/server/sonar-ce-task/src/it/java/org/sonar/ce/task/log/CeTaskMessagesImplIT.java index 22ad11a1512..aab0384acf5 100644 --- a/server/sonar-ce-task/src/it/java/org/sonar/ce/task/log/CeTaskMessagesImplIT.java +++ b/server/sonar-ce-task/src/it/java/org/sonar/ce/task/log/CeTaskMessagesImplIT.java @@ -48,7 +48,7 @@ import static org.mockito.Mockito.when; public class CeTaskMessagesImplIT { @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private DbClient dbClient = dbTester.getDbClient(); private UuidFactory uuidFactory = mock(UuidFactory.class); diff --git a/server/sonar-ce/src/it/java/org/sonar/ce/analysis/cache/cleaning/AnalysisCacheCleaningSchedulerImplIT.java b/server/sonar-ce/src/it/java/org/sonar/ce/analysis/cache/cleaning/AnalysisCacheCleaningSchedulerImplIT.java index 2b049fe59fe..fe6683c7753 100644 --- a/server/sonar-ce/src/it/java/org/sonar/ce/analysis/cache/cleaning/AnalysisCacheCleaningSchedulerImplIT.java +++ b/server/sonar-ce/src/it/java/org/sonar/ce/analysis/cache/cleaning/AnalysisCacheCleaningSchedulerImplIT.java @@ -47,7 +47,7 @@ public class AnalysisCacheCleaningSchedulerImplIT { private System2 system2 = mock(System2.class); private final static UuidFactory uuidFactory = new SequenceUuidFactory(); @Rule - public DbTester dbTester = DbTester.create(system2, true); + public DbTester dbTester = DbTester.create(system2); private DbSession dbSession = dbTester.getSession(); private ScannerAnalysisCacheDao scannerAnalysisCacheDao = dbTester.getDbClient().scannerAnalysisCacheDao(); diff --git a/server/sonar-ce/src/it/java/org/sonar/ce/container/ComputeEngineContainerImplIT.java b/server/sonar-ce/src/it/java/org/sonar/ce/container/ComputeEngineContainerImplIT.java index 529c1478a45..8a57a3f413a 100644 --- a/server/sonar-ce/src/it/java/org/sonar/ce/container/ComputeEngineContainerImplIT.java +++ b/server/sonar-ce/src/it/java/org/sonar/ce/container/ComputeEngineContainerImplIT.java @@ -62,7 +62,7 @@ public class ComputeEngineContainerImplIT { public TemporaryFolder tempFolder = new TemporaryFolder(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final ServiceLoaderWrapper serviceLoaderWrapper = mock(ServiceLoaderWrapper.class); private final ProcessProperties processProperties = new ProcessProperties(serviceLoaderWrapper); diff --git a/server/sonar-ce/src/it/java/org/sonar/ce/monitoring/CeDatabaseMBeanImplIT.java b/server/sonar-ce/src/it/java/org/sonar/ce/monitoring/CeDatabaseMBeanImplIT.java index 5d1e6df57bb..8f43bd9b081 100644 --- a/server/sonar-ce/src/it/java/org/sonar/ce/monitoring/CeDatabaseMBeanImplIT.java +++ b/server/sonar-ce/src/it/java/org/sonar/ce/monitoring/CeDatabaseMBeanImplIT.java @@ -37,7 +37,7 @@ import static org.assertj.core.api.Assertions.assertThat; public class CeDatabaseMBeanImplIT { @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private final CeDatabaseMBeanImpl underTest = new CeDatabaseMBeanImpl(dbTester.getDbClient()); diff --git a/server/sonar-ce/src/it/java/org/sonar/ce/notification/ReportAnalysisFailureNotificationExecutionListenerIT.java b/server/sonar-ce/src/it/java/org/sonar/ce/notification/ReportAnalysisFailureNotificationExecutionListenerIT.java index 5e9f98b99b0..843fb7688b2 100644 --- a/server/sonar-ce/src/it/java/org/sonar/ce/notification/ReportAnalysisFailureNotificationExecutionListenerIT.java +++ b/server/sonar-ce/src/it/java/org/sonar/ce/notification/ReportAnalysisFailureNotificationExecutionListenerIT.java @@ -65,7 +65,7 @@ import static org.sonar.db.component.ComponentTesting.newDirectory; public class ReportAnalysisFailureNotificationExecutionListenerIT { @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private final Random random = new Random(); private final DbClient dbClient = dbTester.getDbClient(); diff --git a/server/sonar-ce/src/it/java/org/sonar/ce/queue/InternalCeQueueImplIT.java b/server/sonar-ce/src/it/java/org/sonar/ce/queue/InternalCeQueueImplIT.java index a5e7cc459ee..48d5f440f85 100644 --- a/server/sonar-ce/src/it/java/org/sonar/ce/queue/InternalCeQueueImplIT.java +++ b/server/sonar-ce/src/it/java/org/sonar/ce/queue/InternalCeQueueImplIT.java @@ -76,7 +76,7 @@ public class InternalCeQueueImplIT { private final System2 system2 = new AlwaysIncreasingSystem2(); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); private final DbSession session = db.getSession(); private final UuidFactory uuidFactory = UuidFactoryImpl.INSTANCE; diff --git a/server/sonar-ce/src/it/java/org/sonar/ce/queue/NextPendingTaskPickerIT.java b/server/sonar-ce/src/it/java/org/sonar/ce/queue/NextPendingTaskPickerIT.java index 4b90610038d..e4cda8dc5e1 100644 --- a/server/sonar-ce/src/it/java/org/sonar/ce/queue/NextPendingTaskPickerIT.java +++ b/server/sonar-ce/src/it/java/org/sonar/ce/queue/NextPendingTaskPickerIT.java @@ -58,7 +58,7 @@ public class NextPendingTaskPickerIT { private NextPendingTaskPicker underTest; @Rule - public DbTester db = DbTester.create(alwaysIncreasingSystem2, true); + public DbTester db = DbTester.create(alwaysIncreasingSystem2); @Before public void before() { diff --git a/server/sonar-ce/src/it/java/org/sonar/ce/taskprocessor/CeWorkerImplIT.java b/server/sonar-ce/src/it/java/org/sonar/ce/taskprocessor/CeWorkerImplIT.java index 5081a7e27d1..1fbc8fd3a47 100644 --- a/server/sonar-ce/src/it/java/org/sonar/ce/taskprocessor/CeWorkerImplIT.java +++ b/server/sonar-ce/src/it/java/org/sonar/ce/taskprocessor/CeWorkerImplIT.java @@ -85,7 +85,7 @@ public class CeWorkerImplIT { @Rule public LogTester logTester = new LogTester(); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); private DbSession session = db.getSession(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/DatabaseMBeanIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/DatabaseMBeanIT.java index 61e153585a1..9833b929e6e 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/DatabaseMBeanIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/DatabaseMBeanIT.java @@ -29,7 +29,7 @@ import static org.assertj.core.api.Assertions.assertThat; public class DatabaseMBeanIT { @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private final FakeDatabaseMBean underTest = new FakeDatabaseMBean(dbTester.getDbClient()); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/IsAliveMapperIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/IsAliveMapperIT.java index e1df72893f0..bd884247291 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/IsAliveMapperIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/IsAliveMapperIT.java @@ -29,7 +29,7 @@ import static org.assertj.core.api.Assertions.assertThat; public class IsAliveMapperIT { @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private DbSession session; private IsAliveMapper underTest; diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/alm/pat/AlmPatDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/alm/pat/AlmPatDaoIT.java index d946fe20cf4..54f1c370254 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/alm/pat/AlmPatDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/alm/pat/AlmPatDaoIT.java @@ -43,7 +43,7 @@ public class AlmPatDaoIT { private static final String A_UUID = "SOME_UUID"; private TestSystem2 system2 = new TestSystem2().setNow(NOW); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); private DbSession dbSession = db.getSession(); private UuidFactory uuidFactory = mock(UuidFactory.class); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/alm/pat/AlmPatDaoWithPersisterIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/alm/pat/AlmPatDaoWithPersisterIT.java index e59c73a8884..749f61cd827 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/alm/pat/AlmPatDaoWithPersisterIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/alm/pat/AlmPatDaoWithPersisterIT.java @@ -51,7 +51,7 @@ public class AlmPatDaoWithPersisterIT { private final ArgumentCaptor<PersonalAccessTokenNewValue> newValueCaptor = ArgumentCaptor.forClass(PersonalAccessTokenNewValue.class); private final TestSystem2 system2 = new TestSystem2().setNow(NOW); @Rule - public DbTester db = DbTester.create(system2, auditPersister, true); + public DbTester db = DbTester.create(system2, auditPersister); private final DbSession dbSession = db.getSession(); private final UuidFactory uuidFactory = mock(UuidFactory.class); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/alm/setting/AlmSettingDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/alm/setting/AlmSettingDaoIT.java index a49c2d5c6d4..74a255ce3f2 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/alm/setting/AlmSettingDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/alm/setting/AlmSettingDaoIT.java @@ -48,7 +48,7 @@ public class AlmSettingDaoIT { private final TestSystem2 system2 = new TestSystem2().setNow(NOW); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); private final DbSession dbSession = db.getSession(); private final UuidFactory uuidFactory = mock(UuidFactory.class); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/alm/setting/AlmSettingDaoWithPersisterIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/alm/setting/AlmSettingDaoWithPersisterIT.java index e640d70cb94..a4cafdfec14 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/alm/setting/AlmSettingDaoWithPersisterIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/alm/setting/AlmSettingDaoWithPersisterIT.java @@ -46,7 +46,7 @@ public class AlmSettingDaoWithPersisterIT { private final AuditPersister auditPersister = mock(AuditPersister.class); private final TestSystem2 system2 = new TestSystem2().setNow(NOW); @Rule - public final DbTester db = DbTester.create(system2, auditPersister, true); + public final DbTester db = DbTester.create(system2, auditPersister); private final DbSession dbSession = db.getSession(); private final UuidFactory uuidFactory = mock(UuidFactory.class); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/alm/setting/ProjectAlmSettingDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/alm/setting/ProjectAlmSettingDaoIT.java index 0bd6221d65e..b65cf1203a2 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/alm/setting/ProjectAlmSettingDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/alm/setting/ProjectAlmSettingDaoIT.java @@ -45,7 +45,7 @@ public class ProjectAlmSettingDaoIT { private static final String A_UUID = "SOME_UUID"; private TestSystem2 system2 = new TestSystem2().setNow(A_DATE); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); private DbSession dbSession = db.getSession(); private UuidFactory uuidFactory = mock(UuidFactory.class); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/alm/setting/ProjectAlmSettingDaoWithPersisterIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/alm/setting/ProjectAlmSettingDaoWithPersisterIT.java index 8d288e81521..01c6cc9958f 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/alm/setting/ProjectAlmSettingDaoWithPersisterIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/alm/setting/ProjectAlmSettingDaoWithPersisterIT.java @@ -49,7 +49,7 @@ public class ProjectAlmSettingDaoWithPersisterIT { private final TestSystem2 system2 = new TestSystem2().setNow(A_DATE); @Rule - public final DbTester db = DbTester.create(system2, auditPersister, true); + public final DbTester db = DbTester.create(system2, auditPersister); private final DbSession dbSession = db.getSession(); private final UuidFactory uuidFactory = UuidFactoryFast.getInstance(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/audit/AuditDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/audit/AuditDaoIT.java index 0768acfe4d4..8d24f0a3d6f 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/audit/AuditDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/audit/AuditDaoIT.java @@ -36,7 +36,7 @@ public class AuditDaoIT { private static final long NOW = 1000000L; private final TestSystem2 system2 = new TestSystem2().setNow(NOW); @Rule - public final DbTester db = DbTester.create(system2, true); + public final DbTester db = DbTester.create(system2); private final DbSession dbSession = db.getSession(); private final AuditDao testAuditDao = new AuditDao(system2, UuidFactoryImpl.INSTANCE); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/ce/CeActivityDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/ce/CeActivityDaoIT.java index d1ef75eaa47..bcd4c1160d7 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/ce/CeActivityDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/ce/CeActivityDaoIT.java @@ -77,7 +77,7 @@ public class CeActivityDaoIT { private final TestSystem2 system2 = new TestSystem2().setNow(INITIAL_TIME); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); private final DbSession dbSession = db.getSession(); private final CeActivityDao underTest = new CeActivityDao(system2); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/ce/CeQueueDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/ce/CeQueueDaoIT.java index c1a810e5609..6546c6c9c82 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/ce/CeQueueDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/ce/CeQueueDaoIT.java @@ -70,7 +70,7 @@ public class CeQueueDaoIT { private final TestSystem2 system2 = new TestSystem2().setNow(INIT_TIME); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); private final System2 mockedSystem2 = mock(System2.class); private final System2 alwaysIncreasingSystem2 = new AlwaysIncreasingSystem2(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/ce/CeScannerContextDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/ce/CeScannerContextDaoIT.java index 641271062cb..fd4a08e33fd 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/ce/CeScannerContextDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/ce/CeScannerContextDaoIT.java @@ -39,7 +39,7 @@ public class CeScannerContextDaoIT { private static final String SOME_UUID = "some UUID"; @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private System2 system = mock(System2.class); private DbSession dbSession = dbTester.getSession(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/ce/CeTaskCharacteristicDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/ce/CeTaskCharacteristicDaoIT.java index cc1800ed796..cbe03fe8502 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/ce/CeTaskCharacteristicDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/ce/CeTaskCharacteristicDaoIT.java @@ -33,7 +33,7 @@ import static org.assertj.core.api.Assertions.tuple; public class CeTaskCharacteristicDaoIT { @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private CeTaskCharacteristicDao underTest = new CeTaskCharacteristicDao(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/ce/CeTaskInputDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/ce/CeTaskInputDaoIT.java index ef329da1589..85adf4ea88f 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/ce/CeTaskInputDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/ce/CeTaskInputDaoIT.java @@ -43,7 +43,7 @@ public class CeTaskInputDaoIT { private static final String TABLE_NAME = "ce_task_input"; @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private System2 system = mock(System2.class); private CeTaskInputDao underTest = new CeTaskInputDao(system); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/ce/CeTaskMessageDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/ce/CeTaskMessageDaoIT.java index b79c3e9f842..0e5b6a295e7 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/ce/CeTaskMessageDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/ce/CeTaskMessageDaoIT.java @@ -34,7 +34,7 @@ import static org.assertj.core.api.Assertions.assertThat; public class CeTaskMessageDaoIT { @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private final CeTaskMessageDao underTest = new CeTaskMessageDao(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/component/AnalysisPropertiesDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/component/AnalysisPropertiesDaoIT.java index f76141792cb..91824d52da4 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/component/AnalysisPropertiesDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/component/AnalysisPropertiesDaoIT.java @@ -40,7 +40,7 @@ public class AnalysisPropertiesDaoIT { private static final long NOW = 1_000L; @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private final System2 system2 = new TestSystem2().setNow(NOW); private final DbSession dbSession = dbTester.getSession(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/component/ApplicationProjectsDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/component/ApplicationProjectsDaoIT.java index cc2d83834d2..bca6d6fa35b 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/component/ApplicationProjectsDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/component/ApplicationProjectsDaoIT.java @@ -34,7 +34,7 @@ import static org.assertj.core.api.Assertions.assertThat; public class ApplicationProjectsDaoIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final UuidFactoryFast uuids = UuidFactoryFast.getInstance(); private final TestSystem2 system2 = new TestSystem2(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/component/BranchDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/component/BranchDaoIT.java index 470db8bc36d..00f5a7da55a 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/component/BranchDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/component/BranchDaoIT.java @@ -66,7 +66,7 @@ public class BranchDaoIT { private System2 system2 = new TestSystem2().setNow(NOW); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); private DbSession dbSession = db.getSession(); private BranchDao underTest = new BranchDao(system2); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/component/ComponentDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/component/ComponentDaoIT.java index b9bf0001785..06126c6386d 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/component/ComponentDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/component/ComponentDaoIT.java @@ -108,7 +108,7 @@ public class ComponentDaoIT { private final System2 system2 = new AlwaysIncreasingSystem2(1000L); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); private final AuditPersister auditPersister = mock(AuditPersister.class); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/component/ComponentKeyUpdaterDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/component/ComponentKeyUpdaterDaoIT.java index d1250315390..0f0d79ae100 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/component/ComponentKeyUpdaterDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/component/ComponentKeyUpdaterDaoIT.java @@ -49,7 +49,7 @@ import static org.sonar.db.component.ComponentTesting.newPrivateProjectDto; public class ComponentKeyUpdaterDaoIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final AuditPersister auditPersister = mock(AuditPersister.class); private final DbClient dbClient = db.getDbClient(); private final DbSession dbSession = db.getSession(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/component/ProjectLinkDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/component/ProjectLinkDaoIT.java index f438c73ca38..be6a4f493e9 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/component/ProjectLinkDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/component/ProjectLinkDaoIT.java @@ -39,7 +39,7 @@ public class ProjectLinkDaoIT { private System2 system2 = new TestSystem2().setNow(NOW); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); private ProjectLinkDao underTest = db.getDbClient().projectLinkDao(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/component/ScrollForFileMoveComponentDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/component/ScrollForFileMoveComponentDaoIT.java index 54bd6dd44fc..6cf2cba89f1 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/component/ScrollForFileMoveComponentDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/component/ScrollForFileMoveComponentDaoIT.java @@ -46,7 +46,7 @@ import static org.sonar.api.resources.Qualifiers.UNIT_TEST_FILE; @RunWith(DataProviderRunner.class) public class ScrollForFileMoveComponentDaoIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private Random random = new Random(); private DbSession dbSession = db.getSession(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/component/SnapshotDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/component/SnapshotDaoIT.java index 9193c7b86a6..db10753d79c 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/component/SnapshotDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/component/SnapshotDaoIT.java @@ -65,7 +65,7 @@ import static org.sonar.db.component.SnapshotTesting.newAnalysis; public class SnapshotDaoIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final DbClient dbClient = db.getDbClient(); private final DbSession dbSession = db.getSession(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/duplication/DuplicationDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/duplication/DuplicationDaoIT.java index b5d89740698..f69c74cbbd8 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/duplication/DuplicationDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/duplication/DuplicationDaoIT.java @@ -42,7 +42,7 @@ import static org.sonar.db.component.ComponentTesting.newPrivateProjectDto; public class DuplicationDaoIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final DbSession dbSession = db.getSession(); private final DuplicationDao dao = db.getDbClient().duplicationDao(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/entity/EntityDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/entity/EntityDaoIT.java index 02f74e5c0c5..d8fe7f23db7 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/entity/EntityDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/entity/EntityDaoIT.java @@ -41,7 +41,7 @@ public class EntityDaoIT { private final System2 system2 = new AlwaysIncreasingSystem2(1000L); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); private final EntityDao entityDao = new EntityDao(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/es/EsQueueDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/es/EsQueueDaoIT.java index 1161b14d2b9..19c7d13d868 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/es/EsQueueDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/es/EsQueueDaoIT.java @@ -38,7 +38,7 @@ public class EsQueueDaoIT { private static TestSystem2 system2 = new TestSystem2().setNow(1_000); @Rule - public DbTester dbTester = DbTester.create(system2, true); + public DbTester dbTester = DbTester.create(system2); private DbSession dbSession = dbTester.getSession(); private EsQueueDao underTest = dbTester.getDbClient().esQueueDao(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/event/EventComponentChangeDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/event/EventComponentChangeDaoIT.java index 21110980d4f..d04b464275b 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/event/EventComponentChangeDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/event/EventComponentChangeDaoIT.java @@ -41,7 +41,7 @@ public class EventComponentChangeDaoIT { private static Random random = new Random(); @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private DbSession dbSession = dbTester.getSession(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/event/EventDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/event/EventDaoIT.java index d693de4946e..3501b5dcf2d 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/event/EventDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/event/EventDaoIT.java @@ -41,7 +41,7 @@ import static org.sonar.db.event.EventTesting.newEvent; public class EventDaoIT { @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private final DbClient dbClient = dbTester.getDbClient(); private final DbSession dbSession = dbTester.getSession(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/issue/IssueChangeDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/issue/IssueChangeDaoIT.java index 1a12b376c40..10c5d6025d6 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/issue/IssueChangeDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/issue/IssueChangeDaoIT.java @@ -46,7 +46,7 @@ import static org.sonar.db.issue.IssueChangeDto.TYPE_FIELD_CHANGE; public class IssueChangeDaoIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final IssueChangeDao underTest = db.getDbClient().issueChangeDao(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/issue/IssueChangeMapperIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/issue/IssueChangeMapperIT.java index 5adf1e1fc09..c97df108c1e 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/issue/IssueChangeMapperIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/issue/IssueChangeMapperIT.java @@ -32,7 +32,7 @@ import static org.assertj.core.api.Assertions.assertThat; public class IssueChangeMapperIT { @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private IssueChangeMapper underTest = dbTester.getSession().getMapper(IssueChangeMapper.class); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/issue/IssueDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/issue/IssueDaoIT.java index e57fd583d32..332bb74f04e 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/issue/IssueDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/issue/IssueDaoIT.java @@ -83,7 +83,7 @@ public class IssueDaoIT { .build(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final IssueDao underTest = db.getDbClient().issueDao(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/issue/IssueMapperIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/issue/IssueMapperIT.java index 0ee131e7519..308c4c81c7d 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/issue/IssueMapperIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/issue/IssueMapperIT.java @@ -61,7 +61,7 @@ public class IssueMapperIT { private static final long NO_FILTERING_ON_CLOSE_DATE = 1L; @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private final DbSession dbSession = dbTester.getSession(); private final IssueMapper underTest = dbSession.getMapper(IssueMapper.class); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/measure/LiveMeasureDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/measure/LiveMeasureDaoIT.java index f59c3b8a3d2..0243406e37c 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/measure/LiveMeasureDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/measure/LiveMeasureDaoIT.java @@ -56,7 +56,7 @@ import static org.sonar.db.measure.MeasureTesting.newLiveMeasure; public class LiveMeasureDaoIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final LiveMeasureDao underTest = db.getDbClient().liveMeasureDao(); private MetricDto metric; diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/measure/MeasureDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/measure/MeasureDaoIT.java index fd7b4346fb0..c9c0845e0b8 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/measure/MeasureDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/measure/MeasureDaoIT.java @@ -48,7 +48,7 @@ public class MeasureDaoIT { private MetricDto ncloc; @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final DbClient dbClient = db.getDbClient(); private final DbSession dbSession = db.getSession(); private final MeasureDao underTest = db.getDbClient().measureDao(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/measure/ProjectMeasuresIndexerIteratorIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/measure/ProjectMeasuresIndexerIteratorIT.java index ee7061ae01c..93e4608d981 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/measure/ProjectMeasuresIndexerIteratorIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/measure/ProjectMeasuresIndexerIteratorIT.java @@ -29,7 +29,6 @@ import org.sonar.db.DbClient; import org.sonar.db.DbSession; import org.sonar.db.DbTester; import org.sonar.db.component.ComponentDto; -import org.sonar.db.component.ComponentTesting; import org.sonar.db.component.ProjectData; import org.sonar.db.component.SnapshotDto; import org.sonar.db.measure.ProjectMeasuresIndexerIterator.ProjectMeasures; @@ -50,7 +49,7 @@ import static org.sonar.db.component.SnapshotTesting.newAnalysis; public class ProjectMeasuresIndexerIteratorIT { @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private final DbClient dbClient = dbTester.getDbClient(); private final DbSession dbSession = dbTester.getSession(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/metric/MetricDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/metric/MetricDaoIT.java index fcfbdadf04b..2a76e99b470 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/metric/MetricDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/metric/MetricDaoIT.java @@ -42,7 +42,7 @@ import static org.sonar.db.metric.MetricTesting.newMetricDto; public class MetricDaoIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private DbSession dbSession = db.getSession(); private MetricDao underTest = new MetricDao(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/newcodeperiod/NewCodePeriodDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/newcodeperiod/NewCodePeriodDaoIT.java index 208f8d9c664..dbb92034acb 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/newcodeperiod/NewCodePeriodDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/newcodeperiod/NewCodePeriodDaoIT.java @@ -29,7 +29,6 @@ import org.sonar.core.util.UuidFactory; import org.sonar.db.DbSession; import org.sonar.db.DbTester; import org.sonar.db.component.BranchDto; -import org.sonar.db.component.ComponentDbTester; import org.sonar.db.component.ProjectData; import org.sonar.db.project.ProjectDto; @@ -44,7 +43,7 @@ import static org.sonar.db.newcodeperiod.NewCodePeriodType.SPECIFIC_ANALYSIS; public class NewCodePeriodDaoIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final DbSession dbSession = db.getSession(); private final UuidFactory uuidFactory = new SequenceUuidFactory(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/notification/NotificationQueueDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/notification/NotificationQueueDaoIT.java index 48c30928d4c..2d0dd6e4a81 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/notification/NotificationQueueDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/notification/NotificationQueueDaoIT.java @@ -41,7 +41,7 @@ public class NotificationQueueDaoIT { private final System2 system2 = mock(System2.class); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); private NotificationQueueDao dao = db.getDbClient().notificationQueueDao(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/permission/AuthorizationDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/permission/AuthorizationDaoIT.java index beedc052cf9..b9fad2cc71b 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/permission/AuthorizationDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/permission/AuthorizationDaoIT.java @@ -59,7 +59,7 @@ public class AuthorizationDaoIT { private static final String DOES_NOT_EXIST = "does-not-exist"; @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final Random random = new Random(); private DbSession dbSession = db.getSession(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/permission/GroupPermissionDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/permission/GroupPermissionDaoIT.java index f9bdec5521c..15cff865943 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/permission/GroupPermissionDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/permission/GroupPermissionDaoIT.java @@ -55,7 +55,7 @@ public class GroupPermissionDaoIT { private static final String MISSING_UUID = "-1"; @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final DbSession dbSession = db.getSession(); private final GroupPermissionDao underTest = new GroupPermissionDao(new NoOpAuditPersister()); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/permission/GroupPermissionDaoWithPersisterIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/permission/GroupPermissionDaoWithPersisterIT.java index 08aa8807aa5..460f821e9d8 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/permission/GroupPermissionDaoWithPersisterIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/permission/GroupPermissionDaoWithPersisterIT.java @@ -44,7 +44,7 @@ public class GroupPermissionDaoWithPersisterIT { private final AuditPersister auditPersister = mock(AuditPersister.class); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final SequenceUuidFactory uuidFactory = new SequenceUuidFactory(); private final ArgumentCaptor<GroupPermissionNewValue> newValueCaptor = ArgumentCaptor.forClass(GroupPermissionNewValue.class); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/permission/UserPermissionDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/permission/UserPermissionDaoIT.java index 708c619a343..c937ff455cb 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/permission/UserPermissionDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/permission/UserPermissionDaoIT.java @@ -54,7 +54,7 @@ import static org.sonar.db.permission.PermissionQuery.DEFAULT_PAGE_SIZE; public class UserPermissionDaoIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final DbSession dbSession = db.getSession(); private final UserPermissionDao underTest = new UserPermissionDao(new NoOpAuditPersister()); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/permission/UserPermissionDaoWithPersisterIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/permission/UserPermissionDaoWithPersisterIT.java index 95a20e742fb..424f57328b3 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/permission/UserPermissionDaoWithPersisterIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/permission/UserPermissionDaoWithPersisterIT.java @@ -49,7 +49,7 @@ public class UserPermissionDaoWithPersisterIT { private final AuditPersister auditPersister = mock(AuditPersister.class); @Rule - public final DbTester db = DbTester.create(System2.INSTANCE, auditPersister, true); + public final DbTester db = DbTester.create(System2.INSTANCE, auditPersister); private final ArgumentCaptor<UserPermissionNewValue> newValueCaptor = ArgumentCaptor.forClass(UserPermissionNewValue.class); private final DbSession dbSession = db.getSession(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/permission/template/GroupWithPermissionTemplateDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/permission/template/GroupWithPermissionTemplateDaoIT.java index 9b703c4e3ca..397b1a6f1d8 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/permission/template/GroupWithPermissionTemplateDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/permission/template/GroupWithPermissionTemplateDaoIT.java @@ -44,7 +44,7 @@ import static org.sonar.db.user.GroupTesting.newGroupDto; public class GroupWithPermissionTemplateDaoIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private DbSession session = db.getSession(); private PermissionTemplateDbTester permissionTemplateDbTester = db.permissionTemplates(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/permission/template/PermissionTemplateCharacteristicDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/permission/template/PermissionTemplateCharacteristicDaoIT.java index 8a30e9e98c4..07ae32be964 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/permission/template/PermissionTemplateCharacteristicDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/permission/template/PermissionTemplateCharacteristicDaoIT.java @@ -38,7 +38,7 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy; public class PermissionTemplateCharacteristicDaoIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final DbSession dbSession = db.getSession(); private final PermissionTemplateCharacteristicDao underTest = new PermissionTemplateCharacteristicDao(new NoOpAuditPersister()); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/permission/template/PermissionTemplateCharacteristicDaoWithPersisterIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/permission/template/PermissionTemplateCharacteristicDaoWithPersisterIT.java index f978f932a90..8c7832d094f 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/permission/template/PermissionTemplateCharacteristicDaoWithPersisterIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/permission/template/PermissionTemplateCharacteristicDaoWithPersisterIT.java @@ -38,7 +38,7 @@ public class PermissionTemplateCharacteristicDaoWithPersisterIT { private final AuditPersister auditPersister = mock(AuditPersister.class); @Rule - public final DbTester db = DbTester.create(System2.INSTANCE, auditPersister, true); + public final DbTester db = DbTester.create(System2.INSTANCE, auditPersister); private final DbSession session = db.getSession(); private final PermissionTemplateCharacteristicDao underTest = db.getDbClient().permissionTemplateCharacteristicDao(); private final ArgumentCaptor<PermissionTemplateNewValue> newValueCaptor = ArgumentCaptor.forClass(PermissionTemplateNewValue.class); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/permission/template/PermissionTemplateDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/permission/template/PermissionTemplateDaoIT.java index 599ba66ec28..7e0f8c28c0d 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/permission/template/PermissionTemplateDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/permission/template/PermissionTemplateDaoIT.java @@ -50,7 +50,7 @@ public class PermissionTemplateDaoIT { private static final Date NOW = new Date(500_000_000_000L); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private System2 system2 = mock(System2.class); private DbSession dbSession = db.getSession(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/permission/template/PermissionTemplateDaoWithPersisterIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/permission/template/PermissionTemplateDaoWithPersisterIT.java index 62c5ec42530..58301ef14c8 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/permission/template/PermissionTemplateDaoWithPersisterIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/permission/template/PermissionTemplateDaoWithPersisterIT.java @@ -47,7 +47,7 @@ public class PermissionTemplateDaoWithPersisterIT { private static final Date NOW = new Date(500_000_000_000L); @Rule - public final DbTester db = DbTester.create(auditPersister, true); + public final DbTester db = DbTester.create(auditPersister); private final DbSession session = db.getSession(); private final ArgumentCaptor<PermissionTemplateNewValue> newValueCaptor = ArgumentCaptor.forClass(PermissionTemplateNewValue.class); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/permission/template/UserWithPermissionTemplateDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/permission/template/UserWithPermissionTemplateDaoIT.java index b6a1b48f297..2e8a8de9722 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/permission/template/UserWithPermissionTemplateDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/permission/template/UserWithPermissionTemplateDaoIT.java @@ -43,7 +43,7 @@ import static org.sonar.db.permission.PermissionQuery.builder; public class UserWithPermissionTemplateDaoIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final DbSession dbSession = db.getSession(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/plugin/PluginDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/plugin/PluginDaoIT.java index 99a96bb035d..1851f6f1dc0 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/plugin/PluginDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/plugin/PluginDaoIT.java @@ -33,7 +33,7 @@ import static org.sonar.db.plugin.PluginDto.Type.EXTERNAL; public class PluginDaoIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final PluginDao underTest = db.getDbClient().pluginDao(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/plugin/PluginDaoWithPersisterIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/plugin/PluginDaoWithPersisterIT.java index 915d7db976d..72179fd83e8 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/plugin/PluginDaoWithPersisterIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/plugin/PluginDaoWithPersisterIT.java @@ -38,7 +38,7 @@ public class PluginDaoWithPersisterIT { private final AuditPersister auditPersister = mock(AuditPersister.class); @Rule - public final DbTester db = DbTester.create(System2.INSTANCE, auditPersister, true); + public final DbTester db = DbTester.create(System2.INSTANCE, auditPersister); private final ArgumentCaptor<PluginNewValue> newValueCaptor = ArgumentCaptor.forClass(PluginNewValue.class); private final DbSession session = db.getSession(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/portfolio/PortfolioDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/portfolio/PortfolioDaoIT.java index c8ca7a36a0b..e66fa88cce4 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/portfolio/PortfolioDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/portfolio/PortfolioDaoIT.java @@ -51,7 +51,7 @@ import static org.mockito.Mockito.verify; public class PortfolioDaoIT { private final System2 system2 = new AlwaysIncreasingSystem2(1L, 1); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); private final AuditPersister audit = mock(AuditPersister.class); private final PortfolioDao portfolioDao = new PortfolioDao(system2, UuidFactoryFast.getInstance(), audit); private final DbSession session = db.getSession(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/project/ProjectBadgeTokenDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/project/ProjectBadgeTokenDaoIT.java index ff96b0f613d..e4a075b6fc8 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/project/ProjectBadgeTokenDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/project/ProjectBadgeTokenDaoIT.java @@ -44,7 +44,7 @@ public class ProjectBadgeTokenDaoIT { private final System2 system2 = new TestSystem2().setNow(1000L); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); private final AuditPersister auditPersister = spy(AuditPersister.class); private final UuidFactory uuidFactory = mock(UuidFactory.class); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/project/ProjectDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/project/ProjectDaoIT.java index 1957e7e368a..22c58e01068 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/project/ProjectDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/project/ProjectDaoIT.java @@ -52,7 +52,6 @@ import org.sonar.db.qualityprofile.QProfileDto; import static java.util.Collections.emptySet; import static org.apache.commons.lang.math.RandomUtils.nextInt; import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.in; import static org.assertj.core.api.Assertions.tuple; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.mock; @@ -67,7 +66,7 @@ public class ProjectDaoIT { private final System2 system2 = new AlwaysIncreasingSystem2(1000L); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); private final AuditPersister auditPersister = mock(AuditPersister.class); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/property/InternalComponentPropertiesDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/property/InternalComponentPropertiesDaoIT.java index 49268ee1a86..3bbdc0cfeed 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/property/InternalComponentPropertiesDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/property/InternalComponentPropertiesDaoIT.java @@ -42,7 +42,7 @@ public class InternalComponentPropertiesDaoIT { private System2 system2 = mock(System2.class); @Rule - public DbTester dbTester = DbTester.create(system2, true); + public DbTester dbTester = DbTester.create(system2); private DbSession dbSession = dbTester.getSession(); private UuidFactory uuidFactory = UuidFactoryFast.getInstance(); private InternalComponentPropertiesDao underTest = new InternalComponentPropertiesDao(system2, uuidFactory); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/property/InternalPropertiesDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/property/InternalPropertiesDaoIT.java index 7687c9877e8..3030fbf4b4e 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/property/InternalPropertiesDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/property/InternalPropertiesDaoIT.java @@ -82,7 +82,7 @@ public class InternalPropertiesDaoIT { private final String DEFAULT_PROJECT_TEMPLATE = "defaultTemplate.prj"; @Rule - public DbTester dbTester = DbTester.create(system2, true); + public DbTester dbTester = DbTester.create(system2); private final DbSession dbSession = dbTester.getSession(); private final AuditPersister auditPersister = mock(AuditPersister.class); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/property/PropertiesDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/property/PropertiesDaoIT.java index 0edde3eab48..016ed6843a1 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/property/PropertiesDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/property/PropertiesDaoIT.java @@ -75,7 +75,7 @@ public class PropertiesDaoIT { private final AuditPersister auditPersister = mock(AuditPersister.class); @Rule - public DbTester db = DbTester.create(system2, auditPersister, true); + public DbTester db = DbTester.create(system2, auditPersister); private final DbClient dbClient = db.getDbClient(); private final DbSession session = db.getSession(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/property/PropertiesDaoWithPersisterIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/property/PropertiesDaoWithPersisterIT.java index 8038d647541..74a4214a675 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/property/PropertiesDaoWithPersisterIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/property/PropertiesDaoWithPersisterIT.java @@ -64,7 +64,7 @@ public class PropertiesDaoWithPersisterIT { private final ArgumentCaptor<PropertyNewValue> newValueCaptor = ArgumentCaptor.forClass(PropertyNewValue.class); @Rule - public DbTester db = DbTester.create(system2, auditPersister, true); + public DbTester db = DbTester.create(system2, auditPersister); private final DbClient dbClient = db.getDbClient(); private final DbSession session = db.getSession(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/purge/PurgeCommandsIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/purge/PurgeCommandsIT.java index 83da1a1c40c..4778f1eb75d 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/purge/PurgeCommandsIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/purge/PurgeCommandsIT.java @@ -78,7 +78,7 @@ import static org.sonar.db.issue.IssueTesting.newCodeReferenceIssue; public class PurgeCommandsIT { @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private final AlwaysIncreasingSystem2 system2 = new AlwaysIncreasingSystem2(); private final PurgeProfiler profiler = new PurgeProfiler(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/purge/PurgeDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/purge/PurgeDaoIT.java index 79b85148b60..569d28a6ffc 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/purge/PurgeDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/purge/PurgeDaoIT.java @@ -119,7 +119,7 @@ public class PurgeDaoIT { private final System2 system2 = mock(System2.class); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); private final DbClient dbClient = db.getDbClient(); private final DbSession dbSession = db.getSession(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/purge/PurgeDaoWithAuditIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/purge/PurgeDaoWithAuditIT.java index a1773451b0a..05ceeb5c841 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/purge/PurgeDaoWithAuditIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/purge/PurgeDaoWithAuditIT.java @@ -43,7 +43,7 @@ public class PurgeDaoWithAuditIT { private final System2 system2 = mock(System2.class); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); @Captor ArgumentCaptor<ComponentNewValue> newValueCaptor; diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/purge/PurgeMapperIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/purge/PurgeMapperIT.java index 1f5d866833e..8dccd42caf3 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/purge/PurgeMapperIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/purge/PurgeMapperIT.java @@ -35,7 +35,7 @@ import static org.assertj.core.api.Assertions.assertThat; public class PurgeMapperIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private DbSession dbSession; private PurgeMapper purgeMapper; diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/pushevent/PushEventDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/pushevent/PushEventDaoIT.java index 98d81f82575..03a1cde80cb 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/pushevent/PushEventDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/pushevent/PushEventDaoIT.java @@ -36,7 +36,7 @@ public class PushEventDaoIT { private final TestSystem2 system2 = new TestSystem2().setNow(1L); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); private final DbSession session = db.getSession(); private final PushEventDao underTest = db.getDbClient().pushEventDao(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/qualitygate/ProjectQgateAssociationDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/qualitygate/ProjectQgateAssociationDaoIT.java index 75074881889..e34eb037efd 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/qualitygate/ProjectQgateAssociationDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/qualitygate/ProjectQgateAssociationDaoIT.java @@ -25,7 +25,6 @@ import org.junit.Rule; import org.junit.Test; import org.sonar.db.DbSession; import org.sonar.db.DbTester; -import org.sonar.db.component.ComponentDto; import org.sonar.db.project.ProjectDto; import static org.assertj.core.api.Assertions.assertThat; @@ -34,7 +33,7 @@ import static org.assertj.core.api.Assertions.tuple; public class ProjectQgateAssociationDaoIT { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final DbSession dbSession = db.getSession(); private final ProjectQgateAssociationDao underTest = db.getDbClient().projectQgateAssociationDao(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/qualitygate/QualityGateConditionDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/qualitygate/QualityGateConditionDaoIT.java index c4aef3ba778..6a46ce044d4 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/qualitygate/QualityGateConditionDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/qualitygate/QualityGateConditionDaoIT.java @@ -37,7 +37,7 @@ import static org.assertj.core.api.Assertions.assertThat; public class QualityGateConditionDaoIT { @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private DbSession dbSession = dbTester.getSession(); private QualityGateConditionDao underTest = dbTester.getDbClient().gateConditionDao(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/qualitygate/QualityGateDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/qualitygate/QualityGateDaoIT.java index 42b93bc482a..a93511b6e8b 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/qualitygate/QualityGateDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/qualitygate/QualityGateDaoIT.java @@ -44,7 +44,7 @@ import static org.sonar.db.qualitygate.QualityGateFindingDto.RATING_VALUE_TYPE; public class QualityGateDaoIT { @Rule - public final DbTester db = DbTester.create(System2.INSTANCE, true); + public final DbTester db = DbTester.create(System2.INSTANCE); private final QualityGateDbTester qualityGateDbTester = new QualityGateDbTester(db); private final DbSession dbSession = db.getSession(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/qualitygate/QualityGateGroupPermissionsDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/qualitygate/QualityGateGroupPermissionsDaoIT.java index db462721a83..b6a160e48b7 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/qualitygate/QualityGateGroupPermissionsDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/qualitygate/QualityGateGroupPermissionsDaoIT.java @@ -51,7 +51,7 @@ public class QualityGateGroupPermissionsDaoIT { private final ArgumentCaptor<GroupEditorNewValue> newValueCaptor = ArgumentCaptor.forClass(GroupEditorNewValue.class); @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, auditPersister, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE, auditPersister); private DbSession dbSession = dbTester.getSession(); private QualityGateGroupPermissionsDao underTest = dbTester.getDbClient().qualityGateGroupPermissionsDao(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/qualitygate/QualityGateUserPermissionsDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/qualitygate/QualityGateUserPermissionsDaoIT.java index 1a9c6a0479b..beea1928ad2 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/qualitygate/QualityGateUserPermissionsDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/qualitygate/QualityGateUserPermissionsDaoIT.java @@ -47,7 +47,7 @@ public class QualityGateUserPermissionsDaoIT { private final ArgumentCaptor<UserEditorNewValue> newValueCaptor = ArgumentCaptor.forClass(UserEditorNewValue.class); @Rule - public final DbTester db = DbTester.create(System2.INSTANCE, auditPersister, true); + public final DbTester db = DbTester.create(System2.INSTANCE, auditPersister); private final DbSession dbSession = db.getSession(); private final UserDbTester userDbTester = new UserDbTester(db); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/qualityprofile/ActiveRuleDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/qualityprofile/ActiveRuleDaoIT.java index eda8fb4abbe..5af54de947d 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/qualityprofile/ActiveRuleDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/qualityprofile/ActiveRuleDaoIT.java @@ -71,7 +71,7 @@ public class ActiveRuleDaoIT { private System2 system = new TestSystem2().setNow(NOW); @Rule - public DbTester db = DbTester.create(system, true); + public DbTester db = DbTester.create(system); private DbSession dbSession = db.getSession(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/qualityprofile/DefaultQProfileDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/qualityprofile/DefaultQProfileDaoIT.java index 7447f5a4ae3..e7428304b37 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/qualityprofile/DefaultQProfileDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/qualityprofile/DefaultQProfileDaoIT.java @@ -34,7 +34,7 @@ import static org.assertj.core.api.Assertions.assertThat; public class DefaultQProfileDaoIT { @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private DbSession dbSession = dbTester.getSession(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/qualityprofile/QProfileChangeDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/qualityprofile/QProfileChangeDaoIT.java index 59bba4c269e..0ab04ea2c51 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/qualityprofile/QProfileChangeDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/qualityprofile/QProfileChangeDaoIT.java @@ -40,7 +40,7 @@ public class QProfileChangeDaoIT { private System2 system2 = new AlwaysIncreasingSystem2(); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); private DbSession dbSession = db.getSession(); private UuidFactory uuidFactory = new SequenceUuidFactory(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/qualityprofile/QProfileEditGroupsDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/qualityprofile/QProfileEditGroupsDaoIT.java index 210593d2d1f..c61b1608162 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/qualityprofile/QProfileEditGroupsDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/qualityprofile/QProfileEditGroupsDaoIT.java @@ -57,7 +57,7 @@ public class QProfileEditGroupsDaoIT { private System2 system2 = new TestSystem2().setNow(NOW); @Rule - public DbTester db = DbTester.create(system2, auditPersister, true); + public DbTester db = DbTester.create(system2, auditPersister); private QProfileEditGroupsDao underTest = db.getDbClient().qProfileEditGroupsDao(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/qualityprofile/QProfileEditUsersDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/qualityprofile/QProfileEditUsersDaoIT.java index da4a526d1cc..ddb126b479d 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/qualityprofile/QProfileEditUsersDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/qualityprofile/QProfileEditUsersDaoIT.java @@ -56,7 +56,7 @@ public class QProfileEditUsersDaoIT { private final ArgumentCaptor<UserEditorNewValue> newValueCaptor = ArgumentCaptor.forClass(UserEditorNewValue.class); @Rule - public DbTester db = DbTester.create(system2, auditPersister, true); + public DbTester db = DbTester.create(system2, auditPersister); private final QProfileEditUsersDao underTest = db.getDbClient().qProfileEditUsersDao(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/qualityprofile/QualityProfileDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/qualityprofile/QualityProfileDaoIT.java index 4f35d90961e..60c7f5533a7 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/qualityprofile/QualityProfileDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/qualityprofile/QualityProfileDaoIT.java @@ -36,7 +36,6 @@ import org.sonar.core.util.UtcDateUtils; import org.sonar.core.util.Uuids; import org.sonar.db.DbSession; import org.sonar.db.DbTester; -import org.sonar.db.component.ComponentDto; import org.sonar.db.project.ProjectDto; import org.sonar.db.rule.RuleDto; @@ -58,7 +57,7 @@ public class QualityProfileDaoIT { private final System2 system = mock(System2.class); @Rule - public DbTester db = DbTester.create(system, true); + public DbTester db = DbTester.create(system); private final DbSession dbSession = db.getSession(); private final QualityProfileDao underTest = db.getDbClient().qualityProfileDao(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/qualityprofile/QualityProfileExportDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/qualityprofile/QualityProfileExportDaoIT.java index cd24aa77e90..22fdbeb3a0b 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/qualityprofile/QualityProfileExportDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/qualityprofile/QualityProfileExportDaoIT.java @@ -43,7 +43,7 @@ import static org.assertj.core.api.Assertions.assertThat; public class QualityProfileExportDaoIT { @Rule - public DbTester db = DbTester.create(new AlwaysIncreasingSystem2(), true); + public DbTester db = DbTester.create(new AlwaysIncreasingSystem2()); private final DbSession dbSession = db.getSession(); private final QualityProfileExportDao underTest = db.getDbClient().qualityProfileExportDao(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/report/RegulatoryReportDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/report/RegulatoryReportDaoIT.java index f1ac6988b6a..6320268a4ed 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/report/RegulatoryReportDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/report/RegulatoryReportDaoIT.java @@ -44,7 +44,7 @@ public class RegulatoryReportDaoIT { private static final String BRANCH_NAME = "branch"; @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final RegulatoryReportDao underTest = db.getDbClient().regulatoryReportDao(); private ComponentDto project; diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/report/ReportScheduleDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/report/ReportScheduleDaoIT.java index 61b94fe685a..6ff5860b6fc 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/report/ReportScheduleDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/report/ReportScheduleDaoIT.java @@ -31,7 +31,7 @@ import static org.assertj.core.api.Assertions.assertThat; public class ReportScheduleDaoIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final ReportScheduleDao underTest = db.getDbClient().reportScheduleDao(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/report/ReportSubscriptionDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/report/ReportSubscriptionDaoIT.java index cce3d8bca28..6e7998ffcd4 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/report/ReportSubscriptionDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/report/ReportSubscriptionDaoIT.java @@ -22,12 +22,10 @@ package org.sonar.db.report; import java.util.List; import java.util.Optional; import java.util.Set; -import org.apache.ibatis.exceptions.PersistenceException; import org.jetbrains.annotations.NotNull; import org.junit.Rule; import org.junit.Test; import org.sonar.api.utils.System2; -import org.sonar.core.util.UuidFactoryImpl; import org.sonar.db.DbTester; import static org.assertj.core.api.Assertions.assertThat; @@ -37,7 +35,7 @@ import static org.assertj.core.api.Assertions.tuple; public class ReportSubscriptionDaoIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final ReportSubscriptionDao underTest = db.getDbClient().reportSubscriptionDao(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/rule/RuleDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/rule/RuleDaoIT.java index 739194e9788..498680a1873 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/rule/RuleDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/rule/RuleDaoIT.java @@ -61,7 +61,7 @@ public class RuleDaoIT { private static final String UNKNOWN_RULE_UUID = "unknown-uuid"; @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final RuleDao underTest = db.getDbClient().ruleDao(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/rule/RuleRepositoryDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/rule/RuleRepositoryDaoIT.java index 503eaf8a994..84042e8a822 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/rule/RuleRepositoryDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/rule/RuleRepositoryDaoIT.java @@ -41,7 +41,7 @@ public class RuleRepositoryDaoIT { private System2 system2 = new AlwaysIncreasingSystem2(); @Rule - public DbTester dbTester = DbTester.create(system2, true); + public DbTester dbTester = DbTester.create(system2); private RuleRepositoryDao underTest = new RuleRepositoryDao(system2); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/scannercache/ScannerAnalysisCacheDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/scannercache/ScannerAnalysisCacheDaoIT.java index 9e48bf83d84..2dab8a159e0 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/scannercache/ScannerAnalysisCacheDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/scannercache/ScannerAnalysisCacheDaoIT.java @@ -46,7 +46,7 @@ import static org.mockito.Mockito.when; public class ScannerAnalysisCacheDaoIT { @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private final static UuidFactory uuidFactory = new SequenceUuidFactory(); private final DbSession dbSession = dbTester.getSession(); private final ScannerAnalysisCacheDao underTest = dbTester.getDbClient().scannerAnalysisCacheDao(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/schemamigration/SchemaMigrationDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/schemamigration/SchemaMigrationDaoIT.java index 47e6a4fc7b9..4a4c8fcda0f 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/schemamigration/SchemaMigrationDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/schemamigration/SchemaMigrationDaoIT.java @@ -32,7 +32,7 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy; public class SchemaMigrationDaoIT { @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private DbSession dbSession = dbTester.getSession(); private SchemaMigrationDao underTest = dbTester.getDbClient().schemaMigrationDao(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/scim/ScimUserDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/scim/ScimUserDaoIT.java index 83100d0d3e3..b48dbb441d2 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/scim/ScimUserDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/scim/ScimUserDaoIT.java @@ -48,7 +48,7 @@ import static org.assertj.core.api.Fail.fail; public class ScimUserDaoIT { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final DbSession dbSession = db.getSession(); private final ScimUserDao scimUserDao = db.getDbClient().scimUserDao(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/source/FileSourceDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/source/FileSourceDaoIT.java index 818343ac06a..301fa88a1da 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/source/FileSourceDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/source/FileSourceDaoIT.java @@ -50,7 +50,7 @@ import static org.sonar.db.component.ComponentTesting.newFileDto; public class FileSourceDaoIT { @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private final DbSession dbSession = dbTester.getSession(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/user/ExternalGroupDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/user/ExternalGroupDaoIT.java index 774e4cda7d2..57c31bc2ccf 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/user/ExternalGroupDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/user/ExternalGroupDaoIT.java @@ -37,7 +37,7 @@ public class ExternalGroupDaoIT { private static final String PROVIDER = "provider1"; @Rule - public final DbTester db = DbTester.create(true); + public final DbTester db = DbTester.create(); private final DbSession dbSession = db.getSession(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/user/GroupDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/user/GroupDaoIT.java index 87a19527e50..a904793fe6a 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/user/GroupDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/user/GroupDaoIT.java @@ -46,7 +46,7 @@ public class GroupDaoIT { private System2 system2 = mock(System2.class); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); private DbSession dbSession = db.getSession(); private GroupDao underTest = db.getDbClient().groupDao(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/user/GroupDaoWithPersisterIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/user/GroupDaoWithPersisterIT.java index f679a6d8109..54bd5b1fefb 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/user/GroupDaoWithPersisterIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/user/GroupDaoWithPersisterIT.java @@ -47,7 +47,7 @@ public class GroupDaoWithPersisterIT { private final System2 system2 = mock(System2.class); @Rule - public final DbTester db = DbTester.create(system2, auditPersister, true); + public final DbTester db = DbTester.create(system2, auditPersister); private final DbClient dbClient = db.getDbClient(); private final GroupDao underTest = db.getDbClient().groupDao(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/user/GroupMembershipDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/user/GroupMembershipDaoIT.java index 20ced2750bc..fd8a8f02bf1 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/user/GroupMembershipDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/user/GroupMembershipDaoIT.java @@ -37,7 +37,7 @@ import static org.sonar.db.user.GroupMembershipQuery.builder; public class GroupMembershipDaoIT { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private UserDto user1; private UserDto user2; diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/user/RoleDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/user/RoleDaoIT.java index 8319ef0ffa1..e213e8ba204 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/user/RoleDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/user/RoleDaoIT.java @@ -43,7 +43,7 @@ public class RoleDaoIT { private static final Set<String> PROJECT_QUALIFIER = Set.of(Qualifiers.PROJECT); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private DbSession dbSession = db.getSession(); private RoleDao underTest = db.getDbClient().roleDao(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/user/SamlMessageIdDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/user/SamlMessageIdDaoIT.java index dbd3ff44fc1..133d33806e8 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/user/SamlMessageIdDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/user/SamlMessageIdDaoIT.java @@ -36,7 +36,7 @@ public class SamlMessageIdDaoIT { private TestSystem2 system2 = new TestSystem2().setNow(NOW); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); private DbSession dbSession = db.getSession(); private UuidFactory uuidFactory = new SequenceUuidFactory(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/user/SessionTokensDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/user/SessionTokensDaoIT.java index e9799c2a3b5..0f5aaebe61c 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/user/SessionTokensDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/user/SessionTokensDaoIT.java @@ -36,7 +36,7 @@ public class SessionTokensDaoIT { private TestSystem2 system2 = new TestSystem2().setNow(NOW); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); private DbSession dbSession = db.getSession(); private UuidFactory uuidFactory = new SequenceUuidFactory(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/user/UserDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/user/UserDaoIT.java index cfec017c39e..ab8afc81fde 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/user/UserDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/user/UserDaoIT.java @@ -64,7 +64,7 @@ public class UserDaoIT { private TestSystem2 system2 = new TestSystem2().setNow(NOW); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); private DbClient dbClient = db.getDbClient(); private DbSession session = db.getSession(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/user/UserDaoWithPersisterIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/user/UserDaoWithPersisterIT.java index a8a6a968f1d..17df16f7f77 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/user/UserDaoWithPersisterIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/user/UserDaoWithPersisterIT.java @@ -50,7 +50,7 @@ public class UserDaoWithPersisterIT { private final ArgumentCaptor<UserNewValue> newValueCaptor = ArgumentCaptor.forClass(UserNewValue.class); @Rule - public final DbTester db = DbTester.create(system2, auditPersister, true); + public final DbTester db = DbTester.create(system2, auditPersister); private final DbClient dbClient = db.getDbClient(); private final UserDao underTest = db.getDbClient().userDao(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/user/UserDismissedMessagesDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/user/UserDismissedMessagesDaoIT.java index 075d0dfe2ea..1746aa2cace 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/user/UserDismissedMessagesDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/user/UserDismissedMessagesDaoIT.java @@ -36,7 +36,7 @@ import static org.sonar.db.ce.CeTaskMessageType.SUGGEST_DEVELOPER_EDITION_UPGRAD public class UserDismissedMessagesDaoIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final UserDismissedMessagesDao underTest = db.getDbClient().userDismissedMessagesDao(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/user/UserGroupDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/user/UserGroupDaoIT.java index 38f963a3feb..79e5f6b45e8 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/user/UserGroupDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/user/UserGroupDaoIT.java @@ -31,7 +31,7 @@ import static org.assertj.core.api.Assertions.assertThat; public class UserGroupDaoIT { @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private final DbSession dbSession = dbTester.getSession(); private final UserGroupDao underTest = dbTester.getDbClient().userGroupDao(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/user/UserGroupDaoWithPersisterIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/user/UserGroupDaoWithPersisterIT.java index 3edf31c36f3..12719144e9b 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/user/UserGroupDaoWithPersisterIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/user/UserGroupDaoWithPersisterIT.java @@ -39,7 +39,7 @@ public class UserGroupDaoWithPersisterIT { private final AuditPersister auditPersister = mock(AuditPersister.class); @Rule - public final DbTester db = DbTester.create(System2.INSTANCE, auditPersister, true); + public final DbTester db = DbTester.create(System2.INSTANCE, auditPersister); private final ArgumentCaptor<UserGroupNewValue> newValueCaptor = ArgumentCaptor.forClass(UserGroupNewValue.class); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/user/UserTokenDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/user/UserTokenDaoIT.java index cd1b4a12a93..8d8818d9d22 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/user/UserTokenDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/user/UserTokenDaoIT.java @@ -38,7 +38,7 @@ import static org.sonar.db.user.UserTokenTesting.newUserToken; public class UserTokenDaoIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final DbSession dbSession = db.getSession(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/user/UserTokenDaoWithPersisterIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/user/UserTokenDaoWithPersisterIT.java index f0772713e25..f29b20ca96f 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/user/UserTokenDaoWithPersisterIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/user/UserTokenDaoWithPersisterIT.java @@ -44,7 +44,7 @@ public class UserTokenDaoWithPersisterIT { private final ArgumentCaptor<UserTokenNewValue> newValueCaptor = ArgumentCaptor.forClass(UserTokenNewValue.class); @Rule - public final DbTester db = DbTester.create(System2.INSTANCE, auditPersister, true); + public final DbTester db = DbTester.create(System2.INSTANCE, auditPersister); private final DbSession dbSession = db.getSession(); private final DbClient dbClient = db.getDbClient(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/webhook/WebhookDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/webhook/WebhookDaoIT.java index bdaf37fb2e6..d957f15bb4e 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/webhook/WebhookDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/webhook/WebhookDaoIT.java @@ -36,7 +36,7 @@ import static org.assertj.core.api.Assertions.assertThat; public class WebhookDaoIT { @Rule - public final DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public final DbTester dbTester = DbTester.create(System2.INSTANCE); private final System2 system2 = System2.INSTANCE; private final DbClient dbClient = dbTester.getDbClient(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/webhook/WebhookDaoWithPersisterIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/webhook/WebhookDaoWithPersisterIT.java index 61668406f93..eb858dd58b5 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/webhook/WebhookDaoWithPersisterIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/webhook/WebhookDaoWithPersisterIT.java @@ -44,7 +44,7 @@ public class WebhookDaoWithPersisterIT { private final AuditPersister auditPersister = mock(AuditPersister.class); @Rule - public final DbTester dbTester = DbTester.create(System2.INSTANCE, auditPersister, true); + public final DbTester dbTester = DbTester.create(System2.INSTANCE, auditPersister); private final DbClient dbClient = dbTester.getDbClient(); private final DbSession dbSession = dbTester.getSession(); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/webhook/WebhookDeliveryDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/webhook/WebhookDeliveryDaoIT.java index ac9abf20819..e57c45310f9 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/webhook/WebhookDeliveryDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/webhook/WebhookDeliveryDaoIT.java @@ -39,7 +39,7 @@ public class WebhookDeliveryDaoIT { private static final long BEFORE = NOW - 1_000L; @Rule - public final DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public final DbTester dbTester = DbTester.create(System2.INSTANCE); private final DbClient dbClient = dbTester.getDbClient(); private final DbSession dbSession = dbTester.getSession(); diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/scim/ScimGroupDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/scim/ScimGroupDaoTest.java index ad34747f9ff..17377e56361 100644 --- a/server/sonar-db-dao/src/test/java/org/sonar/db/scim/ScimGroupDaoTest.java +++ b/server/sonar-db-dao/src/test/java/org/sonar/db/scim/ScimGroupDaoTest.java @@ -44,7 +44,7 @@ import static org.assertj.core.groups.Tuple.tuple; public class ScimGroupDaoTest { private static final String DISPLAY_NAME_FILTER = "displayName eq \"group2\""; @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final ScimGroupDao scimGroupDao = db.getDbClient().scimGroupDao(); @Test diff --git a/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/DbTester.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/DbTester.java index 6a29d3cdd3f..1ddf8c82238 100644 --- a/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/DbTester.java +++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/DbTester.java @@ -90,14 +90,14 @@ public class DbTester extends AbstractDbTester<TestDbImpl> { private final AlmPatsDbTester almPatsDbtester; private final AuditDbTester auditDbTester; - private DbTester(System2 system2, boolean useDifferentProjectUuids, @Nullable String schemaPath, AuditPersister auditPersister, MyBatisConfExtension... confExtensions) { + private DbTester(System2 system2, @Nullable String schemaPath, AuditPersister auditPersister, MyBatisConfExtension... confExtensions) { super(TestDbImpl.create(schemaPath, confExtensions)); this.system2 = system2; this.auditPersister = auditPersister; initDbClient(); this.userTester = new UserDbTester(this); - this.componentTester = new ComponentDbTester(this, useDifferentProjectUuids); + this.componentTester = new ComponentDbTester(this); this.projectLinkTester = new ProjectLinkDbTester(this); this.favoriteTester = new FavoriteDbTester(this); this.eventTester = new EventDbTester(this); @@ -121,48 +121,28 @@ public class DbTester extends AbstractDbTester<TestDbImpl> { } public static DbTester create() { - return create(false); - } - - public static DbTester create(boolean useDifferentProjectUuids) { - return new DbTester(System2.INSTANCE, useDifferentProjectUuids, null, new NoOpAuditPersister()); + return new DbTester(System2.INSTANCE, null, new NoOpAuditPersister()); } public static DbTester create(AuditPersister auditPersister) { - return new DbTester(System2.INSTANCE, false, null, auditPersister); + return new DbTester(System2.INSTANCE, null, auditPersister); } public static DbTester create(System2 system2, AuditPersister auditPersister) { - return new DbTester(system2, false, null, auditPersister); - } - - public static DbTester create(System2 system2, AuditPersister auditPersister, boolean useDifferentProjectUuids) { - return new DbTester(system2, useDifferentProjectUuids, null, auditPersister); + return new DbTester(system2, null, auditPersister); } public static DbTester create(System2 system2) { - return new DbTester(system2, false, null, new NoOpAuditPersister()); - } - - public static DbTester create(System2 system2, boolean useDifferentProjectUuids) { - return new DbTester(system2, useDifferentProjectUuids, null, new NoOpAuditPersister()); + return new DbTester(system2, null, new NoOpAuditPersister()); } public static DbTester createWithExtensionMappers(System2 system2, Class<?> firstMapperClass, Class<?>... otherMapperClasses) { - return createWithExtensionMappers(system2, false, firstMapperClass, otherMapperClasses); - } - - public static DbTester createWithExtensionMappers(System2 system2, boolean useDifferentProjectUuids, Class<?> firstMapperClass, Class<?>... otherMapperClasses) { - return new DbTester(system2, useDifferentProjectUuids, null, new NoOpAuditPersister(), new DbTesterMyBatisConfExtension(firstMapperClass, otherMapperClasses)); + return new DbTester(system2, null, new NoOpAuditPersister(), new DbTesterMyBatisConfExtension(firstMapperClass, otherMapperClasses)); } - public static DbTester create(TestSystem2 system2, AuditPersister auditPersister, boolean useDifferentProjectUuids) { - return new DbTester(system2, useDifferentProjectUuids, null, auditPersister); - - } + public static DbTester create(TestSystem2 system2, AuditPersister auditPersister) { + return new DbTester(system2, null, auditPersister); - public static DbTester create(AuditPersister auditPersister, boolean useDifferentProjectUuids) { - return new DbTester(System2.INSTANCE, useDifferentProjectUuids, null, auditPersister); } private void initDbClient() { diff --git a/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/component/ComponentDbTester.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/component/ComponentDbTester.java index 1d3de422b56..dae0201910a 100644 --- a/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/component/ComponentDbTester.java +++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/component/ComponentDbTester.java @@ -47,13 +47,11 @@ public class ComponentDbTester { private final DbTester db; private final DbClient dbClient; private final DbSession dbSession; - private final boolean useDifferentUuids; - public ComponentDbTester(DbTester db, boolean useDifferentProjectUuids) { + public ComponentDbTester(DbTester db) { this.db = db; this.dbClient = db.getDbClient(); this.dbSession = db.getSession(); - this.useDifferentUuids = useDifferentProjectUuids; } public SnapshotDto insertProjectAndSnapshot(ComponentDto component) { @@ -111,19 +109,11 @@ public class ComponentDbTester { } public ProjectData insertPublicProject(String uuid) { - if (useDifferentUuids) { - return insertComponentAndBranchAndProject(ComponentTesting.newPublicProjectDto(), false, defaults(), defaults(), p -> p.setUuid(uuid)); - } else { - return insertComponentAndBranchAndProject(ComponentTesting.newPublicProjectDto(uuid), false); - } + return insertComponentAndBranchAndProject(ComponentTesting.newPublicProjectDto(), false, defaults(), defaults(), p -> p.setUuid(uuid)); } public ProjectData insertPublicProject(String uuid, Consumer<ComponentDto> dtoPopulator) { - if (useDifferentUuids) { - return insertComponentAndBranchAndProject(ComponentTesting.newPublicProjectDto(), false, defaults(), dtoPopulator, p -> p.setUuid(uuid)); - } else { - return insertComponentAndBranchAndProject(ComponentTesting.newPublicProjectDto(uuid), false, defaults(), dtoPopulator); - } + return insertComponentAndBranchAndProject(ComponentTesting.newPublicProjectDto(), false, defaults(), dtoPopulator, p -> p.setUuid(uuid)); } public ProjectData insertPublicProject(ComponentDto componentDto) { @@ -131,11 +121,7 @@ public class ComponentDbTester { } public ProjectData insertPrivateProject(String uuid) { - if (useDifferentUuids) { - return insertComponentAndBranchAndProject(ComponentTesting.newPrivateProjectDto(), true, defaults(), defaults(), p -> p.setUuid(uuid)); - } else { - return insertComponentAndBranchAndProject(ComponentTesting.newPrivateProjectDto(uuid), true); - } + return insertComponentAndBranchAndProject(ComponentTesting.newPrivateProjectDto(), true, defaults(), defaults(), p -> p.setUuid(uuid)); } public final ProjectData insertPrivateProject(Consumer<ComponentDto> dtoPopulator) { @@ -165,11 +151,8 @@ public class ComponentDbTester { } public final ProjectData insertPrivateProject(String uuid, Consumer<ComponentDto> dtoPopulator) { - if (useDifferentUuids) { - return insertComponentAndBranchAndProject(ComponentTesting.newPrivateProjectDto(), true, defaults(), dtoPopulator, p -> p.setUuid(uuid)); - } else { - return insertComponentAndBranchAndProject(ComponentTesting.newPrivateProjectDto(uuid), true, defaults(), dtoPopulator); - } + return insertComponentAndBranchAndProject(ComponentTesting.newPrivateProjectDto(), true, defaults(), dtoPopulator, p -> p.setUuid(uuid)); + } public final ProjectData insertPrivateProjectWithCustomBranch(String branchKey) { @@ -310,7 +293,7 @@ public class ComponentDbTester { public void addPortfolioReference(String portfolioUuid, String... referencerUuids) { for (String uuid : referencerUuids) { EntityDto entityDto = dbClient.entityDao().selectByUuid(dbSession, uuid) - .orElseThrow(); + .orElseThrow(); switch (entityDto.getQualifier()) { case APP -> { BranchDto appMainBranch = dbClient.branchDao().selectMainBranchByProjectUuid(dbSession, entityDto.getUuid()) @@ -419,7 +402,7 @@ public class ComponentDbTester { Consumer<ComponentDto> componentDtoPopulator, Consumer<ProjectDto> projectDtoPopulator) { insertComponentImpl(component, isPrivate, componentDtoPopulator); - ProjectDto projectDto = toProjectDto(component, System2.INSTANCE.now(), useDifferentUuids); + ProjectDto projectDto = toProjectDto(component, System2.INSTANCE.now()); projectDtoPopulator.accept(projectDto); dbClient.projectDao().insert(dbSession, projectDto); @@ -577,14 +560,9 @@ public class ComponentDbTester { return branch; } - // TODO temporary constructor to quickly create project from previous project component. public static ProjectDto toProjectDto(ComponentDto componentDto, long createTime) { - return toProjectDto(componentDto, createTime, false); - } - - public static ProjectDto toProjectDto(ComponentDto componentDto, long createTime, boolean useDifferentProjectUuids) { return new ProjectDto() - .setUuid(useDifferentProjectUuids ? Uuids.createFast() : componentDto.uuid()) + .setUuid(Uuids.createFast()) .setKey(componentDto.getKey()) .setQualifier(componentDto.qualifier() != null ? componentDto.qualifier() : Qualifiers.PROJECT) .setCreatedAt(createTime) diff --git a/server/sonar-server-common/src/it/java/org/sonar/server/component/index/EntityDefinitionIndexerIT.java b/server/sonar-server-common/src/it/java/org/sonar/server/component/index/EntityDefinitionIndexerIT.java index ce5527dfef8..fcdee413f9a 100644 --- a/server/sonar-server-common/src/it/java/org/sonar/server/component/index/EntityDefinitionIndexerIT.java +++ b/server/sonar-server-common/src/it/java/org/sonar/server/component/index/EntityDefinitionIndexerIT.java @@ -59,7 +59,7 @@ public class EntityDefinitionIndexerIT { @Rule public EsTester es = EsTester.create(); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); private DbClient dbClient = db.getDbClient(); private DbSession dbSession = db.getSession(); diff --git a/server/sonar-server-common/src/it/java/org/sonar/server/es/BulkIndexerIT.java b/server/sonar-server-common/src/it/java/org/sonar/server/es/BulkIndexerIT.java index 83a8ec133ef..7a9bac079fb 100644 --- a/server/sonar-server-common/src/it/java/org/sonar/server/es/BulkIndexerIT.java +++ b/server/sonar-server-common/src/it/java/org/sonar/server/es/BulkIndexerIT.java @@ -54,7 +54,7 @@ public class BulkIndexerIT { @Rule public EsTester es = EsTester.createCustom(new FakeIndexDefinition().setReplicas(1)); @Rule - public DbTester dbTester = DbTester.create(testSystem2, true); + public DbTester dbTester = DbTester.create(testSystem2); @Rule public LogTester logTester = new LogTester(); diff --git a/server/sonar-server-common/src/it/java/org/sonar/server/es/OneToManyResilientIndexingListenerIT.java b/server/sonar-server-common/src/it/java/org/sonar/server/es/OneToManyResilientIndexingListenerIT.java index d47ae7d441f..f5afa0a9a18 100644 --- a/server/sonar-server-common/src/it/java/org/sonar/server/es/OneToManyResilientIndexingListenerIT.java +++ b/server/sonar-server-common/src/it/java/org/sonar/server/es/OneToManyResilientIndexingListenerIT.java @@ -40,7 +40,7 @@ public class OneToManyResilientIndexingListenerIT { @Rule public EsTester es = EsTester.create(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Test public void ES_QUEUE_rows_are_deleted_when_all_docs_are_successfully_indexed() { diff --git a/server/sonar-server-common/src/it/java/org/sonar/server/es/OneToOneResilientIndexingListenerIT.java b/server/sonar-server-common/src/it/java/org/sonar/server/es/OneToOneResilientIndexingListenerIT.java index c4e822dffdb..92c474d7727 100644 --- a/server/sonar-server-common/src/it/java/org/sonar/server/es/OneToOneResilientIndexingListenerIT.java +++ b/server/sonar-server-common/src/it/java/org/sonar/server/es/OneToOneResilientIndexingListenerIT.java @@ -40,7 +40,7 @@ public class OneToOneResilientIndexingListenerIT { @Rule public EsTester es = EsTester.create(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Test public void onSuccess_deletes_rows_from_ES_QUEUE_table() { diff --git a/server/sonar-server-common/src/it/java/org/sonar/server/favorite/FavoriteUpdaterIT.java b/server/sonar-server-common/src/it/java/org/sonar/server/favorite/FavoriteUpdaterIT.java index 62619aa8568..b56f9fec737 100644 --- a/server/sonar-server-common/src/it/java/org/sonar/server/favorite/FavoriteUpdaterIT.java +++ b/server/sonar-server-common/src/it/java/org/sonar/server/favorite/FavoriteUpdaterIT.java @@ -36,7 +36,7 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy; public class FavoriteUpdaterIT { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private DbClient dbClient = db.getDbClient(); private DbSession dbSession = db.getSession(); diff --git a/server/sonar-server-common/src/it/java/org/sonar/server/issue/index/IssueIndexerIT.java b/server/sonar-server-common/src/it/java/org/sonar/server/issue/index/IssueIndexerIT.java index 6634ed703fa..16d4e3db3bc 100644 --- a/server/sonar-server-common/src/it/java/org/sonar/server/issue/index/IssueIndexerIT.java +++ b/server/sonar-server-common/src/it/java/org/sonar/server/issue/index/IssueIndexerIT.java @@ -77,7 +77,7 @@ public class IssueIndexerIT { @Rule public EsTester es = EsTester.create(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public LogTester logTester = new LogTester(); diff --git a/server/sonar-server-common/src/it/java/org/sonar/server/issue/index/IssueIteratorFactoryIT.java b/server/sonar-server-common/src/it/java/org/sonar/server/issue/index/IssueIteratorFactoryIT.java index 12b64198c85..2a4e1052b8e 100644 --- a/server/sonar-server-common/src/it/java/org/sonar/server/issue/index/IssueIteratorFactoryIT.java +++ b/server/sonar-server-common/src/it/java/org/sonar/server/issue/index/IssueIteratorFactoryIT.java @@ -42,7 +42,7 @@ import static org.sonar.db.issue.IssueTesting.newCodeReferenceIssue; public class IssueIteratorFactoryIT { @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); @Test public void iterator_over_one_issue() { diff --git a/server/sonar-server-common/src/it/java/org/sonar/server/issue/notification/NewIssuesNotificationIT.java b/server/sonar-server-common/src/it/java/org/sonar/server/issue/notification/NewIssuesNotificationIT.java index 047163be23b..d1af6a85f96 100644 --- a/server/sonar-server-common/src/it/java/org/sonar/server/issue/notification/NewIssuesNotificationIT.java +++ b/server/sonar-server-common/src/it/java/org/sonar/server/issue/notification/NewIssuesNotificationIT.java @@ -56,7 +56,7 @@ import static org.sonar.server.issue.notification.NewIssuesStatistics.Metric.TAG public class NewIssuesNotificationIT { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private DetailsSupplier detailsSupplier = mock(DetailsSupplier.class); private NewIssuesNotification underTest = new NewIssuesNotification(new Durations(), detailsSupplier); diff --git a/server/sonar-server-common/src/it/java/org/sonar/server/measure/index/ProjectMeasuresIndexerIT.java b/server/sonar-server-common/src/it/java/org/sonar/server/measure/index/ProjectMeasuresIndexerIT.java index cc4f834dce2..9775e32eeae 100644 --- a/server/sonar-server-common/src/it/java/org/sonar/server/measure/index/ProjectMeasuresIndexerIT.java +++ b/server/sonar-server-common/src/it/java/org/sonar/server/measure/index/ProjectMeasuresIndexerIT.java @@ -71,7 +71,7 @@ public class ProjectMeasuresIndexerIT { @Rule public EsTester es = EsTester.create(); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); private final ProjectMeasuresIndexer underTest = new ProjectMeasuresIndexer(db.getDbClient(), es.client()); diff --git a/server/sonar-server-common/src/it/java/org/sonar/server/metric/MetricFinderIT.java b/server/sonar-server-common/src/it/java/org/sonar/server/metric/MetricFinderIT.java index e78f8ab3f10..81b527327ef 100644 --- a/server/sonar-server-common/src/it/java/org/sonar/server/metric/MetricFinderIT.java +++ b/server/sonar-server-common/src/it/java/org/sonar/server/metric/MetricFinderIT.java @@ -33,7 +33,7 @@ import static org.sonar.db.metric.MetricTesting.newMetricDto; public class MetricFinderIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final MetricFinder underTest = new MetricFinder(db.getDbClient()); diff --git a/server/sonar-server-common/src/it/java/org/sonar/server/platform/StartupMetadataProviderIT.java b/server/sonar-server-common/src/it/java/org/sonar/server/platform/StartupMetadataProviderIT.java index c880520ec52..6bb87bbbd2d 100644 --- a/server/sonar-server-common/src/it/java/org/sonar/server/platform/StartupMetadataProviderIT.java +++ b/server/sonar-server-common/src/it/java/org/sonar/server/platform/StartupMetadataProviderIT.java @@ -42,7 +42,7 @@ public class StartupMetadataProviderIT { private static final long A_DATE = 1_500_000_000_000L; @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private final StartupMetadataProvider underTest = new StartupMetadataProvider(); private final System2 system = mock(System2.class); diff --git a/server/sonar-server-common/src/it/java/org/sonar/server/platform/monitoring/DbSectionIT.java b/server/sonar-server-common/src/it/java/org/sonar/server/platform/monitoring/DbSectionIT.java index e8975a4f29e..6ce981076c2 100644 --- a/server/sonar-server-common/src/it/java/org/sonar/server/platform/monitoring/DbSectionIT.java +++ b/server/sonar-server-common/src/it/java/org/sonar/server/platform/monitoring/DbSectionIT.java @@ -38,7 +38,7 @@ import static org.sonar.process.systeminfo.SystemInfoUtils.attribute; public class DbSectionIT { @Rule - public final DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public final DbTester dbTester = DbTester.create(System2.INSTANCE); @Test public void db_info() { diff --git a/server/sonar-server-common/src/it/java/org/sonar/server/qualitygate/QualityGateFinderIT.java b/server/sonar-server-common/src/it/java/org/sonar/server/qualitygate/QualityGateFinderIT.java index a62be6f3360..35325d17c37 100644 --- a/server/sonar-server-common/src/it/java/org/sonar/server/qualitygate/QualityGateFinderIT.java +++ b/server/sonar-server-common/src/it/java/org/sonar/server/qualitygate/QualityGateFinderIT.java @@ -33,7 +33,7 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy; public class QualityGateFinderIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final DbSession dbSession = db.getSession(); diff --git a/server/sonar-server-common/src/it/java/org/sonar/server/qualityprofile/index/ActiveRuleIndexerIT.java b/server/sonar-server-common/src/it/java/org/sonar/server/qualityprofile/index/ActiveRuleIndexerIT.java index 6ea019a4f9c..60ffc0f0a06 100644 --- a/server/sonar-server-common/src/it/java/org/sonar/server/qualityprofile/index/ActiveRuleIndexerIT.java +++ b/server/sonar-server-common/src/it/java/org/sonar/server/qualityprofile/index/ActiveRuleIndexerIT.java @@ -47,7 +47,7 @@ public class ActiveRuleIndexerIT { private System2 system2 = System2.INSTANCE; @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); @Rule public EsTester es = EsTester.create(); diff --git a/server/sonar-server-common/src/it/java/org/sonar/server/rule/DefaultRuleFinderIT.java b/server/sonar-server-common/src/it/java/org/sonar/server/rule/DefaultRuleFinderIT.java index 15a6ebc9e0f..619ffd88f91 100644 --- a/server/sonar-server-common/src/it/java/org/sonar/server/rule/DefaultRuleFinderIT.java +++ b/server/sonar-server-common/src/it/java/org/sonar/server/rule/DefaultRuleFinderIT.java @@ -41,7 +41,7 @@ import static org.mockito.Mockito.mock; public class DefaultRuleFinderIT { @org.junit.Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private final DbClient dbClient = dbTester.getDbClient(); private final DbSession session = dbTester.getSession(); diff --git a/server/sonar-server-common/src/it/java/org/sonar/server/rule/index/RuleIndexIT.java b/server/sonar-server-common/src/it/java/org/sonar/server/rule/index/RuleIndexIT.java index 03c10802891..6a391e43abb 100644 --- a/server/sonar-server-common/src/it/java/org/sonar/server/rule/index/RuleIndexIT.java +++ b/server/sonar-server-common/src/it/java/org/sonar/server/rule/index/RuleIndexIT.java @@ -99,7 +99,7 @@ public class RuleIndexIT { @Rule public EsTester es = EsTester.create(); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); private final RuleIndexer ruleIndexer = new RuleIndexer(es.client(), db.getDbClient()); private final ActiveRuleIndexer activeRuleIndexer = new ActiveRuleIndexer(db.getDbClient(), es.client()); diff --git a/server/sonar-server-common/src/it/java/org/sonar/server/rule/index/RuleIndexerIT.java b/server/sonar-server-common/src/it/java/org/sonar/server/rule/index/RuleIndexerIT.java index fdc95b39dc4..d03ba3698f8 100644 --- a/server/sonar-server-common/src/it/java/org/sonar/server/rule/index/RuleIndexerIT.java +++ b/server/sonar-server-common/src/it/java/org/sonar/server/rule/index/RuleIndexerIT.java @@ -80,7 +80,7 @@ public class RuleIndexerIT { @Rule public EsTester es = EsTester.create(); @Rule - public DbTester dbTester = DbTester.create(true); + public DbTester dbTester = DbTester.create(); @Rule public LogTester logTester = new LogTester(); diff --git a/server/sonar-server-common/src/it/java/org/sonar/server/setting/DatabaseSettingLoaderIT.java b/server/sonar-server-common/src/it/java/org/sonar/server/setting/DatabaseSettingLoaderIT.java index 80f30a12f70..70afe0d814b 100644 --- a/server/sonar-server-common/src/it/java/org/sonar/server/setting/DatabaseSettingLoaderIT.java +++ b/server/sonar-server-common/src/it/java/org/sonar/server/setting/DatabaseSettingLoaderIT.java @@ -34,7 +34,7 @@ public class DatabaseSettingLoaderIT { private static final String A_KEY = "a_key"; @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private DatabaseSettingLoader underTest = new DatabaseSettingLoader(dbTester.getDbClient()); diff --git a/server/sonar-server-common/src/it/java/org/sonar/server/setting/ProjectConfigurationLoaderImplIT.java b/server/sonar-server-common/src/it/java/org/sonar/server/setting/ProjectConfigurationLoaderImplIT.java index dfd5763b783..a038c4d7028 100644 --- a/server/sonar-server-common/src/it/java/org/sonar/server/setting/ProjectConfigurationLoaderImplIT.java +++ b/server/sonar-server-common/src/it/java/org/sonar/server/setting/ProjectConfigurationLoaderImplIT.java @@ -32,7 +32,7 @@ import static org.assertj.core.api.Assertions.assertThat; public class ProjectConfigurationLoaderImplIT { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final static String GLOBAL_PROP_KEY = "GLOBAL_PROP_KEY"; private final static String GLOBAL_PROP_VALUE = "GLOBAL_PROP_VALUE"; diff --git a/server/sonar-server-common/src/it/java/org/sonar/server/view/index/ViewIndexerIT.java b/server/sonar-server-common/src/it/java/org/sonar/server/view/index/ViewIndexerIT.java index 33b45436085..91049330e8d 100644 --- a/server/sonar-server-common/src/it/java/org/sonar/server/view/index/ViewIndexerIT.java +++ b/server/sonar-server-common/src/it/java/org/sonar/server/view/index/ViewIndexerIT.java @@ -49,7 +49,7 @@ public class ViewIndexerIT { @Rule public TestRule safeguardTimeout = new DisableOnDebug(Timeout.seconds(60)); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public EsTester es = EsTester.create(); diff --git a/server/sonar-server-common/src/it/java/org/sonar/server/webhook/AsynchronousWebHooksImplIT.java b/server/sonar-server-common/src/it/java/org/sonar/server/webhook/AsynchronousWebHooksImplIT.java index 5d1c8141b4f..e82990ec535 100644 --- a/server/sonar-server-common/src/it/java/org/sonar/server/webhook/AsynchronousWebHooksImplIT.java +++ b/server/sonar-server-common/src/it/java/org/sonar/server/webhook/AsynchronousWebHooksImplIT.java @@ -28,7 +28,6 @@ import org.sonar.api.ce.posttask.PostProjectAnalysisTask.LogStatistics; import org.sonar.api.utils.System2; import org.sonar.db.DbTester; import org.sonar.db.component.ComponentDbTester; -import org.sonar.db.component.ComponentDto; import org.sonar.db.project.ProjectDto; import org.sonar.db.webhook.WebhookDbTester; import org.sonar.server.async.AsyncExecution; @@ -48,7 +47,7 @@ public class AsynchronousWebHooksImplIT { private final System2 system2 = mock(System2.class); @Rule - public DbTester db = create(system2, true); + public DbTester db = create(system2); private final WebhookDbTester webhookDbTester = db.webhooks(); private final ComponentDbTester componentDbTester = db.components(); diff --git a/server/sonar-server-common/src/it/java/org/sonar/server/webhook/SynchronousWebHooksImplIT.java b/server/sonar-server-common/src/it/java/org/sonar/server/webhook/SynchronousWebHooksImplIT.java index 84dc0fff7c1..25efc4b62ba 100644 --- a/server/sonar-server-common/src/it/java/org/sonar/server/webhook/SynchronousWebHooksImplIT.java +++ b/server/sonar-server-common/src/it/java/org/sonar/server/webhook/SynchronousWebHooksImplIT.java @@ -30,7 +30,6 @@ import org.sonar.api.testfixtures.log.LogTester; import org.sonar.db.DbClient; import org.sonar.db.DbTester; import org.sonar.db.component.ComponentDbTester; -import org.sonar.db.component.ComponentDto; import org.sonar.db.project.ProjectDto; import org.sonar.db.webhook.WebhookDbTester; import org.sonar.server.async.AsyncExecution; @@ -96,9 +95,9 @@ public class SynchronousWebHooksImplIT { @Test public void do_nothing_if_no_webhooks() { - ComponentDto componentDto = componentDbTester.insertPrivateProject().getMainBranchComponent(); + ProjectDto projectDto = componentDbTester.insertPrivateProject().getProjectDto(); - underTest.sendProjectAnalysisUpdate(new WebHooks.Analysis(componentDto.uuid(), "1", "#1"), () -> mock); + underTest.sendProjectAnalysisUpdate(new WebHooks.Analysis(projectDto.getUuid(), "1", "#1"), () -> mock); assertThat(caller.countSent()).isZero(); assertNoWebhookLogs(); @@ -107,9 +106,9 @@ public class SynchronousWebHooksImplIT { @Test public void populates_log_statistics_even_if_no_webhooks() { - ComponentDto componentDto = componentDbTester.insertPrivateProject().getMainBranchComponent(); + ProjectDto projectDto = componentDbTester.insertPrivateProject().getProjectDto(); - underTest.sendProjectAnalysisUpdate(new WebHooks.Analysis(componentDto.uuid(), "1", "#1"), () -> mock, taskStatistics); + underTest.sendProjectAnalysisUpdate(new WebHooks.Analysis(projectDto.getUuid(), "1", "#1"), () -> mock, taskStatistics); assertThat(caller.countSent()).isZero(); assertNoWebhookLogs(); @@ -119,19 +118,19 @@ public class SynchronousWebHooksImplIT { @Test public void send_global_webhooks() { - ComponentDto componentDto = componentDbTester.insertPrivateProject().getMainBranchComponent(); + ProjectDto projectDto = componentDbTester.insertPrivateProject().getProjectDto(); webhookDbTester.insert(newGlobalWebhook().setName("First").setUrl("http://url1"), null, null); webhookDbTester.insert(newGlobalWebhook().setName("Second").setUrl("http://url2"), null, null); caller.enqueueSuccess(NOW, 200, 1_234); caller.enqueueFailure(NOW, new IOException("Fail to connect")); - underTest.sendProjectAnalysisUpdate(new WebHooks.Analysis(componentDto.uuid(), "1", "#1"), () -> mock, taskStatistics); + underTest.sendProjectAnalysisUpdate(new WebHooks.Analysis(projectDto.getUuid(), "1", "#1"), () -> mock, taskStatistics); assertThat(caller.countSent()).isEqualTo(2); assertThat(logTester.logs(DEBUG)).contains("Sent webhook 'First' | url=http://url1 | time=1234ms | status=200"); assertThat(logTester.logs(DEBUG)).contains("Failed to send webhook 'Second' | url=http://url2 | message=Fail to connect"); verify(deliveryStorage, times(2)).persist(any(WebhookDelivery.class)); - verify(deliveryStorage).purge(componentDto.uuid()); + verify(deliveryStorage).purge(projectDto.getUuid()); verifyLogStatistics(2, 0); } @@ -162,8 +161,8 @@ public class SynchronousWebHooksImplIT { webhookDbTester.insert(newWebhook(projectDto).setName("1First").setUrl("http://url1"), projectDto.getKey(), projectDto.getName()); webhookDbTester.insert(newWebhook(projectDto).setName("2Second").setUrl("http://url2"), projectDto.getKey(), projectDto.getName()); webhookDbTester.insert(newGlobalWebhook().setName("3Third").setUrl("http://url3"), null, null); - webhookDbTester.insert(newGlobalWebhook().setName("4Fourth").setUrl("http://url4"), null,null); - webhookDbTester.insert(newGlobalWebhook().setName("5Fifth").setUrl("http://url5"), null,null); + webhookDbTester.insert(newGlobalWebhook().setName("4Fourth").setUrl("http://url4"), null, null); + webhookDbTester.insert(newGlobalWebhook().setName("5Fifth").setUrl("http://url5"), null, null); caller.enqueueSuccess(NOW, 200, 1_234); caller.enqueueFailure(NOW, new IOException("Fail to connect 1")); caller.enqueueFailure(NOW, new IOException("Fail to connect 2")); diff --git a/server/sonar-server-common/src/it/java/org/sonar/server/webhook/WebhookDeliveryStorageIT.java b/server/sonar-server-common/src/it/java/org/sonar/server/webhook/WebhookDeliveryStorageIT.java index 398c678294f..e7bde6cbf02 100644 --- a/server/sonar-server-common/src/it/java/org/sonar/server/webhook/WebhookDeliveryStorageIT.java +++ b/server/sonar-server-common/src/it/java/org/sonar/server/webhook/WebhookDeliveryStorageIT.java @@ -47,7 +47,7 @@ public class WebhookDeliveryStorageIT { private final System2 system = mock(System2.class); @Rule - public final DbTester dbTester = DbTester.create(system, true); + public final DbTester dbTester = DbTester.create(system); private DbClient dbClient = dbTester.getDbClient(); private DbSession dbSession = dbTester.getSession(); diff --git a/server/sonar-webserver-api/src/it/java/org/sonar/server/plugins/DetectPluginChangeIT.java b/server/sonar-webserver-api/src/it/java/org/sonar/server/plugins/DetectPluginChangeIT.java index ef36ce7140f..412565ae931 100644 --- a/server/sonar-webserver-api/src/it/java/org/sonar/server/plugins/DetectPluginChangeIT.java +++ b/server/sonar-webserver-api/src/it/java/org/sonar/server/plugins/DetectPluginChangeIT.java @@ -35,7 +35,7 @@ import static org.mockito.Mockito.when; public class DetectPluginChangeIT { @Rule - public DbTester dbTester = DbTester.create(true); + public DbTester dbTester = DbTester.create(); private final ServerPluginRepository pluginRepository = new ServerPluginRepository(); private final DetectPluginChange detectPluginChange = new DetectPluginChange(pluginRepository, dbTester.getDbClient()); diff --git a/server/sonar-webserver-api/src/it/java/org/sonar/server/rule/CachingRuleFinderIT.java b/server/sonar-webserver-api/src/it/java/org/sonar/server/rule/CachingRuleFinderIT.java index df8b85bbbe8..5d0134b6f29 100644 --- a/server/sonar-webserver-api/src/it/java/org/sonar/server/rule/CachingRuleFinderIT.java +++ b/server/sonar-webserver-api/src/it/java/org/sonar/server/rule/CachingRuleFinderIT.java @@ -49,7 +49,7 @@ import static org.mockito.Mockito.when; public class CachingRuleFinderIT { @org.junit.Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private final DbClient dbClient = dbTester.getDbClient(); private final AlwaysIncreasingSystem2 system2 = new AlwaysIncreasingSystem2(); diff --git a/server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/PluginConsentVerifierTest.java b/server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/PluginConsentVerifierTest.java index 86fcf4eb1c0..813bac5d10d 100644 --- a/server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/PluginConsentVerifierTest.java +++ b/server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/PluginConsentVerifierTest.java @@ -42,7 +42,7 @@ import static org.sonar.core.plugin.PluginType.EXTERNAL; public class PluginConsentVerifierTest { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); @Rule public LogTester logTester = new LogTester(); diff --git a/server/sonar-webserver-api/src/test/java/org/sonar/server/project/ProjectDefaultVisibilityTest.java b/server/sonar-webserver-api/src/test/java/org/sonar/server/project/ProjectDefaultVisibilityTest.java index acf6c291849..3622ea583e4 100644 --- a/server/sonar-webserver-api/src/test/java/org/sonar/server/project/ProjectDefaultVisibilityTest.java +++ b/server/sonar-webserver-api/src/test/java/org/sonar/server/project/ProjectDefaultVisibilityTest.java @@ -30,7 +30,7 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy; public class ProjectDefaultVisibilityTest { @Rule - public final DbTester db = DbTester.create(true); + public final DbTester db = DbTester.create(); private final ProjectDefaultVisibility underTest = new ProjectDefaultVisibility(db.getDbClient()); diff --git a/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/CredentialsAuthenticationIT.java b/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/CredentialsAuthenticationIT.java index 8296a2127ea..c01aab38b72 100644 --- a/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/CredentialsAuthenticationIT.java +++ b/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/CredentialsAuthenticationIT.java @@ -57,7 +57,7 @@ public class CredentialsAuthenticationIT { private static final String DEPRECATED_HASH_METHOD = "SHA1"; @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private final DbClient dbClient = dbTester.getDbClient(); private final DbSession dbSession = dbTester.getSession(); private final HttpRequest request = mock(HttpRequest.class); diff --git a/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/CredentialsLocalAuthenticationIT.java b/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/CredentialsLocalAuthenticationIT.java index c9f7fd2eef9..495a58b86c0 100644 --- a/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/CredentialsLocalAuthenticationIT.java +++ b/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/CredentialsLocalAuthenticationIT.java @@ -50,7 +50,7 @@ public class CredentialsLocalAuthenticationIT { private static final String PBKDF2_SALT = generatePBKDF2Salt(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private static final Random RANDOM = new Random(); private static final MapSettings settings = new MapSettings(); diff --git a/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/DefaultAdminCredentialsVerifierImplIT.java b/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/DefaultAdminCredentialsVerifierImplIT.java index 80bed489670..924e98e0653 100644 --- a/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/DefaultAdminCredentialsVerifierImplIT.java +++ b/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/DefaultAdminCredentialsVerifierImplIT.java @@ -41,7 +41,7 @@ public class DefaultAdminCredentialsVerifierImplIT { private static final String ADMIN_LOGIN = "admin"; @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public LogTester logTester = new LogTester(); diff --git a/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/DefaultAdminCredentialsVerifierNotificationHandlerIT.java b/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/DefaultAdminCredentialsVerifierNotificationHandlerIT.java index cb7513341c7..39f76ec8ee2 100644 --- a/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/DefaultAdminCredentialsVerifierNotificationHandlerIT.java +++ b/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/DefaultAdminCredentialsVerifierNotificationHandlerIT.java @@ -41,7 +41,7 @@ import static org.sonar.db.permission.GlobalPermission.ADMINISTER; public class DefaultAdminCredentialsVerifierNotificationHandlerIT { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private EmailNotificationChannel emailNotificationChannel = mock(EmailNotificationChannel.class); diff --git a/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/GithubWebhookAuthenticationIT.java b/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/GithubWebhookAuthenticationIT.java index 8f6c1f7b448..90789a03cb8 100644 --- a/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/GithubWebhookAuthenticationIT.java +++ b/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/GithubWebhookAuthenticationIT.java @@ -65,7 +65,7 @@ public class GithubWebhookAuthenticationIT { public LogTester logTester = new LogTester(); @Rule - public final DbTester db = DbTester.create(true); + public final DbTester db = DbTester.create(); private final AuthenticationEvent authenticationEvent = mock(AuthenticationEvent.class); diff --git a/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/HttpHeadersAuthenticationIT.java b/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/HttpHeadersAuthenticationIT.java index 9855444d364..17ed9b60b07 100644 --- a/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/HttpHeadersAuthenticationIT.java +++ b/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/HttpHeadersAuthenticationIT.java @@ -64,7 +64,7 @@ public class HttpHeadersAuthenticationIT { private final MapSettings settings = new MapSettings().setProperty("sonar.internal.pbkdf2.iterations", "1"); @Rule - public DbTester db = DbTester.create(new AlwaysIncreasingSystem2(), true); + public DbTester db = DbTester.create(new AlwaysIncreasingSystem2()); @Rule public EsTester es = EsTester.create(); diff --git a/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/JwtHttpHandlerIT.java b/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/JwtHttpHandlerIT.java index 74cc978abc3..f95f815273b 100644 --- a/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/JwtHttpHandlerIT.java +++ b/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/JwtHttpHandlerIT.java @@ -72,7 +72,7 @@ public class JwtHttpHandlerIT { private static final long IN_FIVE_MINUTES = NOW + 5 * 60 * 1000L; @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private DbClient dbClient = db.getDbClient(); private DbSession dbSession = db.getSession(); diff --git a/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/UserLastConnectionDatesUpdaterImplIT.java b/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/UserLastConnectionDatesUpdaterImplIT.java index 8180d6ec4d6..ac514fb2643 100644 --- a/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/UserLastConnectionDatesUpdaterImplIT.java +++ b/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/UserLastConnectionDatesUpdaterImplIT.java @@ -37,7 +37,7 @@ public class UserLastConnectionDatesUpdaterImplIT { private static final long TWO_HOUR = ONE_HOUR * 2L; @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private System2 system2 = new TestSystem2().setNow(NOW); diff --git a/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/UserRegistrarImplIT.java b/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/UserRegistrarImplIT.java index aee97b7dad8..9024f6c24f6 100644 --- a/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/UserRegistrarImplIT.java +++ b/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/UserRegistrarImplIT.java @@ -79,7 +79,7 @@ public class UserRegistrarImplIT { private final MapSettings settings = new MapSettings().setProperty("sonar.internal.pbkdf2.iterations", "1"); @Rule - public DbTester db = DbTester.create(new AlwaysIncreasingSystem2(), true); + public DbTester db = DbTester.create(new AlwaysIncreasingSystem2()); @Rule public EsTester es = EsTester.create(); @Rule diff --git a/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/UserSessionInitializerIT.java b/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/UserSessionInitializerIT.java index c171731192c..294edb1194c 100644 --- a/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/UserSessionInitializerIT.java +++ b/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/UserSessionInitializerIT.java @@ -57,7 +57,7 @@ import static org.sonar.api.utils.DateUtils.formatDateTime; public class UserSessionInitializerIT { @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private ThreadLocalUserSession threadLocalSession = mock(ThreadLocalUserSession.class); private HttpRequest request = mock(HttpRequest.class); @@ -206,7 +206,7 @@ public class UserSessionInitializerIT { long expirationTimestamp = LocalDateTime.now().toInstant(ZoneOffset.UTC).toEpochMilli(); UserDto userDto = new UserDto(); UserTokenDto userTokenDto = new UserTokenDto().setExpirationDate(expirationTimestamp); - UserSession session = new TokenUserSession(DbTester.create(true).getDbClient(), userDto, userTokenDto); + UserSession session = new TokenUserSession(DbTester.create().getDbClient(), userDto, userTokenDto); when(authenticator.authenticate(request, response)).thenReturn(session); when(threadLocalSession.isLoggedIn()).thenReturn(true); diff --git a/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/purge/ExpiredSessionsCleanerIT.java b/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/purge/ExpiredSessionsCleanerIT.java index 06dd7c73a68..be5c626320f 100644 --- a/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/purge/ExpiredSessionsCleanerIT.java +++ b/server/sonar-webserver-auth/src/it/java/org/sonar/server/authentication/purge/ExpiredSessionsCleanerIT.java @@ -47,7 +47,7 @@ public class ExpiredSessionsCleanerIT { private TestSystem2 system2 = new TestSystem2().setNow(NOW); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); @Rule public LogTester logTester = new LogTester(); diff --git a/server/sonar-webserver-auth/src/it/java/org/sonar/server/user/ServerUserSessionIT.java b/server/sonar-webserver-auth/src/it/java/org/sonar/server/user/ServerUserSessionIT.java index 1e0fddad7e6..e7e6c7fed36 100644 --- a/server/sonar-webserver-auth/src/it/java/org/sonar/server/user/ServerUserSessionIT.java +++ b/server/sonar-webserver-auth/src/it/java/org/sonar/server/user/ServerUserSessionIT.java @@ -48,7 +48,7 @@ import static org.sonar.db.component.ComponentTesting.newProjectCopy; public class ServerUserSessionIT { @Rule - public final DbTester db = DbTester.create(System2.INSTANCE, true); + public final DbTester db = DbTester.create(System2.INSTANCE); private final DbClient dbClient = db.getDbClient(); @Test diff --git a/server/sonar-webserver-auth/src/it/java/org/sonar/server/user/TokenUserSessionIT.java b/server/sonar-webserver-auth/src/it/java/org/sonar/server/user/TokenUserSessionIT.java index abc8142eb2a..3d172a3086a 100644 --- a/server/sonar-webserver-auth/src/it/java/org/sonar/server/user/TokenUserSessionIT.java +++ b/server/sonar-webserver-auth/src/it/java/org/sonar/server/user/TokenUserSessionIT.java @@ -38,7 +38,7 @@ import static org.sonar.db.user.TokenType.USER_TOKEN; public class TokenUserSessionIT { @Rule - public final DbTester db = DbTester.create(System2.INSTANCE, true); + public final DbTester db = DbTester.create(System2.INSTANCE); private final DbClient dbClient = db.getDbClient(); @Test diff --git a/server/sonar-webserver-auth/src/it/java/org/sonar/server/user/UserUpdaterCreateIT.java b/server/sonar-webserver-auth/src/it/java/org/sonar/server/user/UserUpdaterCreateIT.java index 24bba2807d8..a5a437c20e9 100644 --- a/server/sonar-webserver-auth/src/it/java/org/sonar/server/user/UserUpdaterCreateIT.java +++ b/server/sonar-webserver-auth/src/it/java/org/sonar/server/user/UserUpdaterCreateIT.java @@ -66,7 +66,7 @@ public class UserUpdaterCreateIT { @Rule public EsTester es = EsTester.create(); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); private final DbClient dbClient = db.getDbClient(); private final NewUserNotifier newUserNotifier = mock(NewUserNotifier.class); diff --git a/server/sonar-webserver-auth/src/it/java/org/sonar/server/user/UserUpdaterReactivateIT.java b/server/sonar-webserver-auth/src/it/java/org/sonar/server/user/UserUpdaterReactivateIT.java index cc8f0960030..c05e8221515 100644 --- a/server/sonar-webserver-auth/src/it/java/org/sonar/server/user/UserUpdaterReactivateIT.java +++ b/server/sonar-webserver-auth/src/it/java/org/sonar/server/user/UserUpdaterReactivateIT.java @@ -51,7 +51,7 @@ public class UserUpdaterReactivateIT { private final System2 system2 = new AlwaysIncreasingSystem2(); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); private final DbClient dbClient = db.getDbClient(); private final NewUserNotifier newUserNotifier = mock(NewUserNotifier.class); diff --git a/server/sonar-webserver-auth/src/it/java/org/sonar/server/user/UserUpdaterUpdateIT.java b/server/sonar-webserver-auth/src/it/java/org/sonar/server/user/UserUpdaterUpdateIT.java index 10fd86c8291..db5491b698b 100644 --- a/server/sonar-webserver-auth/src/it/java/org/sonar/server/user/UserUpdaterUpdateIT.java +++ b/server/sonar-webserver-auth/src/it/java/org/sonar/server/user/UserUpdaterUpdateIT.java @@ -63,7 +63,7 @@ public class UserUpdaterUpdateIT { private final System2 system2 = new AlwaysIncreasingSystem2(); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); private final DbClient dbClient = db.getDbClient(); private final NewUserNotifier newUserNotifier = mock(NewUserNotifier.class); diff --git a/server/sonar-webserver-auth/src/it/java/org/sonar/server/usergroups/DefaultGroupFinderIT.java b/server/sonar-webserver-auth/src/it/java/org/sonar/server/usergroups/DefaultGroupFinderIT.java index 8808e731eab..e269b8fe249 100644 --- a/server/sonar-webserver-auth/src/it/java/org/sonar/server/usergroups/DefaultGroupFinderIT.java +++ b/server/sonar-webserver-auth/src/it/java/org/sonar/server/usergroups/DefaultGroupFinderIT.java @@ -31,7 +31,7 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy; public class DefaultGroupFinderIT { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final DefaultGroupFinder underTest = new DefaultGroupFinder(db.getDbClient()); diff --git a/server/sonar-webserver-auth/src/it/java/org/sonar/server/usertoken/UserTokenAuthenticationIT.java b/server/sonar-webserver-auth/src/it/java/org/sonar/server/usertoken/UserTokenAuthenticationIT.java index f40e77f3f17..756c69eb25b 100644 --- a/server/sonar-webserver-auth/src/it/java/org/sonar/server/usertoken/UserTokenAuthenticationIT.java +++ b/server/sonar-webserver-auth/src/it/java/org/sonar/server/usertoken/UserTokenAuthenticationIT.java @@ -73,7 +73,7 @@ public class UserTokenAuthenticationIT { private static final String GLOBAL_ANALYSIS_TOKEN_HASH = "global-analysis-token-hash"; @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final TokenGenerator tokenGenerator = mock(TokenGenerator.class); private final UserLastConnectionDatesUpdater userLastConnectionDatesUpdater = mock(UserLastConnectionDatesUpdater.class); diff --git a/server/sonar-webserver-auth/src/test/java/org/sonar/server/authentication/BasicAuthenticationTest.java b/server/sonar-webserver-auth/src/test/java/org/sonar/server/authentication/BasicAuthenticationTest.java index 4269f067c95..fe0c6f86fbd 100644 --- a/server/sonar-webserver-auth/src/test/java/org/sonar/server/authentication/BasicAuthenticationTest.java +++ b/server/sonar-webserver-auth/src/test/java/org/sonar/server/authentication/BasicAuthenticationTest.java @@ -25,7 +25,6 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.sonar.api.server.http.HttpRequest; -import org.sonar.api.utils.System2; import org.sonar.db.DbTester; import org.sonar.db.user.UserDto; import org.sonar.db.user.UserTesting; @@ -62,7 +61,7 @@ public class BasicAuthenticationTest { private static final String AUTHORIZATION_HEADER = "Authorization"; @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final CredentialsAuthentication credentialsAuthentication = mock(CredentialsAuthentication.class); private final UserTokenAuthentication userTokenAuthentication = mock(UserTokenAuthentication.class); diff --git a/server/sonar-webserver-core/src/it/java/org/sonar/server/platform/PersistentSettingsIT.java b/server/sonar-webserver-core/src/it/java/org/sonar/server/platform/PersistentSettingsIT.java index 2fb88e57f69..efa71811800 100644 --- a/server/sonar-webserver-core/src/it/java/org/sonar/server/platform/PersistentSettingsIT.java +++ b/server/sonar-webserver-core/src/it/java/org/sonar/server/platform/PersistentSettingsIT.java @@ -33,7 +33,7 @@ import static org.mockito.Mockito.verify; public class PersistentSettingsIT { @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private Settings delegate = new MapSettings(); private SettingsChangeNotifier changeNotifier = mock(SettingsChangeNotifier.class); private PersistentSettings underTest = new PersistentSettings(delegate, dbTester.getDbClient(), changeNotifier); diff --git a/server/sonar-webserver-core/src/it/java/org/sonar/server/platform/StartupMetadataPersisterIT.java b/server/sonar-webserver-core/src/it/java/org/sonar/server/platform/StartupMetadataPersisterIT.java index 3b31f020c8f..89d7050a583 100644 --- a/server/sonar-webserver-core/src/it/java/org/sonar/server/platform/StartupMetadataPersisterIT.java +++ b/server/sonar-webserver-core/src/it/java/org/sonar/server/platform/StartupMetadataPersisterIT.java @@ -32,7 +32,7 @@ import static org.assertj.core.api.Assertions.assertThat; public class StartupMetadataPersisterIT { @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private StartupMetadata metadata = new StartupMetadata(123_456_789L); private StartupMetadataPersister underTest = new StartupMetadataPersister(metadata, dbTester.getDbClient()); diff --git a/server/sonar-webserver-core/src/it/java/org/sonar/server/platform/serverid/ServerIdManagerIT.java b/server/sonar-webserver-core/src/it/java/org/sonar/server/platform/serverid/ServerIdManagerIT.java index 178d99ea61f..85754d2e20e 100644 --- a/server/sonar-webserver-core/src/it/java/org/sonar/server/platform/serverid/ServerIdManagerIT.java +++ b/server/sonar-webserver-core/src/it/java/org/sonar/server/platform/serverid/ServerIdManagerIT.java @@ -60,7 +60,7 @@ public class ServerIdManagerIT { private static final String CHECKSUM_1 = randomAlphanumeric(12); @Rule - public final DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public final DbTester dbTester = DbTester.create(System2.INSTANCE); private final ServerIdChecksum serverIdChecksum = mock(ServerIdChecksum.class); private final ServerIdFactory serverIdFactory = mock(ServerIdFactory.class); diff --git a/server/sonar-webserver-core/src/it/java/org/sonar/server/startup/RegisterMetricsIT.java b/server/sonar-webserver-core/src/it/java/org/sonar/server/startup/RegisterMetricsIT.java index 15ceb3456d4..1f1b1db9017 100644 --- a/server/sonar-webserver-core/src/it/java/org/sonar/server/startup/RegisterMetricsIT.java +++ b/server/sonar-webserver-core/src/it/java/org/sonar/server/startup/RegisterMetricsIT.java @@ -44,7 +44,7 @@ import static org.sonar.core.util.stream.MoreCollectors.uniqueIndex; public class RegisterMetricsIT { @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private final UuidFactory uuidFactory = new SequenceUuidFactory(); private final DbClient dbClient = dbTester.getDbClient(); diff --git a/server/sonar-webserver-core/src/it/java/org/sonar/server/startup/RegisterPluginsIT.java b/server/sonar-webserver-core/src/it/java/org/sonar/server/startup/RegisterPluginsIT.java index a52df0e30f4..52f24f023df 100644 --- a/server/sonar-webserver-core/src/it/java/org/sonar/server/startup/RegisterPluginsIT.java +++ b/server/sonar-webserver-core/src/it/java/org/sonar/server/startup/RegisterPluginsIT.java @@ -51,7 +51,7 @@ public class RegisterPluginsIT { @Rule public TemporaryFolder temp = new TemporaryFolder(); @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private final long now = 12345L; private final DbClient dbClient = dbTester.getDbClient(); diff --git a/server/sonar-webserver-core/src/it/java/org/sonar/server/startup/UpgradeSuggestionsCleanerIT.java b/server/sonar-webserver-core/src/it/java/org/sonar/server/startup/UpgradeSuggestionsCleanerIT.java index 6ad7798b84f..b621a7e8238 100644 --- a/server/sonar-webserver-core/src/it/java/org/sonar/server/startup/UpgradeSuggestionsCleanerIT.java +++ b/server/sonar-webserver-core/src/it/java/org/sonar/server/startup/UpgradeSuggestionsCleanerIT.java @@ -47,7 +47,7 @@ public class UpgradeSuggestionsCleanerIT { private static final String TASK_UUID = "b8d564dd-4ceb-4dba-8a3d-5fafa2d72cdf"; @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private final SonarRuntime sonarRuntime = mock(SonarRuntime.class); private final UpgradeSuggestionsCleaner underTest = new UpgradeSuggestionsCleaner(dbTester.getDbClient(), sonarRuntime); diff --git a/server/sonar-webserver-core/src/it/java/org/sonar/server/webhook/WebhookQGChangeEventListenerIT.java b/server/sonar-webserver-core/src/it/java/org/sonar/server/webhook/WebhookQGChangeEventListenerIT.java index da1561f6320..72ece76b976 100644 --- a/server/sonar-webserver-core/src/it/java/org/sonar/server/webhook/WebhookQGChangeEventListenerIT.java +++ b/server/sonar-webserver-core/src/it/java/org/sonar/server/webhook/WebhookQGChangeEventListenerIT.java @@ -72,7 +72,7 @@ public class WebhookQGChangeEventListenerIT { private static final Set<QGChangeEventListener.ChangedIssue> CHANGED_ISSUES_ARE_IGNORED = emptySet(); @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private DbClient dbClient = dbTester.getDbClient(); diff --git a/server/sonar-webserver-core/src/test/java/org/sonar/server/issue/index/AsyncIssueIndexingImplTest.java b/server/sonar-webserver-core/src/test/java/org/sonar/server/issue/index/AsyncIssueIndexingImplTest.java index 0618cc255bf..fca9cbc6ae2 100644 --- a/server/sonar-webserver-core/src/test/java/org/sonar/server/issue/index/AsyncIssueIndexingImplTest.java +++ b/server/sonar-webserver-core/src/test/java/org/sonar/server/issue/index/AsyncIssueIndexingImplTest.java @@ -65,7 +65,7 @@ import static org.sonar.db.component.SnapshotDto.STATUS_PROCESSED; public class AsyncIssueIndexingImplTest { @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); @Rule public LogTester logTester = new LogTester(); diff --git a/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/db/CheckAnyonePermissionsAtStartupTest.java b/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/db/CheckAnyonePermissionsAtStartupTest.java index db0b42ec19f..8b04f0dbec1 100644 --- a/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/db/CheckAnyonePermissionsAtStartupTest.java +++ b/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/db/CheckAnyonePermissionsAtStartupTest.java @@ -42,7 +42,7 @@ public class CheckAnyonePermissionsAtStartupTest { @ClassRule public static LogTester logTester = new LogTester().setLevel(LoggerLevel.WARN); @Rule - public final DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public final DbTester dbTester = DbTester.create(System2.INSTANCE); private final DbClient dbClient = dbTester.getDbClient(); private final MapSettings settings = new MapSettings(); private final CheckAnyonePermissionsAtStartup underTest = new CheckAnyonePermissionsAtStartup(dbClient, settings.asConfig()); diff --git a/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/db/CheckLanguageSpecificParamsAtStartupTest.java b/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/db/CheckLanguageSpecificParamsAtStartupTest.java index 99521ea0844..5c2c8fa06fd 100644 --- a/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/db/CheckLanguageSpecificParamsAtStartupTest.java +++ b/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/db/CheckLanguageSpecificParamsAtStartupTest.java @@ -42,7 +42,7 @@ public class CheckLanguageSpecificParamsAtStartupTest { @ClassRule public static LogTester logTester = new LogTester().setLevel(LoggerLevel.WARN); @Rule - public final DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public final DbTester dbTester = DbTester.create(System2.INSTANCE); private final MapSettings settings = new MapSettings(); private final CheckLanguageSpecificParamsAtStartup underTest = new CheckLanguageSpecificParamsAtStartup(settings.asConfig()); diff --git a/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/monitoring/AlmConfigurationSectionTest.java b/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/monitoring/AlmConfigurationSectionTest.java index 508d982c16b..21a7b6ca663 100644 --- a/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/monitoring/AlmConfigurationSectionTest.java +++ b/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/monitoring/AlmConfigurationSectionTest.java @@ -32,7 +32,7 @@ import static org.assertj.core.api.Assertions.tuple; public class AlmConfigurationSectionTest { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private AlmConfigurationSection underTest = new AlmConfigurationSection(db.getDbClient()); diff --git a/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/monitoring/DbConnectionSectionIT.java b/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/monitoring/DbConnectionSectionIT.java index 3a6407b2d8e..f5f0e5241d8 100644 --- a/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/monitoring/DbConnectionSectionIT.java +++ b/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/monitoring/DbConnectionSectionIT.java @@ -36,7 +36,7 @@ import static org.sonar.process.systeminfo.SystemInfoUtils.attribute; public class DbConnectionSectionIT { @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private final DatabaseVersion databaseVersion = mock(DatabaseVersion.class); private final SonarRuntime runtime = mock(SonarRuntime.class); diff --git a/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/monitoring/SettingsSectionTest.java b/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/monitoring/SettingsSectionTest.java index 9b6aca552c7..a402a307134 100644 --- a/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/monitoring/SettingsSectionTest.java +++ b/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/monitoring/SettingsSectionTest.java @@ -49,7 +49,7 @@ public class SettingsSectionTest { private static final String PASSWORD_PROPERTY = "sonar.password"; @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private PropertyDefinitions defs = new PropertyDefinitions(System2.INSTANCE, PropertyDefinition.builder(PASSWORD_PROPERTY).type(PropertyType.PASSWORD).build()); private Settings settings = new MapSettings(defs); diff --git a/server/sonar-webserver-core/src/test/java/org/sonar/server/qualitygate/ProjectsInWarningDaemonTest.java b/server/sonar-webserver-core/src/test/java/org/sonar/server/qualitygate/ProjectsInWarningDaemonTest.java index 9e692a74f51..41c36debff3 100644 --- a/server/sonar-webserver-core/src/test/java/org/sonar/server/qualitygate/ProjectsInWarningDaemonTest.java +++ b/server/sonar-webserver-core/src/test/java/org/sonar/server/qualitygate/ProjectsInWarningDaemonTest.java @@ -53,7 +53,7 @@ import static org.sonar.server.qualitygate.ProjectsInWarningDaemon.PROJECTS_IN_W public class ProjectsInWarningDaemonTest { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public EsTester es = EsTester.create(); @Rule diff --git a/server/sonar-webserver-core/src/test/java/org/sonar/server/rule/RegisterRulesTest.java b/server/sonar-webserver-core/src/test/java/org/sonar/server/rule/RegisterRulesTest.java index dd1ca1e7cfe..89a8a76de27 100644 --- a/server/sonar-webserver-core/src/test/java/org/sonar/server/rule/RegisterRulesTest.java +++ b/server/sonar-webserver-core/src/test/java/org/sonar/server/rule/RegisterRulesTest.java @@ -130,7 +130,7 @@ public class RegisterRulesTest { private final TestSystem2 system = new TestSystem2().setNow(DATE1.getTime()); @org.junit.Rule - public DbTester db = DbTester.create(system, true); + public DbTester db = DbTester.create(system); @org.junit.Rule public EsTester es = EsTester.create(); @org.junit.Rule diff --git a/server/sonar-webserver-core/src/test/java/org/sonar/server/startup/RegisterPermissionTemplatesTest.java b/server/sonar-webserver-core/src/test/java/org/sonar/server/startup/RegisterPermissionTemplatesTest.java index 3ed6b292343..113fcaeb441 100644 --- a/server/sonar-webserver-core/src/test/java/org/sonar/server/startup/RegisterPermissionTemplatesTest.java +++ b/server/sonar-webserver-core/src/test/java/org/sonar/server/startup/RegisterPermissionTemplatesTest.java @@ -43,7 +43,7 @@ import static org.sonar.server.property.InternalProperties.DEFAULT_PROJECT_TEMPL public class RegisterPermissionTemplatesTest { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); @Rule public LogTester logTester = new LogTester(); diff --git a/server/sonar-webserver-core/src/test/java/org/sonar/server/telemetry/TelemetryDataLoaderImplTest.java b/server/sonar-webserver-core/src/test/java/org/sonar/server/telemetry/TelemetryDataLoaderImplTest.java index 52755ce7ca7..2bfc6b6064f 100644 --- a/server/sonar-webserver-core/src/test/java/org/sonar/server/telemetry/TelemetryDataLoaderImplTest.java +++ b/server/sonar-webserver-core/src/test/java/org/sonar/server/telemetry/TelemetryDataLoaderImplTest.java @@ -103,7 +103,7 @@ public class TelemetryDataLoaderImplTest { private final TestSystem2 system2 = new TestSystem2().setNow(NOW); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); private final FakeServer server = new FakeServer(); private final PluginRepository pluginRepository = mock(PluginRepository.class); diff --git a/server/sonar-webserver-es/src/it/java/org/sonar/server/permission/index/PermissionIndexerDaoIT.java b/server/sonar-webserver-es/src/it/java/org/sonar/server/permission/index/PermissionIndexerDaoIT.java index f5a62707ef3..f61242f47e1 100644 --- a/server/sonar-webserver-es/src/it/java/org/sonar/server/permission/index/PermissionIndexerDaoIT.java +++ b/server/sonar-webserver-es/src/it/java/org/sonar/server/permission/index/PermissionIndexerDaoIT.java @@ -55,7 +55,7 @@ import static org.sonar.api.web.UserRole.USER; public class PermissionIndexerDaoIT { @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE,true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private final DbClient dbClient = dbTester.getDbClient(); private final DbSession dbSession = dbTester.getSession(); diff --git a/server/sonar-webserver-es/src/test/java/org/sonar/server/component/index/ComponentIndexSearchTest.java b/server/sonar-webserver-es/src/test/java/org/sonar/server/component/index/ComponentIndexSearchTest.java index bc98d029d74..1a36cb4adb8 100644 --- a/server/sonar-webserver-es/src/test/java/org/sonar/server/component/index/ComponentIndexSearchTest.java +++ b/server/sonar-webserver-es/src/test/java/org/sonar/server/component/index/ComponentIndexSearchTest.java @@ -46,7 +46,7 @@ public class ComponentIndexSearchTest { @Rule public EsTester es = EsTester.create(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); @Rule public UserSessionRule userSession = UserSessionRule.standalone().logIn(); @Rule diff --git a/server/sonar-webserver-es/src/test/java/org/sonar/server/component/index/ComponentIndexTest.java b/server/sonar-webserver-es/src/test/java/org/sonar/server/component/index/ComponentIndexTest.java index 7ccbf3d3f41..4d9a30d19b5 100644 --- a/server/sonar-webserver-es/src/test/java/org/sonar/server/component/index/ComponentIndexTest.java +++ b/server/sonar-webserver-es/src/test/java/org/sonar/server/component/index/ComponentIndexTest.java @@ -26,7 +26,6 @@ import org.assertj.core.api.ListAssert; import org.junit.Rule; import org.sonar.api.utils.System2; import org.sonar.db.DbTester; -import org.sonar.db.component.ComponentDbTester; import org.sonar.db.entity.EntityDto; import org.sonar.db.project.ProjectDto; import org.sonar.server.es.EsTester; @@ -45,7 +44,7 @@ public abstract class ComponentIndexTest { @Rule public EsTester es = EsTester.create(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-es/src/test/java/org/sonar/server/es/RecoveryIndexerTest.java b/server/sonar-webserver-es/src/test/java/org/sonar/server/es/RecoveryIndexerTest.java index 44d133b3b3f..b0babe898c4 100644 --- a/server/sonar-webserver-es/src/test/java/org/sonar/server/es/RecoveryIndexerTest.java +++ b/server/sonar-webserver-es/src/test/java/org/sonar/server/es/RecoveryIndexerTest.java @@ -41,7 +41,6 @@ import org.sonar.api.config.internal.MapSettings; import org.sonar.api.impl.utils.TestSystem2; import org.sonar.api.utils.MessageException; import org.sonar.api.testfixtures.log.LogTester; -import org.sonar.api.utils.log.LoggerLevel; import org.sonar.db.DbSession; import org.sonar.db.DbTester; import org.sonar.db.es.EsQueueDto; @@ -67,7 +66,7 @@ public class RecoveryIndexerTest { @Rule public EsTester es = EsTester.createCustom(); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); @Rule public LogTester logTester = new LogTester().setLevel(TRACE); @Rule diff --git a/server/sonar-webserver-es/src/test/java/org/sonar/server/issue/index/IssueIndexSyncProgressCheckerTest.java b/server/sonar-webserver-es/src/test/java/org/sonar/server/issue/index/IssueIndexSyncProgressCheckerTest.java index 2e888fdb0ef..c9cab2dc339 100644 --- a/server/sonar-webserver-es/src/test/java/org/sonar/server/issue/index/IssueIndexSyncProgressCheckerTest.java +++ b/server/sonar-webserver-es/src/test/java/org/sonar/server/issue/index/IssueIndexSyncProgressCheckerTest.java @@ -38,7 +38,6 @@ import org.sonar.db.ce.CeQueueDto.Status; import org.sonar.db.ce.CeTaskTypes; import org.sonar.db.component.ComponentDto; import org.sonar.db.component.ProjectData; -import org.sonar.db.project.ProjectDto; import org.sonar.server.es.EsIndexSyncInProgressException; import static org.assertj.core.api.Assertions.assertThat; @@ -52,7 +51,7 @@ public class IssueIndexSyncProgressCheckerTest { private final System2 system2 = new System2(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final IssueIndexSyncProgressChecker underTest = new IssueIndexSyncProgressChecker(db.getDbClient()); diff --git a/server/sonar-webserver-es/src/test/java/org/sonar/server/issue/index/IssueIndexTestCommon.java b/server/sonar-webserver-es/src/test/java/org/sonar/server/issue/index/IssueIndexTestCommon.java index 762cf3ddfd4..4fea3b36ef9 100644 --- a/server/sonar-webserver-es/src/test/java/org/sonar/server/issue/index/IssueIndexTestCommon.java +++ b/server/sonar-webserver-es/src/test/java/org/sonar/server/issue/index/IssueIndexTestCommon.java @@ -52,7 +52,7 @@ public class IssueIndexTestCommon { public UserSessionRule userSessionRule = UserSessionRule.standalone(); protected final System2 system2 = new TestSystem2().setNow(1_500_000_000_000L).setDefaultTimeZone(getTimeZone("GMT-01:00")); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); private final AsyncIssueIndexing asyncIssueIndexing = mock(AsyncIssueIndexing.class); protected final IssueIndexer issueIndexer = new IssueIndexer(es.client(), db.getDbClient(), new IssueIteratorFactory(db.getDbClient()), asyncIssueIndexing); diff --git a/server/sonar-webserver-es/src/test/java/org/sonar/server/issue/index/IssueQueryFactoryTest.java b/server/sonar-webserver-es/src/test/java/org/sonar/server/issue/index/IssueQueryFactoryTest.java index 9a95f7fb319..a7d8ddbeb82 100644 --- a/server/sonar-webserver-es/src/test/java/org/sonar/server/issue/index/IssueQueryFactoryTest.java +++ b/server/sonar-webserver-es/src/test/java/org/sonar/server/issue/index/IssueQueryFactoryTest.java @@ -69,7 +69,7 @@ public class IssueQueryFactoryTest { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public LogTester logTester = new LogTester(); diff --git a/server/sonar-webserver-es/src/test/java/org/sonar/server/permission/index/PermissionIndexerTest.java b/server/sonar-webserver-es/src/test/java/org/sonar/server/permission/index/PermissionIndexerTest.java index 279b63ce578..7e93ed7f4d8 100644 --- a/server/sonar-webserver-es/src/test/java/org/sonar/server/permission/index/PermissionIndexerTest.java +++ b/server/sonar-webserver-es/src/test/java/org/sonar/server/permission/index/PermissionIndexerTest.java @@ -53,7 +53,7 @@ public class PermissionIndexerTest { private static final IndexMainType INDEX_TYPE_FOO_AUTH = IndexType.main(FooIndexDefinition.DESCRIPTOR, TYPE_AUTHORIZATION); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); @Rule public EsTester es = EsTester.createCustom(new FooIndexDefinition()); @Rule diff --git a/server/sonar-webserver-pushapi/src/it/java/org/sonar/server/pushapi/scheduler/purge/PushEventsPurgeSchedulerAndExecutorIT.java b/server/sonar-webserver-pushapi/src/it/java/org/sonar/server/pushapi/scheduler/purge/PushEventsPurgeSchedulerAndExecutorIT.java index 05aa404d9ae..0600d517b21 100644 --- a/server/sonar-webserver-pushapi/src/it/java/org/sonar/server/pushapi/scheduler/purge/PushEventsPurgeSchedulerAndExecutorIT.java +++ b/server/sonar-webserver-pushapi/src/it/java/org/sonar/server/pushapi/scheduler/purge/PushEventsPurgeSchedulerAndExecutorIT.java @@ -47,7 +47,7 @@ public class PushEventsPurgeSchedulerAndExecutorIT { private static final long INITIAL_AND_ENQUE_DELAY_MS = 1L; @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private PushEventsPurgeScheduler pushEventsPurgeScheduler; diff --git a/server/sonar-webserver-pushapi/src/test/java/org/sonar/server/pushapi/hotspots/HotspotChangeEventServiceImplTest.java b/server/sonar-webserver-pushapi/src/test/java/org/sonar/server/pushapi/hotspots/HotspotChangeEventServiceImplTest.java index eb23f13987a..ae2a6dd52bd 100644 --- a/server/sonar-webserver-pushapi/src/test/java/org/sonar/server/pushapi/hotspots/HotspotChangeEventServiceImplTest.java +++ b/server/sonar-webserver-pushapi/src/test/java/org/sonar/server/pushapi/hotspots/HotspotChangeEventServiceImplTest.java @@ -35,7 +35,7 @@ import static org.sonar.test.JsonAssert.assertJson; public class HotspotChangeEventServiceImplTest { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); public final HotspotChangeEventServiceImpl underTest = new HotspotChangeEventServiceImpl(db.getDbClient()); diff --git a/server/sonar-webserver-pushapi/src/test/java/org/sonar/server/pushapi/issues/IssueChangeEventServiceImplTest.java b/server/sonar-webserver-pushapi/src/test/java/org/sonar/server/pushapi/issues/IssueChangeEventServiceImplTest.java index 05b3efeb779..7a528fee3db 100644 --- a/server/sonar-webserver-pushapi/src/test/java/org/sonar/server/pushapi/issues/IssueChangeEventServiceImplTest.java +++ b/server/sonar-webserver-pushapi/src/test/java/org/sonar/server/pushapi/issues/IssueChangeEventServiceImplTest.java @@ -59,7 +59,7 @@ import static org.sonarqube.ws.Common.Severity.MAJOR; public class IssueChangeEventServiceImplTest { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); public final IssueChangeEventServiceImpl underTest = new IssueChangeEventServiceImpl(db.getDbClient()); diff --git a/server/sonar-webserver-pushapi/src/test/java/org/sonar/server/pushapi/qualityprofile/QualityProfileChangeEventServiceImplTest.java b/server/sonar-webserver-pushapi/src/test/java/org/sonar/server/pushapi/qualityprofile/QualityProfileChangeEventServiceImplTest.java index 2e20b2656bb..4044f821e29 100644 --- a/server/sonar-webserver-pushapi/src/test/java/org/sonar/server/pushapi/qualityprofile/QualityProfileChangeEventServiceImplTest.java +++ b/server/sonar-webserver-pushapi/src/test/java/org/sonar/server/pushapi/qualityprofile/QualityProfileChangeEventServiceImplTest.java @@ -58,7 +58,7 @@ import static org.sonar.server.qualityprofile.ActiveRuleChange.Type.ACTIVATED; public class QualityProfileChangeEventServiceImplTest { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); public final QualityProfileChangeEventServiceImpl underTest = new QualityProfileChangeEventServiceImpl(db.getDbClient()); diff --git a/server/sonar-webserver-pushapi/src/test/java/org/sonar/server/pushapi/scheduler/polling/PushEventPollSchedulerTest.java b/server/sonar-webserver-pushapi/src/test/java/org/sonar/server/pushapi/scheduler/polling/PushEventPollSchedulerTest.java index f88eb44c467..c50a12f9475 100644 --- a/server/sonar-webserver-pushapi/src/test/java/org/sonar/server/pushapi/scheduler/polling/PushEventPollSchedulerTest.java +++ b/server/sonar-webserver-pushapi/src/test/java/org/sonar/server/pushapi/scheduler/polling/PushEventPollSchedulerTest.java @@ -55,7 +55,7 @@ public class PushEventPollSchedulerTest { private final Configuration config = mock(Configuration.class); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); private final SyncPushEventExecutorService executorService = new SyncPushEventExecutorService(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/CheckPatActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/CheckPatActionIT.java index bd46070e6ee..7bac4b067ce 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/CheckPatActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/CheckPatActionIT.java @@ -55,7 +55,7 @@ public class CheckPatActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final AzureDevOpsHttpClient azureDevOpsPrHttpClient = mock(AzureDevOpsHttpClient.class); private final BitbucketCloudRestClient bitbucketCloudRestClient = mock(BitbucketCloudRestClient.class); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/ImportHelperIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/ImportHelperIT.java index 4e536b3c097..8f1fa9486c8 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/ImportHelperIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/ImportHelperIT.java @@ -46,7 +46,7 @@ public class ImportHelperIT { private final Request request = mock(Request.class); @Rule - public final DbTester db = DbTester.create(system2, true); + public final DbTester db = DbTester.create(system2); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/SetPatActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/SetPatActionIT.java index 94515399fa9..2c685028cf7 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/SetPatActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/SetPatActionIT.java @@ -44,7 +44,7 @@ public class SetPatActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final WsActionTester ws = new WsActionTester(new SetPatAction(db.getDbClient(), userSession)); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/azure/ImportAzureProjectActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/azure/ImportAzureProjectActionIT.java index b532fdf0a52..a5002f75844 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/azure/ImportAzureProjectActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/azure/ImportAzureProjectActionIT.java @@ -83,7 +83,7 @@ public class ImportAzureProjectActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public final I18nRule i18n = new I18nRule(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/azure/ListAzureProjectsActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/azure/ListAzureProjectsActionIT.java index 0a018636df4..0537f628749 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/azure/ListAzureProjectsActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/azure/ListAzureProjectsActionIT.java @@ -54,7 +54,7 @@ public class ListAzureProjectsActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final AzureDevOpsHttpClient azureDevOpsHttpClient = mock(AzureDevOpsHttpClient.class); private final WsActionTester ws = new WsActionTester(new ListAzureProjectsAction(db.getDbClient(), userSession, azureDevOpsHttpClient)); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/azure/SearchAzureReposActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/azure/SearchAzureReposActionIT.java index 00c1f5fc792..cd7e3d4f465 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/azure/SearchAzureReposActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/azure/SearchAzureReposActionIT.java @@ -59,7 +59,7 @@ public class SearchAzureReposActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final AzureDevOpsHttpClient azureDevOpsHttpClient = mock(AzureDevOpsHttpClient.class); private final Encryption encryption = mock(Encryption.class); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/bitbucketcloud/ImportBitbucketCloudRepoActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/bitbucketcloud/ImportBitbucketCloudRepoActionIT.java index ba9dc340a71..4dad88d801a 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/bitbucketcloud/ImportBitbucketCloudRepoActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/bitbucketcloud/ImportBitbucketCloudRepoActionIT.java @@ -83,7 +83,7 @@ public class ImportBitbucketCloudRepoActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public final I18nRule i18n = new I18nRule(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/bitbucketcloud/SearchBitbucketCloudReposActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/bitbucketcloud/SearchBitbucketCloudReposActionIT.java index 3647f78bcbc..288f4c5537c 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/bitbucketcloud/SearchBitbucketCloudReposActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/bitbucketcloud/SearchBitbucketCloudReposActionIT.java @@ -58,7 +58,7 @@ public class SearchBitbucketCloudReposActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final BitbucketCloudRestClient bitbucketCloudRestClient = mock(BitbucketCloudRestClient.class); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/bitbucketserver/ImportBitbucketServerProjectActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/bitbucketserver/ImportBitbucketServerProjectActionIT.java index 61e41602355..19bd876d6c6 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/bitbucketserver/ImportBitbucketServerProjectActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/bitbucketserver/ImportBitbucketServerProjectActionIT.java @@ -88,7 +88,7 @@ public class ImportBitbucketServerProjectActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public final I18nRule i18n = new I18nRule(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/bitbucketserver/ListBitbucketServerProjectsActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/bitbucketserver/ListBitbucketServerProjectsActionIT.java index 2160ab0ae59..a85ced70e71 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/bitbucketserver/ListBitbucketServerProjectsActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/bitbucketserver/ListBitbucketServerProjectsActionIT.java @@ -55,7 +55,7 @@ public class ListBitbucketServerProjectsActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final BitbucketServerRestClient bitbucketServerRestClient = mock(BitbucketServerRestClient.class); private final WsActionTester ws = new WsActionTester(new ListBitbucketServerProjectsAction(db.getDbClient(), userSession, bitbucketServerRestClient)); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/bitbucketserver/SearchBitbucketServerReposActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/bitbucketserver/SearchBitbucketServerReposActionIT.java index f8e06515b1b..9dfd9e7de09 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/bitbucketserver/SearchBitbucketServerReposActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/bitbucketserver/SearchBitbucketServerReposActionIT.java @@ -58,7 +58,7 @@ public class SearchBitbucketServerReposActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final BitbucketServerRestClient bitbucketServerRestClient = mock(BitbucketServerRestClient.class); private final ProjectAlmSettingDao projectAlmSettingDao = db.getDbClient().projectAlmSettingDao(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/github/GetGithubClientIdActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/github/GetGithubClientIdActionIT.java index ed8b5c6665e..5ffa676c65d 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/github/GetGithubClientIdActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/github/GetGithubClientIdActionIT.java @@ -46,7 +46,7 @@ public class GetGithubClientIdActionIT { private final System2 system2 = mock(System2.class); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); private final WsActionTester ws = new WsActionTester(new GetGithubClientIdAction(db.getDbClient(), userSession)); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/github/ImportGithubProjectActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/github/ImportGithubProjectActionIT.java index ec75c90e2a5..add47316106 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/github/ImportGithubProjectActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/github/ImportGithubProjectActionIT.java @@ -83,7 +83,7 @@ public class ImportGithubProjectActionIT { private final DefaultBranchNameResolver defaultBranchNameResolver = mock(DefaultBranchNameResolver.class); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); private final ComponentUpdater componentUpdater = new ComponentUpdater(db.getDbClient(), mock(I18n.class), System2.INSTANCE, diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/github/ListGithubOrganizationsActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/github/ListGithubOrganizationsActionIT.java index 518e575cdce..472e9e701aa 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/github/ListGithubOrganizationsActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/github/ListGithubOrganizationsActionIT.java @@ -72,7 +72,7 @@ public class ListGithubOrganizationsActionIT { private final GithubApplicationClientImpl appClient = mock(GithubApplicationClientImpl.class); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); private final WsActionTester ws = new WsActionTester(new ListGithubOrganizationsAction(db.getDbClient(), settings, userSession, appClient)); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/github/ListGithubRepositoriesActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/github/ListGithubRepositoriesActionIT.java index 3913b54bc9b..2b3f0119428 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/github/ListGithubRepositoriesActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/github/ListGithubRepositoriesActionIT.java @@ -62,7 +62,7 @@ public class ListGithubRepositoriesActionIT { private final GithubApplicationClientImpl appClient = mock(GithubApplicationClientImpl.class); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); private final ProjectAlmSettingDao projectAlmSettingDao = db.getDbClient().projectAlmSettingDao(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/gitlab/ImportGitLabProjectActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/gitlab/ImportGitLabProjectActionIT.java index 7c81d1c26f2..d1eb836920e 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/gitlab/ImportGitLabProjectActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/gitlab/ImportGitLabProjectActionIT.java @@ -78,7 +78,7 @@ public class ImportGitLabProjectActionIT { public UserSessionRule userSession = standalone(); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); DefaultBranchNameResolver defaultBranchNameResolver = mock(DefaultBranchNameResolver.class); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/gitlab/SearchGitlabReposActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/gitlab/SearchGitlabReposActionIT.java index 60d264120c2..95707c614b6 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/gitlab/SearchGitlabReposActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almintegration/ws/gitlab/SearchGitlabReposActionIT.java @@ -57,7 +57,7 @@ public class SearchGitlabReposActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final GitlabHttpClient gitlabHttpClient = mock(GitlabHttpClient.class); private final WsActionTester ws = new WsActionTester(new SearchGitlabReposAction(db.getDbClient(), userSession, diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/CountBindingActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/CountBindingActionIT.java index 0ca3dd1fa8c..9ace49429ca 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/CountBindingActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/CountBindingActionIT.java @@ -45,7 +45,7 @@ public class CountBindingActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private WsActionTester ws = new WsActionTester(new CountBindingAction(db.getDbClient(), userSession, new AlmSettingsSupport(db.getDbClient(), userSession, new ComponentFinder(db.getDbClient(), null), diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/CreateAzureActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/CreateAzureActionIT.java index 6bd11d5964b..e543d039ecb 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/CreateAzureActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/CreateAzureActionIT.java @@ -45,7 +45,7 @@ public class CreateAzureActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final Encryption encryption = mock(Encryption.class); private final MultipleAlmFeature multipleAlmFeature = mock(MultipleAlmFeature.class); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/CreateBitbucketActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/CreateBitbucketActionIT.java index 9b837dd0fa8..f9b270f87d1 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/CreateBitbucketActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/CreateBitbucketActionIT.java @@ -45,7 +45,7 @@ public class CreateBitbucketActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final Encryption encryption = mock(Encryption.class); private final MultipleAlmFeature multipleAlmFeature = mock(MultipleAlmFeature.class); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/CreateBitbucketCloudActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/CreateBitbucketCloudActionIT.java index 984444fe4fd..07d907af827 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/CreateBitbucketCloudActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/CreateBitbucketCloudActionIT.java @@ -47,7 +47,7 @@ public class CreateBitbucketCloudActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final Encryption encryption = mock(Encryption.class); private final MultipleAlmFeature multipleAlmFeature = mock(MultipleAlmFeature.class); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/CreateGithubActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/CreateGithubActionIT.java index a5e426b35d2..7c0d645471e 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/CreateGithubActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/CreateGithubActionIT.java @@ -52,7 +52,7 @@ public class CreateGithubActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final Encryption encryption = mock(Encryption.class); private final MultipleAlmFeature multipleAlmFeature = mock(MultipleAlmFeature.class); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/CreateGitlabActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/CreateGitlabActionIT.java index 6a8cef1fc98..d9bbbf3545a 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/CreateGitlabActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/CreateGitlabActionIT.java @@ -47,7 +47,7 @@ public class CreateGitlabActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private static String GITLAB_URL = "gitlab.com/api/v4"; diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/DeleteActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/DeleteActionIT.java index 7d84f8e6c82..3b25ca67c63 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/DeleteActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/DeleteActionIT.java @@ -44,7 +44,7 @@ public class DeleteActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private WsActionTester ws = new WsActionTester(new DeleteAction(db.getDbClient(), userSession, new AlmSettingsSupport(db.getDbClient(), userSession, new ComponentFinder(db.getDbClient(), null), diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/GetBindingActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/GetBindingActionIT.java index 3b95e2404d6..df702438dca 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/GetBindingActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/GetBindingActionIT.java @@ -47,7 +47,7 @@ public class GetBindingActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private WsActionTester ws = new WsActionTester(new GetBindingAction(db.getDbClient(), userSession, new ComponentFinder(db.getDbClient(), null))); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/ListActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/ListActionIT.java index ae3b0273622..4b5c1e6f244 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/ListActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/ListActionIT.java @@ -51,7 +51,7 @@ public class ListActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final ComponentFinder componentFinder = new ComponentFinder(db.getDbClient(), mock(ResourceTypes.class)); private final WsActionTester ws = new WsActionTester(new ListAction(db.getDbClient(), userSession, componentFinder)); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/ListDefinitionsActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/ListDefinitionsActionIT.java index bfc92da812b..900150ed5a7 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/ListDefinitionsActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/ListDefinitionsActionIT.java @@ -51,7 +51,7 @@ public class ListDefinitionsActionIT { private final System2 system2 = mock(System2.class); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); private final WsActionTester ws = new WsActionTester(new ListDefinitionsAction(db.getDbClient(), userSession)); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/UpdateAzureActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/UpdateAzureActionIT.java index 46272fae699..c18eff3296f 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/UpdateAzureActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/UpdateAzureActionIT.java @@ -44,7 +44,7 @@ public class UpdateAzureActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private static String AZURE_URL = "https://ado.sonarqube.com/"; diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/UpdateBitbucketActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/UpdateBitbucketActionIT.java index 6b53a6025cc..854a74f952b 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/UpdateBitbucketActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/UpdateBitbucketActionIT.java @@ -44,7 +44,7 @@ public class UpdateBitbucketActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final Encryption encryption = mock(Encryption.class); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/UpdateBitbucketCloudActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/UpdateBitbucketCloudActionIT.java index df07160ab88..ab42beea7e4 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/UpdateBitbucketCloudActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/UpdateBitbucketCloudActionIT.java @@ -49,7 +49,7 @@ public class UpdateBitbucketCloudActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final Encryption encryption = mock(Encryption.class); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/UpdateGithubActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/UpdateGithubActionIT.java index f33464939d5..2dc242938ad 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/UpdateGithubActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/UpdateGithubActionIT.java @@ -65,7 +65,7 @@ public class UpdateGithubActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(auditPersister, true); + public DbTester db = DbTester.create(auditPersister); private final Encryption encryption = mock(Encryption.class); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/UpdateGitlabActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/UpdateGitlabActionIT.java index ca08883ee04..bb6bd4187c9 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/UpdateGitlabActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/UpdateGitlabActionIT.java @@ -48,7 +48,7 @@ public class UpdateGitlabActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private static String GITLAB_URL = "gitlab.com/api/v4"; diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/ValidateActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/ValidateActionIT.java index a505b9c94ba..0706aa466fc 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/ValidateActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/almsettings/ws/ValidateActionIT.java @@ -62,7 +62,7 @@ public class ValidateActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final MultipleAlmFeature multipleAlmFeature = mock(MultipleAlmFeature.class); private final ComponentFinder componentFinder = new ComponentFinder(db.getDbClient(), mock(ResourceTypes.class)); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/authentication/ws/LoginActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/authentication/ws/LoginActionIT.java index dd9675acce9..e9f7ce8169d 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/authentication/ws/LoginActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/authentication/ws/LoginActionIT.java @@ -58,7 +58,7 @@ public class LoginActionIT { private static final String PASSWORD = "PASSWORD"; @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private final DbClient dbClient = dbTester.getDbClient(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/badge/ws/MeasureActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/badge/ws/MeasureActionIT.java index c68e8c57253..311e9be3edc 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/badge/ws/MeasureActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/badge/ws/MeasureActionIT.java @@ -39,7 +39,6 @@ import org.sonar.api.server.ws.WebService; import org.sonar.api.server.ws.WebService.Param; import org.sonar.core.util.UuidFactoryFast; import org.sonar.db.DbTester; -import org.sonar.db.component.BranchType; import org.sonar.db.component.ComponentDto; import org.sonar.db.component.ComponentTesting; import org.sonar.db.component.ProjectData; @@ -84,7 +83,7 @@ public class MeasureActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final MapSettings mapSettings = new MapSettings(); private final Configuration config = mapSettings.asConfig(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/badge/ws/QualityGateActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/badge/ws/QualityGateActionIT.java index 6f86262e5a1..0995757dd93 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/badge/ws/QualityGateActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/badge/ws/QualityGateActionIT.java @@ -68,7 +68,7 @@ public class QualityGateActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final MapSettings mapSettings = new MapSettings().setProperty(CoreProperties.CORE_FORCE_AUTHENTICATION_PROPERTY, false); private final Configuration config = mapSettings.asConfig(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/badge/ws/TokenActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/badge/ws/TokenActionIT.java index 74e4fcfdb1e..80d3d54674e 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/badge/ws/TokenActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/badge/ws/TokenActionIT.java @@ -40,7 +40,7 @@ import static org.mockito.Mockito.when; public class TokenActionIT { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/badge/ws/TokenRenewActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/badge/ws/TokenRenewActionIT.java index 6caeda42ecd..ba26d03faad 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/badge/ws/TokenRenewActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/badge/ws/TokenRenewActionIT.java @@ -27,7 +27,6 @@ import org.mockito.Mockito; import org.sonar.api.utils.System2; import org.sonar.api.web.UserRole; import org.sonar.db.DbTester; -import org.sonar.db.component.ComponentDto; import org.sonar.db.component.ProjectData; import org.sonar.db.project.ProjectBadgeTokenDto; import org.sonar.db.project.ProjectDto; @@ -48,7 +47,7 @@ public class TokenRenewActionIT { private final System2 system2 = mock(System2.class); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/batch/ProjectDataLoaderIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/batch/ProjectDataLoaderIT.java index 87548ab745e..c0d47cd8749 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/batch/ProjectDataLoaderIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/batch/ProjectDataLoaderIT.java @@ -46,7 +46,7 @@ import static org.sonar.db.permission.GlobalPermission.SCAN; public class ProjectDataLoaderIT { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/branch/ws/DeleteActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/branch/ws/DeleteActionIT.java index 040aa8cfef4..fd675a91327 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/branch/ws/DeleteActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/branch/ws/DeleteActionIT.java @@ -49,7 +49,7 @@ import static org.mockito.Mockito.verify; public class DeleteActionIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final ComponentCleanerService componentCleanerService = mock(ComponentCleanerService.class); private final ComponentFinder componentFinder = TestComponentFinder.from(db); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/branch/ws/ListActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/branch/ws/ListActionIT.java index fe7e36f333f..213a55e283d 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/branch/ws/ListActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/branch/ws/ListActionIT.java @@ -68,7 +68,7 @@ import static org.sonar.test.JsonAssert.assertJson; public class ListActionIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); @Rule public EsTester es = EsTester.create(); @Rule diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/branch/ws/RenameActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/branch/ws/RenameActionIT.java index 40ceee56eea..db3b1f096d8 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/branch/ws/RenameActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/branch/ws/RenameActionIT.java @@ -44,7 +44,7 @@ import static org.sonar.api.resources.Qualifiers.PROJECT; public class RenameActionIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/branch/ws/SetAutomaticDeletionProtectionActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/branch/ws/SetAutomaticDeletionProtectionActionIT.java index 6c9f91fbadd..0468ad17e0d 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/branch/ws/SetAutomaticDeletionProtectionActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/branch/ws/SetAutomaticDeletionProtectionActionIT.java @@ -45,7 +45,7 @@ import static org.sonar.db.component.BranchDto.DEFAULT_MAIN_BRANCH_NAME; public class SetAutomaticDeletionProtectionActionIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/projectdump/ExportSubmitterImplIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/projectdump/ExportSubmitterImplIT.java index 77af733c9c9..a6796644141 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/projectdump/ExportSubmitterImplIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/projectdump/ExportSubmitterImplIT.java @@ -28,7 +28,6 @@ import org.sonar.core.util.UuidFactoryFast; import org.sonar.db.DbClient; import org.sonar.db.DbTester; import org.sonar.db.ce.CeQueueDto; -import org.sonar.db.component.ComponentDto; import org.sonar.db.project.ProjectDto; import org.sonar.server.platform.NodeInformation; @@ -43,7 +42,7 @@ public class ExportSubmitterImplIT { private final System2 system2 = System2.INSTANCE; @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); private final DbClient dbClient = db.getDbClient(); private final CeQueue ceQueue = new CeQueueImpl(system2, db.getDbClient(), UuidFactoryFast.getInstance(), mock(NodeInformation.class)); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/queue/BranchReportSubmitterIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/queue/BranchReportSubmitterIT.java index f2a7f498dd7..e41ad6f5ce9 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/queue/BranchReportSubmitterIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/queue/BranchReportSubmitterIT.java @@ -85,7 +85,7 @@ public class BranchReportSubmitterIT { @Rule public final UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public final DbTester db = DbTester.create(System2.INSTANCE, true); + public final DbTester db = DbTester.create(System2.INSTANCE); private final ProjectDefaultVisibility projectDefaultVisibility = mock(ProjectDefaultVisibility.class); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/queue/CeQueueCleanerIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/queue/CeQueueCleanerIT.java index 15a207a14c1..d474bd14a6a 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/queue/CeQueueCleanerIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/queue/CeQueueCleanerIT.java @@ -23,7 +23,6 @@ import java.util.Optional; import org.apache.commons.io.IOUtils; import org.junit.Rule; import org.junit.Test; -import org.sonar.api.config.internal.MapSettings; import org.sonar.api.platform.ServerUpgradeStatus; import org.sonar.api.utils.System2; import org.sonar.ce.queue.CeQueue; @@ -32,18 +31,16 @@ import org.sonar.db.DbTester; import org.sonar.db.ce.CeQueueDto; import org.sonar.db.ce.CeTaskInputDao; import org.sonar.db.ce.CeTaskTypes; -import org.sonar.process.ProcessProperties; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; public class CeQueueCleanerIT { @Rule - public final DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public final DbTester dbTester = DbTester.create(System2.INSTANCE); private final ServerUpgradeStatus serverUpgradeStatus = mock(ServerUpgradeStatus.class); private final CeQueue queue = mock(CeQueue.class); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/queue/ReportSubmitterIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/queue/ReportSubmitterIT.java index 16b61c3698f..8eb6efbc793 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/queue/ReportSubmitterIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/queue/ReportSubmitterIT.java @@ -81,7 +81,7 @@ public class ReportSubmitterIT { @Rule public final UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public final DbTester db = DbTester.create(true); + public final DbTester db = DbTester.create(); private final ProjectDefaultVisibility projectDefaultVisibility = mock(ProjectDefaultVisibility.class); private final DefaultBranchNameResolver defaultBranchNameResolver = mock(DefaultBranchNameResolver.class); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/ws/ActivityActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/ws/ActivityActionIT.java index 4a73f0d8ad2..0f06e7200be 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/ws/ActivityActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/ws/ActivityActionIT.java @@ -39,14 +39,11 @@ import org.sonar.db.ce.CeTaskCharacteristicDto; import org.sonar.db.ce.CeTaskMessageDto; import org.sonar.db.ce.CeTaskMessageType; import org.sonar.db.ce.CeTaskTypes; -import org.sonar.db.component.BranchDto; import org.sonar.db.component.BranchType; import org.sonar.db.component.ComponentDto; import org.sonar.db.component.PortfolioData; import org.sonar.db.component.ProjectData; import org.sonar.db.component.SnapshotDto; -import org.sonar.db.portfolio.PortfolioDto; -import org.sonar.db.project.ProjectDto; import org.sonar.server.exceptions.BadRequestException; import org.sonar.server.exceptions.ForbiddenException; import org.sonar.server.exceptions.NotFoundException; @@ -93,7 +90,7 @@ public class ActivityActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final TaskFormatter formatter = new TaskFormatter(db.getDbClient(), System2.INSTANCE); private final ActivityAction underTest = new ActivityAction(userSession, db.getDbClient(), formatter, new CeTaskProcessor[]{mock(CeTaskProcessor.class)}); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/ws/ActivityStatusActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/ws/ActivityStatusActionIT.java index 50f9942c718..d8f16629f16 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/ws/ActivityStatusActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/ws/ActivityStatusActionIT.java @@ -55,7 +55,7 @@ public class ActivityStatusActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone().logIn().setSystemAdministrator(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final System2 system2 = mock(System2.class); private final DbClient dbClient = db.getDbClient(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/ws/AnalysisStatusActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/ws/AnalysisStatusActionIT.java index 358af795f97..5cfe22c349f 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/ws/AnalysisStatusActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/ws/AnalysisStatusActionIT.java @@ -68,7 +68,7 @@ public class AnalysisStatusActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); DbClient dbClient = db.getDbClient(); WsActionTester ws = new WsActionTester(new AnalysisStatusAction(userSession, dbClient, TestComponentFinder.from(db))); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/ws/CancelActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/ws/CancelActionIT.java index d148bc5dfa3..02d2dd18ee0 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/ws/CancelActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/ws/CancelActionIT.java @@ -52,7 +52,7 @@ public class CancelActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private System2 system2 = new TestSystem2(); private CeQueue queue = new CeQueueImpl(system2, db.getDbClient(), UuidFactoryFast.getInstance(), mock(NodeInformation.class)); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/ws/ComponentActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/ws/ComponentActionIT.java index abe94b0d7b8..219ad666f72 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/ws/ComponentActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/ws/ComponentActionIT.java @@ -65,7 +65,7 @@ public class ComponentActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final TaskFormatter formatter = new TaskFormatter(db.getDbClient(), System2.INSTANCE); private final ComponentAction underTest = new ComponentAction(userSession, db.getDbClient(), formatter, TestComponentFinder.from(db)); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/ws/DismissAnalysisWarningActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/ws/DismissAnalysisWarningActionIT.java index 61fcfe1148f..6f7c2edea43 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/ws/DismissAnalysisWarningActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/ws/DismissAnalysisWarningActionIT.java @@ -56,7 +56,7 @@ public class DismissAnalysisWarningActionIT { public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private static int counter = 1; diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/ws/IndexationStatusActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/ws/IndexationStatusActionIT.java index d0934f5a498..71a39a57f74 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/ws/IndexationStatusActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/ws/IndexationStatusActionIT.java @@ -46,7 +46,7 @@ public class IndexationStatusActionIT { public IssueIndexSyncProgressChecker issueIndexSyncProgressCheckerMock = mock(IssueIndexSyncProgressChecker.class); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private WsActionTester ws = new WsActionTester(new IndexationStatusAction(db.getDbClient(), issueIndexSyncProgressCheckerMock)); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/ws/TaskActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/ws/TaskActionIT.java index 558b90a4447..425e40f5ceb 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/ws/TaskActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ce/ws/TaskActionIT.java @@ -69,7 +69,7 @@ public class TaskActionIT { public final UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public final DbTester db = DbTester.create(System2.INSTANCE, true); + public final DbTester db = DbTester.create(System2.INSTANCE); private final TaskFormatter formatter = new TaskFormatter(db.getDbClient(), System2.INSTANCE); private final TaskAction underTest = new TaskAction(db.getDbClient(), formatter, userSession); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ComponentCleanerServiceIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ComponentCleanerServiceIT.java index 97e2095c1f3..27f04b321a7 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ComponentCleanerServiceIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ComponentCleanerServiceIT.java @@ -53,7 +53,7 @@ public class ComponentCleanerServiceIT { private final System2 system2 = System2.INSTANCE; @Rule - public final DbTester db = DbTester.create(system2, true); + public final DbTester db = DbTester.create(system2); private final DbClient dbClient = db.getDbClient(); private final DbSession dbSession = db.getSession(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ComponentFinderIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ComponentFinderIT.java index 26a7beb3916..04441479d7a 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ComponentFinderIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ComponentFinderIT.java @@ -42,7 +42,7 @@ import static org.sonar.server.component.ComponentFinder.ParamNames.ID_AND_KEY; public class ComponentFinderIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final DbSession dbSession = db.getSession(); private final ComponentFinder underTest = TestComponentFinder.from(db); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ComponentServiceUpdateKeyIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ComponentServiceUpdateKeyIT.java index cebfeaff1f7..30280f2d3cd 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ComponentServiceUpdateKeyIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ComponentServiceUpdateKeyIT.java @@ -51,7 +51,7 @@ public class ComponentServiceUpdateKeyIT { @Rule public final UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public final DbTester db = DbTester.create(system2, true); + public final DbTester db = DbTester.create(system2); private DbClient dbClient = db.getDbClient(); private DbSession dbSession = db.getSession(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ComponentUpdaterIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ComponentUpdaterIT.java index 807b8b01a6e..817967fb2a4 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ComponentUpdaterIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ComponentUpdaterIT.java @@ -66,7 +66,7 @@ public class ComponentUpdaterIT { private final System2 system2 = System2.INSTANCE; @Rule - public final DbTester db = DbTester.create(system2, true); + public final DbTester db = DbTester.create(system2); @Rule public final I18nRule i18n = new I18nRule().put("qualifier.TRK", "Project"); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ws/AppActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ws/AppActionIT.java index 1800a26da9d..3f4fc3ffe47 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ws/AppActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ws/AppActionIT.java @@ -57,7 +57,7 @@ public class AppActionIT { @Rule public final UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public final DbTester db = DbTester.create(true); + public final DbTester db = DbTester.create(); private final ComponentViewerJsonWriter componentViewerJsonWriter = new ComponentViewerJsonWriter(db.getDbClient()); private final WsActionTester ws = new WsActionTester(new AppAction(db.getDbClient(), userSession, diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ws/SearchActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ws/SearchActionIT.java index c89ff22122e..6fc54104e68 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ws/SearchActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ws/SearchActionIT.java @@ -70,7 +70,7 @@ public class SearchActionIT { @Rule public final UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public final DbTester db = DbTester.create(System2.INSTANCE, true); + public final DbTester db = DbTester.create(System2.INSTANCE); @Rule public final EsTester es = EsTester.create(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ws/SearchProjectsActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ws/SearchProjectsActionIT.java index c50e4ed2ed6..586c78b23ef 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ws/SearchProjectsActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ws/SearchProjectsActionIT.java @@ -123,7 +123,7 @@ public class SearchProjectsActionIT { @Rule public final EsTester es = EsTester.create(); @Rule - public final DbTester db = DbTester.create(System2.INSTANCE, true); + public final DbTester db = DbTester.create(System2.INSTANCE); @DataProvider public static Object[][] rating_metric_keys() { diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ws/ShowActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ws/ShowActionIT.java index 5b93b1cf72a..38a3ae9daec 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ws/ShowActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ws/ShowActionIT.java @@ -66,7 +66,7 @@ public class ShowActionIT { @Rule public final UserSessionRule userSession = UserSessionRule.standalone().logIn(); @Rule - public final DbTester db = DbTester.create(System2.INSTANCE, true); + public final DbTester db = DbTester.create(System2.INSTANCE); private final WsActionTester ws = new WsActionTester(new ShowAction(userSession, db.getDbClient(), TestComponentFinder.from(db), new IssueIndexSyncProgressChecker(db.getDbClient()))); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ws/SuggestionsActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ws/SuggestionsActionIT.java index a88b8c3316c..17dc94f5a5f 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ws/SuggestionsActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ws/SuggestionsActionIT.java @@ -82,7 +82,7 @@ public class SuggestionsActionIT { .collect(MoreCollectors.toList()).toArray(new String[0]); @Rule - public final DbTester db = DbTester.create(System2.INSTANCE, true); + public final DbTester db = DbTester.create(System2.INSTANCE); @Rule public final EsTester es = EsTester.create(); @Rule diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ws/TreeActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ws/TreeActionIT.java index 40d09c15a4f..8c1ff9c38c9 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ws/TreeActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ws/TreeActionIT.java @@ -83,7 +83,7 @@ public class TreeActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final DbClient dbClient = db.getDbClient(); private final ResourceTypes defaultResourceTypes = new ResourceTypes(new ResourceTypeTree[]{DefaultResourceTypes.get()}); private final ResourceTypesRule resourceTypes = new ResourceTypesRule() diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/developers/ws/SearchEventsActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/developers/ws/SearchEventsActionIT.java index 0ac6f5d7c21..b7ee645d51f 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/developers/ws/SearchEventsActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/developers/ws/SearchEventsActionIT.java @@ -76,7 +76,7 @@ public class SearchEventsActionIT { .toArray(RuleType[]::new); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public EsTester es = EsTester.create(); @Rule diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/developers/ws/SearchEventsActionNewIssuesIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/developers/ws/SearchEventsActionNewIssuesIT.java index b4028725c29..c06c5b9517b 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/developers/ws/SearchEventsActionNewIssuesIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/developers/ws/SearchEventsActionNewIssuesIT.java @@ -68,7 +68,7 @@ public class SearchEventsActionNewIssuesIT { .toArray(RuleType[]::new); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public EsTester es = EsTester.create(); @Rule diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/developers/ws/SearchEventsActionQualityGateIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/developers/ws/SearchEventsActionQualityGateIT.java index 2d59cbe82e5..882bdb7f4cc 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/developers/ws/SearchEventsActionQualityGateIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/developers/ws/SearchEventsActionQualityGateIT.java @@ -56,7 +56,7 @@ import static org.sonar.server.developers.ws.SearchEventsAction.PARAM_PROJECTS; public class SearchEventsActionQualityGateIT { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public EsTester es = EsTester.create(); @Rule diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/duplication/ws/DuplicationsParserIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/duplication/ws/DuplicationsParserIT.java index 31d84eef047..5e158e3f6d4 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/duplication/ws/DuplicationsParserIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/duplication/ws/DuplicationsParserIT.java @@ -38,7 +38,7 @@ import static org.sonar.db.component.ComponentTesting.newFileDto; public class DuplicationsParserIT { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final DuplicationsParser parser = new DuplicationsParser(new ComponentFinder(db.getDbClient(), null)); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/duplication/ws/ShowActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/duplication/ws/ShowActionIT.java index 2154e45f69a..cb879dfd0a3 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/duplication/ws/ShowActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/duplication/ws/ShowActionIT.java @@ -56,7 +56,7 @@ public class ShowActionIT { public UserSessionRule userSessionRule = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final TestComponentFinder componentFinder = TestComponentFinder.from(db); private final DuplicationsParser parser = new DuplicationsParser(componentFinder); private final ShowResponseBuilder showResponseBuilder = new ShowResponseBuilder(db.getDbClient()); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/duplication/ws/ShowResponseBuilderIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/duplication/ws/ShowResponseBuilderIT.java index 49fc2143fe7..1b3be141672 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/duplication/ws/ShowResponseBuilderIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/duplication/ws/ShowResponseBuilderIT.java @@ -40,7 +40,7 @@ import static org.sonar.db.component.ComponentTesting.newFileDto; public class ShowResponseBuilderIT { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private ShowResponseBuilder underTest = new ShowResponseBuilder(db.getDbClient().componentDao()); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/favorite/ws/AddActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/favorite/ws/AddActionIT.java index 29bfe9c1602..e276a1608a2 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/favorite/ws/AddActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/favorite/ws/AddActionIT.java @@ -57,7 +57,7 @@ public class AddActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final DbClient dbClient = db.getDbClient(); private final DbSession dbSession = db.getSession(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/favorite/ws/RemoveActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/favorite/ws/RemoveActionIT.java index f927e04eb10..6cf55e21eae 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/favorite/ws/RemoveActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/favorite/ws/RemoveActionIT.java @@ -28,7 +28,6 @@ import org.sonar.db.DbClient; import org.sonar.db.DbTester; import org.sonar.db.project.ProjectDto; import org.sonar.db.user.UserDto; -import org.sonar.server.component.TestComponentFinder; import org.sonar.server.exceptions.NotFoundException; import org.sonar.server.exceptions.UnauthorizedException; import org.sonar.server.favorite.FavoriteUpdater; @@ -51,7 +50,7 @@ public class RemoveActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final DbClient dbClient = db.getDbClient(); private final FavoriteUpdater favoriteUpdater = new FavoriteUpdater(dbClient); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/favorite/ws/SearchActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/favorite/ws/SearchActionIT.java index d4979ac06eb..4b4b46c7809 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/favorite/ws/SearchActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/favorite/ws/SearchActionIT.java @@ -29,8 +29,6 @@ import org.sonar.api.server.ws.WebService.Param; import org.sonar.api.web.UserRole; import org.sonar.db.DbClient; import org.sonar.db.DbTester; -import org.sonar.db.component.ComponentDto; -import org.sonar.db.component.ComponentTesting; import org.sonar.db.project.ProjectDto; import org.sonar.db.user.UserDto; import org.sonar.server.exceptions.UnauthorizedException; @@ -46,7 +44,6 @@ import static java.util.Optional.ofNullable; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.assertj.core.api.Assertions.tuple; -import static org.sonar.api.resources.Qualifiers.FILE; import static org.sonar.api.resources.Qualifiers.PROJECT; import static org.sonar.db.component.ComponentTesting.newFileDto; import static org.sonar.db.component.ComponentTesting.newPrivateProjectDto; @@ -60,7 +57,7 @@ public class SearchActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final DbClient dbClient = db.getDbClient(); private final FavoriteFinder favoriteFinder = new FavoriteFinder(dbClient, userSession); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/hotspot/ws/AddCommentActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/hotspot/ws/AddCommentActionIT.java index 5bd03992e88..b28fc33bb0d 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/hotspot/ws/AddCommentActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/hotspot/ws/AddCommentActionIT.java @@ -73,7 +73,7 @@ public class AddCommentActionIT { private static final Random RANDOM = new Random(); @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); @Rule public UserSessionRule userSessionRule = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/hotspot/ws/AssignActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/hotspot/ws/AssignActionIT.java index 239c235fab9..7144defe8da 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/hotspot/ws/AssignActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/hotspot/ws/AssignActionIT.java @@ -93,7 +93,7 @@ import static org.sonar.db.component.ComponentTesting.newFileDto; public class AssignActionIT { @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); @Rule public UserSessionRule userSessionRule = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/hotspot/ws/ChangeStatusActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/hotspot/ws/ChangeStatusActionIT.java index 23f41395aee..f45894b058e 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/hotspot/ws/ChangeStatusActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/hotspot/ws/ChangeStatusActionIT.java @@ -46,7 +46,6 @@ import org.sonar.db.DbSession; import org.sonar.db.DbTester; import org.sonar.db.component.BranchDto; import org.sonar.db.component.BranchType; -import org.sonar.db.component.ComponentDbTester; import org.sonar.db.component.ComponentDto; import org.sonar.db.component.ProjectData; import org.sonar.db.issue.IssueDto; @@ -93,7 +92,7 @@ public class ChangeStatusActionIT { private static final List<String> RESOLUTION_TYPES = List.of(RESOLUTION_FIXED, RESOLUTION_SAFE, RESOLUTION_ACKNOWLEDGED); @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); @Rule public UserSessionRule userSessionRule = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/hotspot/ws/DeleteCommentActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/hotspot/ws/DeleteCommentActionIT.java index 94a75fa2d5d..1282a6b8299 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/hotspot/ws/DeleteCommentActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/hotspot/ws/DeleteCommentActionIT.java @@ -46,7 +46,7 @@ import static org.mockito.Mockito.mock; public class DeleteCommentActionIT { @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); @Rule public UserSessionRule userSessionRule = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/hotspot/ws/EditCommentActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/hotspot/ws/EditCommentActionIT.java index 707464a2298..4ab0c5ceb9b 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/hotspot/ws/EditCommentActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/hotspot/ws/EditCommentActionIT.java @@ -46,7 +46,7 @@ import static org.mockito.Mockito.mock; public class EditCommentActionIT { @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); @Rule public UserSessionRule userSessionRule = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/hotspot/ws/PullActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/hotspot/ws/PullActionIT.java index 050faa6032e..66b60d4821f 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/hotspot/ws/PullActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/hotspot/ws/PullActionIT.java @@ -34,7 +34,6 @@ import org.sonar.api.resources.Qualifiers; import org.sonar.api.utils.System2; import org.sonar.db.DbTester; import org.sonar.db.component.BranchDto; -import org.sonar.db.component.ComponentDbTester; import org.sonar.db.component.ComponentDto; import org.sonar.db.component.ProjectData; import org.sonar.db.component.ResourceTypesRule; @@ -77,7 +76,7 @@ public class PullActionIT { public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final System2 system2 = mock(System2.class); private final PullHotspotsActionProtobufObjectGenerator pullActionProtobufObjectGenerator = new PullHotspotsActionProtobufObjectGenerator(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/hotspot/ws/SearchActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/hotspot/ws/SearchActionIT.java index b730530b766..4c2d0cde547 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/hotspot/ws/SearchActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/hotspot/ws/SearchActionIT.java @@ -142,7 +142,7 @@ public class SearchActionIT { private static final List<String> RESOLUTION_TYPES = List.of(RESOLUTION_FIXED, RESOLUTION_SAFE, RESOLUTION_ACKNOWLEDGED); @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); @Rule public EsTester es = EsTester.create(); @Rule diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/hotspot/ws/ShowActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/hotspot/ws/ShowActionIT.java index 433a3298d24..7dda20b840f 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/hotspot/ws/ShowActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/hotspot/ws/ShowActionIT.java @@ -25,7 +25,6 @@ import com.tngtech.java.junit.dataprovider.DataProvider; import com.tngtech.java.junit.dataprovider.DataProviderRunner; import com.tngtech.java.junit.dataprovider.UseDataProvider; import java.util.Arrays; -import java.util.Collections; import java.util.List; import java.util.Random; import java.util.Set; @@ -116,7 +115,7 @@ public class ShowActionIT { public static final DbIssues.MessageFormatting MESSAGE_FORMATTING = DbIssues.MessageFormatting.newBuilder().setStart(0).setEnd(4).setType(CODE).build(); @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); @Rule public EsTester es = EsTester.create(); @Rule diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/AssignActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/AssignActionIT.java index e69d766ee08..0b46b040e9e 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/AssignActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/AssignActionIT.java @@ -52,7 +52,7 @@ public class AssignActionIT { public UserSessionRule userSession = standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final IssueChangeContext issueChangeContext = issueChangeContextByUserBuilder(new Date(), "user_uuid").build(); private final DefaultIssue issue = new DefaultIssue().setKey("ABC").setAssigneeUuid(ISSUE_CURRENT_ASSIGNEE_UUID); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/IssueChangeWSSupportIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/IssueChangeWSSupportIT.java index f08fcd042e1..4e3fcd9ce89 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/IssueChangeWSSupportIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/IssueChangeWSSupportIT.java @@ -70,7 +70,7 @@ public class IssueChangeWSSupportIT { private static final Random RANDOM = new Random(); @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); @Rule public UserSessionRule userSessionRule = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/IssueFinderIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/IssueFinderIT.java index 9d3505b71be..cc653b50d12 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/IssueFinderIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/IssueFinderIT.java @@ -23,7 +23,6 @@ import org.junit.Rule; import org.junit.Test; import org.sonar.api.utils.System2; import org.sonar.db.DbTester; -import org.sonar.db.component.ComponentDbTester; import org.sonar.db.component.ComponentDto; import org.sonar.db.issue.IssueDbTester; import org.sonar.db.issue.IssueDto; @@ -48,7 +47,7 @@ public class IssueFinderIT { public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private RuleDbTester ruleDbTester = new RuleDbTester(db); private IssueDbTester issueDbTester = new IssueDbTester(db); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/SetSeverityActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/SetSeverityActionIT.java index 2ab5f4157e0..bf4be8145f0 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/SetSeverityActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/SetSeverityActionIT.java @@ -57,7 +57,7 @@ public class SetSeverityActionIT { public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private IssueFieldsSetter issueUpdater = new IssueFieldsSetter(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/SetTypeActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/SetTypeActionIT.java index 8709b5bb932..035c7ecc286 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/SetTypeActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/SetTypeActionIT.java @@ -55,7 +55,7 @@ public class SetTypeActionIT { public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private IssueFieldsSetter issueUpdater = new IssueFieldsSetter(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/TransitionServiceIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/TransitionServiceIT.java index 8b731dcd262..a024aaee6bb 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/TransitionServiceIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/TransitionServiceIT.java @@ -47,7 +47,7 @@ import static org.sonar.db.component.ComponentTesting.newFileDto; public class TransitionServiceIT { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/WebIssueStorageIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/WebIssueStorageIT.java index 16b9ce59164..844e312972d 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/WebIssueStorageIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/WebIssueStorageIT.java @@ -55,7 +55,7 @@ public class WebIssueStorageIT { private final System2 system2 = new TestSystem2().setNow(2_000_000_000L); @org.junit.Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); private final DbClient dbClient = db.getDbClient(); private final IssueIndexer issueIndexer = mock(IssueIndexer.class); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/AddCommentActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/AddCommentActionIT.java index e09284e3f39..e1db9707d4e 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/AddCommentActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/AddCommentActionIT.java @@ -75,7 +75,7 @@ public class AddCommentActionIT { @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); @Rule public EsTester es = EsTester.create(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/AssignActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/AssignActionIT.java index 0583e5454c1..eb0ce958b7d 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/AssignActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/AssignActionIT.java @@ -75,7 +75,7 @@ public class AssignActionIT { @Rule public EsTester es = EsTester.create(); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); public DbClient dbClient = db.getDbClient(); private DbSession session = db.getSession(); private NotificationManager notificationManager = mock(NotificationManager.class); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/AuthorsActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/AuthorsActionIT.java index 183d311e612..2eefbc60a62 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/AuthorsActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/AuthorsActionIT.java @@ -59,7 +59,7 @@ import static org.sonar.test.JsonAssert.assertJson; public class AuthorsActionIT { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public EsTester es = EsTester.create(); @Rule diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/BulkChangeActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/BulkChangeActionIT.java index ac353f6c22e..160660157d7 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/BulkChangeActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/BulkChangeActionIT.java @@ -41,7 +41,6 @@ import org.sonar.db.component.ComponentDto; import org.sonar.db.component.ProjectData; import org.sonar.db.issue.IssueChangeDto; import org.sonar.db.issue.IssueDto; -import org.sonar.db.project.ProjectDto; import org.sonar.db.rule.RuleDto; import org.sonar.db.user.UserDto; import org.sonar.server.es.EsTester; @@ -111,7 +110,7 @@ public class BulkChangeActionIT { private System2 system2 = new TestSystem2().setNow(NOW); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); @Rule public EsTester es = EsTester.create(); @Rule diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/ChangelogActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/ChangelogActionIT.java index f469d127ee8..17c9d0c4207 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/ChangelogActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/ChangelogActionIT.java @@ -59,7 +59,7 @@ import static org.sonar.test.JsonAssert.assertJson; public class ChangelogActionIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/DeleteCommentActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/DeleteCommentActionIT.java index afc818308cd..dad64408299 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/DeleteCommentActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/DeleteCommentActionIT.java @@ -54,7 +54,7 @@ import static org.sonar.api.web.UserRole.USER; public class DeleteCommentActionIT { @Rule - public DbTester dbTester = DbTester.create(true); + public DbTester dbTester = DbTester.create(); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/DoTransitionActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/DoTransitionActionIT.java index e90b40a2677..eca330c8545 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/DoTransitionActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/DoTransitionActionIT.java @@ -83,7 +83,7 @@ public class DoTransitionActionIT { private System2 system2 = new TestSystem2().setNow(NOW); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); @Rule public EsTester es = EsTester.create(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/EditCommentActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/EditCommentActionIT.java index f85df440e0d..054be66b573 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/EditCommentActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/EditCommentActionIT.java @@ -59,7 +59,7 @@ public class EditCommentActionIT { private static final long NOW = 10_000_000_000L; @Rule - public DbTester dbTester = DbTester.create(true); + public DbTester dbTester = DbTester.create(); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/IssueUpdaterIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/IssueUpdaterIT.java index 7bcdcad81c5..2ac0c3042a5 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/IssueUpdaterIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/IssueUpdaterIT.java @@ -70,7 +70,7 @@ public class IssueUpdaterIT { private System2 system2 = mock(System2.class); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); @Rule public EsTester es = EsTester.create(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/PullActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/PullActionIT.java index 206236b20ab..138de59751d 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/PullActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/PullActionIT.java @@ -31,7 +31,6 @@ import org.sonar.api.issue.Issue; import org.sonar.api.resources.Qualifiers; import org.sonar.api.utils.System2; import org.sonar.db.DbTester; -import org.sonar.db.component.ComponentDbTester; import org.sonar.db.component.ComponentDto; import org.sonar.db.component.ProjectData; import org.sonar.db.component.ResourceTypesRule; @@ -74,7 +73,7 @@ public class PullActionIT { public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final System2 system2 = mock(System2.class); private final TaintChecker taintChecker = mock(TaintChecker.class); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/PullTaintActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/PullTaintActionIT.java index b1dae4cbea6..6cff8f8be47 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/PullTaintActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/PullTaintActionIT.java @@ -31,7 +31,6 @@ import org.sonar.api.issue.Issue; import org.sonar.api.resources.Qualifiers; import org.sonar.api.utils.System2; import org.sonar.db.DbTester; -import org.sonar.db.component.ComponentDbTester; import org.sonar.db.component.ComponentDto; import org.sonar.db.component.ProjectData; import org.sonar.db.component.ResourceTypesRule; @@ -78,7 +77,7 @@ public class PullTaintActionIT { public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final System2 system2 = mock(System2.class); private final TaintChecker taintChecker = mock(TaintChecker.class); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/ReindexActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/ReindexActionIT.java index 0cfcdbe9b2c..751d9ad4b74 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/ReindexActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/ReindexActionIT.java @@ -47,7 +47,7 @@ public class ReindexActionIT { @Rule public EsTester es = EsTester.create(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/SearchActionComponentsIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/SearchActionComponentsIT.java index 1ecc574bcd1..6b5e9e066a3 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/SearchActionComponentsIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/SearchActionComponentsIT.java @@ -87,7 +87,7 @@ public class SearchActionComponentsIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public EsTester es = EsTester.create(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/SearchActionFacetsIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/SearchActionFacetsIT.java index 8d2d1a009cd..d975f360a1a 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/SearchActionFacetsIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/SearchActionFacetsIT.java @@ -74,7 +74,7 @@ public class SearchActionFacetsIT { @Rule public UserSessionRule userSession = standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public EsTester es = EsTester.create(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/SearchActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/SearchActionIT.java index 0f765cb8196..e5d4e9c0d74 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/SearchActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/SearchActionIT.java @@ -135,7 +135,7 @@ public class SearchActionIT { @Rule public UserSessionRule userSession = standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public EsTester es = EsTester.create(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/SetSeverityActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/SetSeverityActionIT.java index 19e646b0a72..22f778dbafe 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/SetSeverityActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/SetSeverityActionIT.java @@ -77,7 +77,7 @@ import static org.sonar.db.issue.IssueTesting.newIssue; public class SetSeverityActionIT { @Rule - public DbTester dbTester = DbTester.create(true); + public DbTester dbTester = DbTester.create(); @Rule public EsTester es = EsTester.create(); @Rule diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/SetTagsActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/SetTagsActionIT.java index 7c0ad405466..986fce4f967 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/SetTagsActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/SetTagsActionIT.java @@ -78,7 +78,7 @@ import static org.sonar.db.component.ComponentTesting.newPublicProjectDto; public class SetTagsActionIT { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public EsTester es = EsTester.create(); @Rule diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/SetTypeActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/SetTypeActionIT.java index 016b8375097..735b6373632 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/SetTypeActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/SetTypeActionIT.java @@ -88,7 +88,7 @@ import static org.sonar.db.issue.IssueTesting.newIssue; public class SetTypeActionIT { @Rule - public DbTester dbTester = DbTester.create(true); + public DbTester dbTester = DbTester.create(); @Rule public EsTester es = EsTester.create(); @Rule diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/TagsActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/TagsActionIT.java index a4390a180bb..ec51d48a8b9 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/TagsActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/TagsActionIT.java @@ -67,7 +67,7 @@ public class TagsActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public EsTester es = EsTester.create(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/pull/PullTaintActionResponseWriterIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/pull/PullTaintActionResponseWriterIT.java index c5798d37fcd..a2e3c3eb873 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/pull/PullTaintActionResponseWriterIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/issue/ws/pull/PullTaintActionResponseWriterIT.java @@ -43,7 +43,7 @@ import static org.mockito.Mockito.when; public class PullTaintActionResponseWriterIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/measure/live/ComponentIndexFactoryIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/measure/live/ComponentIndexFactoryIT.java index 02723775baa..07a22736fd7 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/measure/live/ComponentIndexFactoryIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/measure/live/ComponentIndexFactoryIT.java @@ -27,7 +27,7 @@ import org.sonar.db.component.ComponentDto; import static org.assertj.core.api.Assertions.assertThat; public class ComponentIndexFactoryIT { - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final ComponentIndexFactory factory = new ComponentIndexFactory(db.getDbClient()); @Test diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/measure/live/ComponentIndexImplIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/measure/live/ComponentIndexImplIT.java index 7371764f2cd..cda533e6121 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/measure/live/ComponentIndexImplIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/measure/live/ComponentIndexImplIT.java @@ -31,7 +31,7 @@ import static org.assertj.core.api.Assertions.assertThat; public class ComponentIndexImplIT { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final ComponentIndexImpl componentIndex = new ComponentIndexImpl(db.getDbClient()); private ComponentDto project; diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/measure/live/LiveMeasureComputerImplIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/measure/live/LiveMeasureComputerImplIT.java index 7573ec46429..37aad796f24 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/measure/live/LiveMeasureComputerImplIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/measure/live/LiveMeasureComputerImplIT.java @@ -59,7 +59,7 @@ import static org.sonar.api.measures.CoreMetrics.ALERT_STATUS_KEY; public class LiveMeasureComputerImplIT { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final TestIndexers projectIndexer = new TestIndexers(); private MetricDto metric1; diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/measure/live/LiveMeasureTreeUpdaterImplIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/measure/live/LiveMeasureTreeUpdaterImplIT.java index 1ea8900af6d..b15953bf9c1 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/measure/live/LiveMeasureTreeUpdaterImplIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/measure/live/LiveMeasureTreeUpdaterImplIT.java @@ -54,7 +54,7 @@ import static org.sonar.api.measures.CoreMetrics.SECURITY_HOTSPOTS_TO_REVIEW_STA public class LiveMeasureTreeUpdaterImplIT { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final Configuration config = new MapSettings().setProperty(RATING_GRID, "0.05,0.1,0.2,0.5").asConfig(); private LiveMeasureTreeUpdaterImpl treeUpdater; diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/measure/live/LiveQualityGateComputerImplIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/measure/live/LiveQualityGateComputerImplIT.java index 6391f13cdbb..ce14f6cf144 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/measure/live/LiveQualityGateComputerImplIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/measure/live/LiveQualityGateComputerImplIT.java @@ -57,7 +57,7 @@ import static org.sonar.db.metric.MetricTesting.newMetricDto; public class LiveQualityGateComputerImplIT { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final MapSettings settings = new MapSettings(); private final Configuration configuration = new ConfigurationBridge(settings); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/measure/ws/ComponentActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/measure/ws/ComponentActionIT.java index 941ea2d924d..daad47eba90 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/measure/ws/ComponentActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/measure/ws/ComponentActionIT.java @@ -66,7 +66,7 @@ public class ComponentActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final WsActionTester ws = new WsActionTester(new ComponentAction(db.getDbClient(), TestComponentFinder.from(db), userSession)); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/measure/ws/ComponentTreeActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/measure/ws/ComponentTreeActionIT.java index a80aa615214..f84732cc2d5 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/measure/ws/ComponentTreeActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/measure/ws/ComponentTreeActionIT.java @@ -103,7 +103,7 @@ public class ComponentTreeActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone().logIn(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final I18nRule i18n = new I18nRule(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/measure/ws/SearchActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/measure/ws/SearchActionIT.java index 97adb87a4cc..67e48d03ee0 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/measure/ws/SearchActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/measure/ws/SearchActionIT.java @@ -62,7 +62,7 @@ public class SearchActionIT { public UserSessionRule userSession = UserSessionRule.standalone().logIn(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final WsActionTester ws = new WsActionTester(new SearchAction(userSession, db.getDbClient())); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/measure/ws/SearchHistoryActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/measure/ws/SearchHistoryActionIT.java index e12d941f7c6..d4baa160954 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/measure/ws/SearchHistoryActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/measure/ws/SearchHistoryActionIT.java @@ -79,7 +79,7 @@ public class SearchHistoryActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final DbClient dbClient = db.getDbClient(); private final DbSession dbSession = db.getSession(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/metric/ws/SearchActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/metric/ws/SearchActionIT.java index b3f5d795494..75b2bc88521 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/metric/ws/SearchActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/metric/ws/SearchActionIT.java @@ -38,7 +38,7 @@ import static org.assertj.core.api.Assertions.tuple; public class SearchActionIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final DbClient dbClient = db.getDbClient(); private final DbSession dbSession = db.getSession(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/monitoring/MetricsActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/monitoring/MetricsActionIT.java index cca6520337d..950c519ef68 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/monitoring/MetricsActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/monitoring/MetricsActionIT.java @@ -44,7 +44,7 @@ public class MetricsActionIT { public UserSessionRule userSession = standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final BearerPasscode bearerPasscode = mock(BearerPasscode.class); private final SystemPasscode systemPasscode = mock(SystemPasscode.class); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/newcodeperiod/NewCodeDefinitionResolverTest.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/newcodeperiod/NewCodeDefinitionResolverTest.java index 69ab4740e95..f90d6a095df 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/newcodeperiod/NewCodeDefinitionResolverTest.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/newcodeperiod/NewCodeDefinitionResolverTest.java @@ -27,7 +27,6 @@ import org.sonar.core.platform.PlatformEditionProvider; import org.sonar.db.DbClient; import org.sonar.db.DbSession; import org.sonar.db.DbTester; -import org.sonar.db.component.ComponentDbTester; import org.sonar.db.newcodeperiod.NewCodePeriodDto; import static org.assertj.core.api.Assertions.assertThat; @@ -42,7 +41,7 @@ import static org.sonar.db.newcodeperiod.NewCodePeriodType.SPECIFIC_ANALYSIS; public class NewCodeDefinitionResolverTest { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private static final String DEFAULT_PROJECT_ID = "12345"; diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/newcodeperiod/ws/ListActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/newcodeperiod/ws/ListActionIT.java index ea54221043e..f6fc8303537 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/newcodeperiod/ws/ListActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/newcodeperiod/ws/ListActionIT.java @@ -82,7 +82,7 @@ public class ListActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final DbClient dbClient = db.getDbClient(); private final ComponentFinder componentFinder = TestComponentFinder.from(db); private final NewCodePeriodDao dao = new NewCodePeriodDao(System2.INSTANCE, UuidFactoryFast.getInstance()); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/newcodeperiod/ws/SetActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/newcodeperiod/ws/SetActionIT.java index 0f9b4964eb3..b614ed863bb 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/newcodeperiod/ws/SetActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/newcodeperiod/ws/SetActionIT.java @@ -39,7 +39,6 @@ import org.sonar.db.DbClient; import org.sonar.db.DbSession; import org.sonar.db.DbTester; import org.sonar.db.component.BranchDto; -import org.sonar.db.component.ComponentDbTester; import org.sonar.db.component.ComponentDto; import org.sonar.db.component.ProjectData; import org.sonar.db.component.SnapshotDto; @@ -67,7 +66,7 @@ public class SetActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private DbClient dbClient = db.getDbClient(); private DbSession dbSession = db.getSession(); private ComponentFinder componentFinder = TestComponentFinder.from(db); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/newcodeperiod/ws/ShowActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/newcodeperiod/ws/ShowActionIT.java index ac7480855f0..73a48d64e7c 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/newcodeperiod/ws/ShowActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/newcodeperiod/ws/ShowActionIT.java @@ -30,8 +30,6 @@ import org.sonar.core.util.UuidFactoryFast; import org.sonar.db.DbClient; import org.sonar.db.DbTester; import org.sonar.db.component.BranchDto; -import org.sonar.db.component.ComponentDbTester; -import org.sonar.db.component.ComponentDto; import org.sonar.db.newcodeperiod.NewCodePeriodDao; import org.sonar.db.newcodeperiod.NewCodePeriodDbTester; import org.sonar.db.newcodeperiod.NewCodePeriodDto; @@ -55,7 +53,7 @@ public class ShowActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private DbClient dbClient = db.getDbClient(); private ComponentFinder componentFinder = TestComponentFinder.from(db); private NewCodePeriodDao dao = new NewCodePeriodDao(System2.INSTANCE, UuidFactoryFast.getInstance()); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/newcodeperiod/ws/UnsetActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/newcodeperiod/ws/UnsetActionIT.java index 07e15e53be3..84b6b8b89b9 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/newcodeperiod/ws/UnsetActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/newcodeperiod/ws/UnsetActionIT.java @@ -35,8 +35,6 @@ import org.sonar.db.DbClient; import org.sonar.db.DbSession; import org.sonar.db.DbTester; import org.sonar.db.component.BranchDto; -import org.sonar.db.component.ComponentDbTester; -import org.sonar.db.component.ComponentDto; import org.sonar.db.component.ProjectData; import org.sonar.db.newcodeperiod.NewCodePeriodDao; import org.sonar.db.newcodeperiod.NewCodePeriodType; @@ -60,7 +58,7 @@ public class UnsetActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private DbClient dbClient = db.getDbClient(); private DbSession dbSession = db.getSession(); private ComponentFinder componentFinder = TestComponentFinder.from(db); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/notification/ws/AddActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/notification/ws/AddActionIT.java index aa16e260b37..7e3c51bd701 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/notification/ws/AddActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/notification/ws/AddActionIT.java @@ -63,7 +63,7 @@ public class AddActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final DbClient dbClient = db.getDbClient(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/notification/ws/ListActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/notification/ws/ListActionIT.java index b07d27ced1c..4944278afca 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/notification/ws/ListActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/notification/ws/ListActionIT.java @@ -57,7 +57,7 @@ public class ListActionIT { @Rule public final UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public final DbTester db = DbTester.create(true); + public final DbTester db = DbTester.create(); private final DbClient dbClient = db.getDbClient(); private final DbSession dbSession = db.getSession(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/notification/ws/RemoveActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/notification/ws/RemoveActionIT.java index b89a124e92e..aa0f0100dd1 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/notification/ws/RemoveActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/notification/ws/RemoveActionIT.java @@ -62,7 +62,7 @@ public class RemoveActionIT { @Rule public final UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public final DbTester db = DbTester.create(true); + public final DbTester db = DbTester.create(); private final DbClient dbClient = db.getDbClient(); private final DbSession dbSession = db.getSession(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/permission/DefaultTemplatesResolverImplIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/permission/DefaultTemplatesResolverImplIT.java index cc43b17e34b..bf79fd10721 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/permission/DefaultTemplatesResolverImplIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/permission/DefaultTemplatesResolverImplIT.java @@ -35,7 +35,7 @@ import static org.sonar.api.resources.Qualifiers.VIEW; public class DefaultTemplatesResolverImplIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private ResourceTypesRule resourceTypesWithPortfoliosInstalled = new ResourceTypesRule().setRootQualifiers(PROJECT, APP, VIEW); private ResourceTypesRule resourceTypesWithApplicationInstalled = new ResourceTypesRule().setRootQualifiers(PROJECT, APP); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/permission/GroupPermissionChangerIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/permission/GroupPermissionChangerIT.java index bca394ab9e4..f192a7ee679 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/permission/GroupPermissionChangerIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/permission/GroupPermissionChangerIT.java @@ -49,7 +49,7 @@ import static org.sonar.db.permission.GlobalPermission.PROVISION_PROJECTS; public class GroupPermissionChangerIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final ResourceTypes resourceTypes = new ResourceTypesRule().setRootQualifiers(Qualifiers.PROJECT); private final PermissionService permissionService = new PermissionServiceImpl(resourceTypes); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/permission/PermissionTemplateServiceIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/permission/PermissionTemplateServiceIT.java index c8bd27bb5a9..15bfb6b1f1c 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/permission/PermissionTemplateServiceIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/permission/PermissionTemplateServiceIT.java @@ -52,7 +52,7 @@ import static org.sonar.api.resources.Qualifiers.VIEW; public class PermissionTemplateServiceIT { @Rule - public DbTester dbTester = DbTester.create(true); + public DbTester dbTester = DbTester.create(); private final ResourceTypesRule resourceTypesRule = new ResourceTypesRule().setRootQualifiers(PROJECT, VIEW, APP); private final DefaultTemplatesResolver defaultTemplatesResolver = new DefaultTemplatesResolverImpl(dbTester.getDbClient(), resourceTypesRule); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/permission/UserPermissionChangerIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/permission/UserPermissionChangerIT.java index d644e9a1eec..d4e4a7f6ca5 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/permission/UserPermissionChangerIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/permission/UserPermissionChangerIT.java @@ -29,7 +29,6 @@ import org.sonar.api.utils.System2; import org.sonar.api.web.UserRole; import org.sonar.core.util.SequenceUuidFactory; import org.sonar.db.DbTester; -import org.sonar.db.component.ComponentDto; import org.sonar.db.component.ResourceTypesRule; import org.sonar.db.entity.EntityDto; import org.sonar.db.permission.GlobalPermission; @@ -45,7 +44,7 @@ import static org.sonar.server.permission.PermissionChange.Operation.REMOVE; public class UserPermissionChangerIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final ResourceTypes resourceTypes = new ResourceTypesRule().setRootQualifiers(Qualifiers.PROJECT); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/permission/ws/BasePermissionWsIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/permission/ws/BasePermissionWsIT.java index a2e049c1dc7..600cd56fe5f 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/permission/ws/BasePermissionWsIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/permission/ws/BasePermissionWsIT.java @@ -50,7 +50,7 @@ import static org.sonar.db.permission.template.PermissionTemplateTesting.newPerm public abstract class BasePermissionWsIT<A extends PermissionsWsAction> { @Rule - public DbTester db = DbTester.create(new AlwaysIncreasingSystem2(), true); + public DbTester db = DbTester.create(new AlwaysIncreasingSystem2()); @Rule public EsTester es = EsTester.createCustom(new FooIndexDefinition()); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/permission/ws/template/ApplyTemplateActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/permission/ws/template/ApplyTemplateActionIT.java index 6a065c29e14..fbd658b8eb6 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/permission/ws/template/ApplyTemplateActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/permission/ws/template/ApplyTemplateActionIT.java @@ -58,7 +58,7 @@ import static org.sonarqube.ws.client.permission.PermissionsWsParameters.PARAM_T public class ApplyTemplateActionIT extends BasePermissionWsIT<ApplyTemplateAction> { @Rule - public DbTester dbTester = DbTester.create(true); + public DbTester dbTester = DbTester.create(); private UserDto user1; private UserDto user2; diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/platform/ws/SafeModeMonitoringMetricActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/platform/ws/SafeModeMonitoringMetricActionIT.java index 450adaf9897..016cbeceb6e 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/platform/ws/SafeModeMonitoringMetricActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/platform/ws/SafeModeMonitoringMetricActionIT.java @@ -43,7 +43,7 @@ public class SafeModeMonitoringMetricActionIT { public UserSessionRule userSession = standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final BearerPasscode bearerPasscode = mock(BearerPasscode.class); private final SystemPasscode systemPasscode = mock(SystemPasscode.class); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/plugins/ws/InstalledActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/plugins/ws/InstalledActionIT.java index c8e057a0024..c14fd46f10d 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/plugins/ws/InstalledActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/plugins/ws/InstalledActionIT.java @@ -74,7 +74,7 @@ public class InstalledActionIT { @Rule public TemporaryFolder temp = new TemporaryFolder(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); @Rule public UserSessionRule userSession = UserSessionRule.standalone().logIn(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/project/ws/BulkDeleteActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/project/ws/BulkDeleteActionIT.java index 258ad145f70..f6d950d4ce0 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/project/ws/BulkDeleteActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/project/ws/BulkDeleteActionIT.java @@ -42,7 +42,6 @@ import org.sonar.core.util.stream.MoreCollectors; import org.sonar.db.DbClient; import org.sonar.db.DbSession; import org.sonar.db.DbTester; -import org.sonar.db.component.BranchDto; import org.sonar.db.component.ComponentDto; import org.sonar.db.component.PortfolioData; import org.sonar.db.component.ProjectData; @@ -78,7 +77,7 @@ import static org.sonarqube.ws.client.project.ProjectsWsParameters.PARAM_QUALIFI public class BulkDeleteActionIT { @Rule - public final DbTester db = DbTester.create(System2.INSTANCE, true); + public final DbTester db = DbTester.create(System2.INSTANCE); @Rule public final UserSessionRule userSession = UserSessionRule.standalone().logIn(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/project/ws/CreateActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/project/ws/CreateActionIT.java index e0a4536f168..d92ff88457b 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/project/ws/CreateActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/project/ws/CreateActionIT.java @@ -89,7 +89,7 @@ public class CreateActionIT { private final System2 system2 = System2.INSTANCE; @Rule - public final DbTester db = DbTester.create(system2, true); + public final DbTester db = DbTester.create(system2); @Rule public final UserSessionRule userSession = UserSessionRule.standalone(); @Rule diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/project/ws/DeleteActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/project/ws/DeleteActionIT.java index fec4fc61215..78e4d1f96a9 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/project/ws/DeleteActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/project/ws/DeleteActionIT.java @@ -61,7 +61,7 @@ public class DeleteActionIT { private final System2 system2 = System2.INSTANCE; @Rule - public final DbTester db = DbTester.create(system2, true); + public final DbTester db = DbTester.create(system2); @Rule public final UserSessionRule userSessionRule = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/project/ws/ProjectFinderIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/project/ws/ProjectFinderIT.java index b7fdcb85c89..eb49f1d6726 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/project/ws/ProjectFinderIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/project/ws/ProjectFinderIT.java @@ -35,7 +35,7 @@ import static org.sonar.server.project.ws.ProjectFinder.SearchResult; public class ProjectFinderIT { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/project/ws/SearchActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/project/ws/SearchActionIT.java index eac18e53ace..89c5d03e3da 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/project/ws/SearchActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/project/ws/SearchActionIT.java @@ -22,7 +22,6 @@ package org.sonar.server.project.ws; import com.google.common.base.Joiner; import java.time.OffsetDateTime; import java.time.ZoneOffset; -import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Date; @@ -80,7 +79,7 @@ public class SearchActionIT { public final UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public final DbTester db = DbTester.create(true); + public final DbTester db = DbTester.create(); private final WsActionTester ws = new WsActionTester(new SearchAction(db.getDbClient(), userSession)); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/project/ws/SearchMyProjectsActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/project/ws/SearchMyProjectsActionIT.java index 2abe6aae204..d7c6b5e3dd4 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/project/ws/SearchMyProjectsActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/project/ws/SearchMyProjectsActionIT.java @@ -62,7 +62,7 @@ public class SearchMyProjectsActionIT { @Rule public final UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public final DbTester db = DbTester.create(System2.INSTANCE, true); + public final DbTester db = DbTester.create(System2.INSTANCE); private final DbClient dbClient = db.getDbClient(); private final DbSession dbSession = db.getSession(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/project/ws/SearchMyScannableProjectsActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/project/ws/SearchMyScannableProjectsActionIT.java index 498b7404ef8..c0cf046d05c 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/project/ws/SearchMyScannableProjectsActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/project/ws/SearchMyScannableProjectsActionIT.java @@ -44,7 +44,7 @@ public class SearchMyScannableProjectsActionIT { public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final WsActionTester ws = new WsActionTester( new SearchMyScannableProjectsAction(db.getDbClient(), new ProjectFinder(db.getDbClient(), userSession))); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/project/ws/UpdateDefaultVisibilityActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/project/ws/UpdateDefaultVisibilityActionIT.java index 90490827343..cb387ad5d51 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/project/ws/UpdateDefaultVisibilityActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/project/ws/UpdateDefaultVisibilityActionIT.java @@ -39,7 +39,7 @@ import static org.sonar.server.project.ws.UpdateDefaultVisibilityAction.PARAM_PR public class UpdateDefaultVisibilityActionIT { @Rule - public final DbTester dbTester = DbTester.create(true); + public final DbTester dbTester = DbTester.create(); @Rule public final UserSessionRule userSession = UserSessionRule.standalone(); public final ProjectDefaultVisibility projectDefaultVisibility = new ProjectDefaultVisibility(dbTester.getDbClient()); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/project/ws/UpdateKeyActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/project/ws/UpdateKeyActionIT.java index 1c14be1725d..9fb240eab2a 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/project/ws/UpdateKeyActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/project/ws/UpdateKeyActionIT.java @@ -52,7 +52,7 @@ public class UpdateKeyActionIT { private static final String ANOTHER_KEY = "another_key"; @Rule - public final DbTester db = DbTester.create(System2.INSTANCE, true); + public final DbTester db = DbTester.create(System2.INSTANCE); @Rule public final UserSessionRule userSessionRule = UserSessionRule.standalone(); private final DbClient dbClient = db.getDbClient(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/project/ws/UpdateVisibilityActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/project/ws/UpdateVisibilityActionIT.java index 333163ea383..f29fb79e9da 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/project/ws/UpdateVisibilityActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/project/ws/UpdateVisibilityActionIT.java @@ -87,7 +87,7 @@ public class UpdateVisibilityActionIT { .collect(MoreCollectors.toSet(GlobalPermission.values().length)); @Rule - public final DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public final DbTester dbTester = DbTester.create(System2.INSTANCE); @Rule public final EsTester es = EsTester.createCustom(new FooIndexDefinition()); @Rule diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projectanalysis/ws/CreateEventActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projectanalysis/ws/CreateEventActionIT.java index f71fbdf96ce..99382e3e06c 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projectanalysis/ws/CreateEventActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projectanalysis/ws/CreateEventActionIT.java @@ -64,7 +64,7 @@ public class CreateEventActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private DbClient dbClient = db.getDbClient(); private DbSession dbSession = db.getSession(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projectanalysis/ws/DeleteActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projectanalysis/ws/DeleteActionIT.java index 0f20bcc79c6..d747bb04732 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projectanalysis/ws/DeleteActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projectanalysis/ws/DeleteActionIT.java @@ -49,7 +49,7 @@ public class DeleteActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private DbClient dbClient = db.getDbClient(); private DbSession dbSession = db.getSession(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projectanalysis/ws/DeleteEventActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projectanalysis/ws/DeleteEventActionIT.java index 40c2b63e63d..d29a25e84c2 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projectanalysis/ws/DeleteEventActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projectanalysis/ws/DeleteEventActionIT.java @@ -51,7 +51,7 @@ public class DeleteEventActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private DbClient dbClient = db.getDbClient(); private DbSession dbSession = db.getSession(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projectanalysis/ws/SearchActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projectanalysis/ws/SearchActionIT.java index daa1e96d2cf..fc0fd970b5f 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projectanalysis/ws/SearchActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projectanalysis/ws/SearchActionIT.java @@ -41,7 +41,6 @@ import org.sonar.core.util.UuidFactoryFast; import org.sonar.db.DbClient; import org.sonar.db.DbTester; import org.sonar.db.component.AnalysisPropertyDto; -import org.sonar.db.component.BranchDto; import org.sonar.db.component.ComponentDto; import org.sonar.db.component.ComponentTesting; import org.sonar.db.component.ProjectData; @@ -73,9 +72,7 @@ import static org.assertj.core.api.Assertions.tuple; import static org.sonar.api.utils.DateUtils.formatDate; import static org.sonar.api.utils.DateUtils.formatDateTime; import static org.sonar.api.utils.DateUtils.parseDateTime; -import static org.sonar.db.component.ComponentDbTester.toProjectDto; import static org.sonar.db.component.ComponentTesting.newFileDto; -import static org.sonar.db.component.ComponentTesting.newMainBranchDto; import static org.sonar.db.component.SnapshotTesting.newAnalysis; import static org.sonar.db.event.EventComponentChangeDto.ChangeCategory.ADDED; import static org.sonar.db.event.EventComponentChangeDto.ChangeCategory.FAILED_QUALITY_GATE; @@ -101,7 +98,7 @@ public class SearchActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public LogTester logTester = new LogTester(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projectanalysis/ws/UpdateEventActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projectanalysis/ws/UpdateEventActionIT.java index 6ca29006c93..33e94ac67b5 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projectanalysis/ws/UpdateEventActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projectanalysis/ws/UpdateEventActionIT.java @@ -57,7 +57,7 @@ public class UpdateEventActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final DbClient dbClient = db.getDbClient(); private final DbSession dbSession = db.getSession(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projectdump/ws/ExportActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projectdump/ws/ExportActionIT.java index 7da5b50c462..537730f80ed 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projectdump/ws/ExportActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projectdump/ws/ExportActionIT.java @@ -27,7 +27,6 @@ import org.sonar.api.web.UserRole; import org.sonar.ce.task.CeTask; import org.sonar.db.DbTester; import org.sonar.db.ce.CeTaskTypes; -import org.sonar.db.component.ComponentDto; import org.sonar.db.component.ResourceTypesRule; import org.sonar.db.project.ProjectDto; import org.sonar.db.user.UserDto; @@ -55,7 +54,7 @@ public class ExportActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final ExportSubmitter exportSubmitter = mock(ExportSubmitter.class); private final ResourceTypesRule resourceTypes = new ResourceTypesRule().setRootQualifiers(Qualifiers.PROJECT, Qualifiers.VIEW); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projectdump/ws/StatusActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projectdump/ws/StatusActionIT.java index 47a0438e45d..27e43f5c6c8 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projectdump/ws/StatusActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projectdump/ws/StatusActionIT.java @@ -64,7 +64,7 @@ public class StatusActionIT { private static final String SOME_KEY = "some key"; @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projectlink/ws/CreateActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projectlink/ws/CreateActionIT.java index 8b6cc14a048..bd454fc3a7b 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projectlink/ws/CreateActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projectlink/ws/CreateActionIT.java @@ -55,7 +55,7 @@ public class CreateActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final DbClient dbClient = db.getDbClient(); private final DbSession dbSession = db.getSession(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projectlink/ws/DeleteActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projectlink/ws/DeleteActionIT.java index 05e3e7c3513..303237ba097 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projectlink/ws/DeleteActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projectlink/ws/DeleteActionIT.java @@ -45,7 +45,7 @@ public class DeleteActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final DbClient dbClient = db.getDbClient(); private final DbSession dbSession = db.getSession(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projectlink/ws/SearchActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projectlink/ws/SearchActionIT.java index a19e9e74022..57a715f146b 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projectlink/ws/SearchActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projectlink/ws/SearchActionIT.java @@ -52,7 +52,7 @@ public class SearchActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final DbClient dbClient = db.getDbClient(); private final WsActionTester ws = new WsActionTester(new SearchAction(dbClient, userSession, TestComponentFinder.from(db))); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projecttag/ws/SetActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projecttag/ws/SetActionIT.java index dab7a100568..38aec338ed3 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projecttag/ws/SetActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/projecttag/ws/SetActionIT.java @@ -56,7 +56,7 @@ public class SetActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone().logIn(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final DbClient dbClient = db.getDbClient(); private final DbSession dbSession = db.getSession(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/QualityGateCaycCheckerIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/QualityGateCaycCheckerIT.java index 372154dc363..e9e9e712f3e 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/QualityGateCaycCheckerIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/QualityGateCaycCheckerIT.java @@ -24,7 +24,6 @@ import java.util.stream.IntStream; import org.junit.Rule; import org.junit.Test; import org.sonar.api.measures.Metric; -import org.sonar.api.utils.System2; import org.sonar.core.util.Uuids; import org.sonar.db.DbTester; import org.sonar.db.metric.MetricDto; @@ -47,7 +46,7 @@ import static org.sonar.server.qualitygate.QualityGateCaycStatus.OVER_COMPLIANT; public class QualityGateCaycCheckerIT { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); QualityGateCaycChecker underTest = new QualityGateCaycChecker(db.getDbClient()); @Test diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/QualityGateConditionsUpdaterIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/QualityGateConditionsUpdaterIT.java index d8711b9f7aa..2d00449b0ed 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/QualityGateConditionsUpdaterIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/QualityGateConditionsUpdaterIT.java @@ -26,7 +26,6 @@ import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import org.sonar.api.measures.Metric; -import org.sonar.api.utils.System2; import org.sonar.db.DbTester; import org.sonar.db.metric.MetricDto; import org.sonar.db.qualitygate.QualityGateConditionDto; @@ -56,7 +55,7 @@ import static org.sonar.api.measures.Metric.ValueType.WORK_DUR; public class QualityGateConditionsUpdaterIT { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final QualityGateConditionsUpdater underTest = new QualityGateConditionsUpdater(db.getDbClient()); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/QualityGateUpdaterIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/QualityGateUpdaterIT.java index 61ef16ba8f0..b77e75bddb2 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/QualityGateUpdaterIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/QualityGateUpdaterIT.java @@ -21,7 +21,6 @@ package org.sonar.server.qualitygate; import org.junit.Rule; import org.junit.Test; -import org.sonar.api.utils.System2; import org.sonar.core.util.UuidFactoryFast; import org.sonar.db.DbClient; import org.sonar.db.DbSession; @@ -36,7 +35,7 @@ public class QualityGateUpdaterIT { static final String QGATE_NAME = "Default"; @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final DbClient dbClient = db.getDbClient(); private final DbSession dbSession = db.getSession(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/RegisterQualityGatesIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/RegisterQualityGatesIT.java index 2b2efe7107c..e8240ee9554 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/RegisterQualityGatesIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/RegisterQualityGatesIT.java @@ -58,7 +58,7 @@ import static org.sonar.db.qualitygate.QualityGateConditionDto.OPERATOR_LESS_THA public class RegisterQualityGatesIT { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public LogTester logTester = new LogTester(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/AddGroupActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/AddGroupActionIT.java index ffe01a6c05f..cfe16d198c0 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/AddGroupActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/AddGroupActionIT.java @@ -24,7 +24,6 @@ import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import org.sonar.api.server.ws.WebService; -import org.sonar.api.utils.System2; import org.sonar.core.util.UuidFactory; import org.sonar.core.util.UuidFactoryFast; import org.sonar.db.DbClient; @@ -51,7 +50,7 @@ public class AddGroupActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final DbClient dbClient = db.getDbClient(); private final QualityGatesWsSupport wsSupport = new QualityGatesWsSupport(dbClient, userSession, TestComponentFinder.from(db)); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/AddUserActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/AddUserActionIT.java index b747573a890..ce2439fd14c 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/AddUserActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/AddUserActionIT.java @@ -22,7 +22,6 @@ package org.sonar.server.qualitygate.ws; import org.junit.Rule; import org.junit.Test; import org.sonar.api.server.ws.WebService; -import org.sonar.api.utils.System2; import org.sonar.core.util.UuidFactory; import org.sonar.core.util.UuidFactoryFast; import org.sonar.db.DbClient; @@ -47,7 +46,7 @@ public class AddUserActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final DbClient dbClient = db.getDbClient(); private final QualityGatesWsSupport wsSupport = new QualityGatesWsSupport(dbClient, userSession, TestComponentFinder.from(db)); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/CopyActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/CopyActionIT.java index f31ecc7bec7..28c303e3a9b 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/CopyActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/CopyActionIT.java @@ -27,7 +27,6 @@ import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import org.sonar.api.server.ws.WebService; -import org.sonar.api.utils.System2; import org.sonar.core.util.UuidFactoryFast; import org.sonar.db.DbClient; import org.sonar.db.DbSession; @@ -60,7 +59,7 @@ public class CopyActionIT { public final UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final DbClient dbClient = db.getDbClient(); private final DbSession dbSession = db.getSession(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/CreateActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/CreateActionIT.java index 2045830f125..9fe1185766b 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/CreateActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/CreateActionIT.java @@ -31,7 +31,6 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.sonar.api.measures.Metric; import org.sonar.api.server.ws.WebService; -import org.sonar.api.utils.System2; import org.sonar.core.util.UuidFactoryFast; import org.sonar.db.DbClient; import org.sonar.db.DbSession; @@ -61,7 +60,7 @@ public class CreateActionIT { public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final DbClient dbClient = db.getDbClient(); private final DbSession dbSession = db.getSession(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/CreateConditionActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/CreateConditionActionIT.java index 4ee0f1439bf..d1ce77961eb 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/CreateConditionActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/CreateConditionActionIT.java @@ -63,7 +63,7 @@ public class CreateConditionActionIT { public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final DbClient dbClient = db.getDbClient(); private final DbSession dbSession = db.getSession(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/DeleteConditionActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/DeleteConditionActionIT.java index 2835115cf70..a1b4654be9e 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/DeleteConditionActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/DeleteConditionActionIT.java @@ -48,7 +48,7 @@ import static org.sonar.server.qualitygate.ws.QualityGatesWsParameters.PARAM_ID; public class DeleteConditionActionIT { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/DeselectActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/DeselectActionIT.java index b653222ab55..a25af07a178 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/DeselectActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/DeselectActionIT.java @@ -48,7 +48,7 @@ public class DeselectActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final DbClient dbClient = db.getDbClient(); private final ComponentFinder componentFinder = TestComponentFinder.from(db); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/DestroyActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/DestroyActionIT.java index d729b29361d..40038b01758 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/DestroyActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/DestroyActionIT.java @@ -22,7 +22,6 @@ package org.sonar.server.qualitygate.ws; import org.junit.Rule; import org.junit.Test; import org.sonar.api.server.ws.WebService; -import org.sonar.api.utils.System2; import org.sonar.db.DbClient; import org.sonar.db.DbSession; import org.sonar.db.DbTester; @@ -54,7 +53,7 @@ public class DestroyActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final DbClient dbClient = db.getDbClient(); private final QualityGateFinder qualityGateFinder = new QualityGateFinder(dbClient); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/GetByProjectActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/GetByProjectActionIT.java index 2f018c8d0c6..ef2a2238110 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/GetByProjectActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/GetByProjectActionIT.java @@ -46,7 +46,7 @@ public class GetByProjectActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final DbClient dbClient = db.getDbClient(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/ListActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/ListActionIT.java index 3a9fe3f5894..94eededce33 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/ListActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/ListActionIT.java @@ -55,7 +55,7 @@ public class ListActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final DbClient dbClient = db.getDbClient(); private final QualityGateFinder qualityGateFinder = new QualityGateFinder(dbClient); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/ProjectStatusActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/ProjectStatusActionIT.java index 98204c9eb4a..48df225bd36 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/ProjectStatusActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/ProjectStatusActionIT.java @@ -78,7 +78,7 @@ public class ProjectStatusActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final DbClient dbClient = db.getDbClient(); private final DbSession dbSession = db.getSession(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/RemoveGroupActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/RemoveGroupActionIT.java index 1165e3e6b49..8ab0a2438cf 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/RemoveGroupActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/RemoveGroupActionIT.java @@ -45,7 +45,7 @@ public class RemoveGroupActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final DbClient dbClient = db.getDbClient(); private final QualityGatesWsSupport wsSupport = new QualityGatesWsSupport(dbClient, userSession, TestComponentFinder.from(db)); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/RemoveUserActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/RemoveUserActionIT.java index 5205c5ef779..e1ea8f01a80 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/RemoveUserActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/RemoveUserActionIT.java @@ -45,7 +45,7 @@ public class RemoveUserActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final DbClient dbClient = db.getDbClient(); private final QualityGatesWsSupport wsSupport = new QualityGatesWsSupport(dbClient, userSession, TestComponentFinder.from(db)); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/RenameActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/RenameActionIT.java index 33ffb00da2c..8a91ccf2a3a 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/RenameActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/RenameActionIT.java @@ -46,7 +46,7 @@ public class RenameActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final WsActionTester ws = new WsActionTester( new RenameAction(db.getDbClient(), new QualityGatesWsSupport(db.getDbClient(), userSession, TestComponentFinder.from(db)))); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/SearchActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/SearchActionIT.java index 90a4c60e06f..8f57d39b527 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/SearchActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/SearchActionIT.java @@ -55,7 +55,7 @@ public class SearchActionIT { public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final DbClient dbClient = db.getDbClient(); private final SearchAction underTest = new SearchAction(dbClient, userSession, diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/SearchGroupsActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/SearchGroupsActionIT.java index dad8c604f76..4f49fabbf64 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/SearchGroupsActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/SearchGroupsActionIT.java @@ -51,7 +51,7 @@ public class SearchGroupsActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final QualityGatesWsSupport wsSupport = new QualityGatesWsSupport(db.getDbClient(), userSession, TestComponentFinder.from(db)); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/SearchUsersActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/SearchUsersActionIT.java index ab23240656c..b42f0f73398 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/SearchUsersActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/SearchUsersActionIT.java @@ -52,7 +52,7 @@ public class SearchUsersActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final QualityGatesWsSupport wsSupport = new QualityGatesWsSupport(db.getDbClient(), userSession, TestComponentFinder.from(db)); private AvatarResolver avatarResolver = new FakeAvatarResolver(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/SelectActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/SelectActionIT.java index a1c6f2710e1..bc4efd5d2bc 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/SelectActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/SelectActionIT.java @@ -22,7 +22,6 @@ package org.sonar.server.qualitygate.ws; import java.util.Optional; import org.junit.Rule; import org.junit.Test; -import org.sonar.api.utils.System2; import org.sonar.db.DbClient; import org.sonar.db.DbTester; import org.sonar.db.component.ComponentDto; @@ -47,7 +46,7 @@ public class SelectActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final DbClient dbClient = db.getDbClient(); private final ComponentFinder componentFinder = TestComponentFinder.from(db); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/SetAsDefaultActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/SetAsDefaultActionIT.java index 2f8921910b5..43f65398eeb 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/SetAsDefaultActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/SetAsDefaultActionIT.java @@ -22,7 +22,6 @@ package org.sonar.server.qualitygate.ws; import org.junit.Rule; import org.junit.Test; import org.sonar.api.server.ws.WebService; -import org.sonar.api.utils.System2; import org.sonar.db.DbTester; import org.sonar.db.qualitygate.QualityGateDto; import org.sonar.server.component.TestComponentFinder; @@ -38,7 +37,7 @@ public class SetAsDefaultActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final WsActionTester ws = new WsActionTester( new SetAsDefaultAction(db.getDbClient(), userSession, new QualityGatesWsSupport(db.getDbClient(), userSession, TestComponentFinder.from(db)))); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/ShowActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/ShowActionIT.java index 75b1c621d4c..f77091cebf2 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/ShowActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/ShowActionIT.java @@ -24,7 +24,6 @@ import org.junit.Rule; import org.junit.Test; import org.sonar.api.server.ws.WebService; import org.sonar.api.server.ws.WebService.Param; -import org.sonar.api.utils.System2; import org.sonar.db.DbSession; import org.sonar.db.DbTester; import org.sonar.db.metric.MetricDto; @@ -61,7 +60,7 @@ public class ShowActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final QualityGateCaycChecker qualityGateCaycChecker = mock(QualityGateCaycChecker.class); private final WsActionTester ws = new WsActionTester( diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/UpdateConditionActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/UpdateConditionActionIT.java index 91636612fd2..9c1976f2049 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/UpdateConditionActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/UpdateConditionActionIT.java @@ -26,7 +26,6 @@ import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import org.sonar.api.server.ws.WebService; -import org.sonar.api.utils.System2; import org.sonar.db.DbClient; import org.sonar.db.DbSession; import org.sonar.db.DbTester; @@ -63,7 +62,7 @@ public class UpdateConditionActionIT { public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final DbClient dbClient = db.getDbClient(); private final DbSession dbSession = db.getSession(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/QProfileBackuperImplIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/QProfileBackuperImplIT.java index ab96c656525..04e750e7501 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/QProfileBackuperImplIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/QProfileBackuperImplIT.java @@ -70,7 +70,7 @@ public class QProfileBackuperImplIT { private final System2 system2 = new AlwaysIncreasingSystem2(); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); private final DummyReset reset = new DummyReset(); private final QProfileFactory profileFactory = new DummyProfileFactory(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/QProfileComparisonIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/QProfileComparisonIT.java index 8d81172c627..fedcf65c942 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/QProfileComparisonIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/QProfileComparisonIT.java @@ -58,7 +58,7 @@ public class QProfileComparisonIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone().anonymous(); @Rule - public DbTester dbTester = DbTester.create(true); + public DbTester dbTester = DbTester.create(); @Rule public EsTester es = EsTester.create(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/QProfileCopierIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/QProfileCopierIT.java index 22d667f6987..7e31f55af42 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/QProfileCopierIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/QProfileCopierIT.java @@ -46,7 +46,7 @@ public class QProfileCopierIT { private final System2 system2 = new AlwaysIncreasingSystem2(); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); @Rule public JUnitTempFolder temp = new JUnitTempFolder(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/QProfileExportersIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/QProfileExportersIT.java index 6be92265788..8e9d98bc20c 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/QProfileExportersIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/QProfileExportersIT.java @@ -64,7 +64,7 @@ public class QProfileExportersIT { private final System2 system2 = new AlwaysIncreasingSystem2(); @org.junit.Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); private final RuleFinder ruleFinder = new DefaultRuleFinder(db.getDbClient(), mock(RuleDescriptionFormatter.class)); private final ProfileExporter[] exporters = new ProfileExporter[] { diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/QProfileFactoryImplIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/QProfileFactoryImplIT.java index 0a7834c5a81..1af67ebf60b 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/QProfileFactoryImplIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/QProfileFactoryImplIT.java @@ -64,7 +64,7 @@ public class QProfileFactoryImplIT { private System2 system2 = new AlwaysIncreasingSystem2(); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); private DbSession dbSession = db.getSession(); private ActiveRuleIndexer activeRuleIndexer = mock(ActiveRuleIndexer.class); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/QProfileResetImplIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/QProfileResetImplIT.java index ff82030a2b8..e26eac8c0b8 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/QProfileResetImplIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/QProfileResetImplIT.java @@ -56,7 +56,7 @@ public class QProfileResetImplIT { private static final String LANGUAGE = "xoo"; @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/QProfileRuleImplIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/QProfileRuleImplIT.java index 4c74e57bc4d..b9ea7fcc91f 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/QProfileRuleImplIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/QProfileRuleImplIT.java @@ -79,7 +79,7 @@ public class QProfileRuleImplIT { private System2 system2 = new AlwaysIncreasingSystem2(); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); @Rule public EsTester es = EsTester.create(); @Rule diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/QProfileRulesImplIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/QProfileRulesImplIT.java index 508bae0782c..6de0361ea53 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/QProfileRulesImplIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/QProfileRulesImplIT.java @@ -55,7 +55,7 @@ public class QProfileRulesImplIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public EsTester es = EsTester.create(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/QProfileTreeImplIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/QProfileTreeImplIT.java index 5b5bedfbb39..d29c0f91b64 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/QProfileTreeImplIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/QProfileTreeImplIT.java @@ -62,7 +62,7 @@ public class QProfileTreeImplIT { private System2 system2 = new AlwaysIncreasingSystem2(); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); @Rule public EsTester es = EsTester.create(); @Rule diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/RegisterQualityProfilesIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/RegisterQualityProfilesIT.java index 84215ecc252..eac7cc3e7b5 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/RegisterQualityProfilesIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/RegisterQualityProfilesIT.java @@ -61,7 +61,7 @@ public class RegisterQualityProfilesIT { private final System2 system2 = new TestSystem2().setNow(1659510722633L); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); @Rule public UserSessionRule userSessionRule = UserSessionRule.standalone(); @Rule diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/RegisterQualityProfilesNotificationIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/RegisterQualityProfilesNotificationIT.java index 17d2992398a..f252d34add8 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/RegisterQualityProfilesNotificationIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/RegisterQualityProfilesNotificationIT.java @@ -89,7 +89,7 @@ public class RegisterQualityProfilesNotificationIT { private System2 system2 = mock(System2.class); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); @Rule public UserSessionRule userSessionRule = UserSessionRule.standalone(); @Rule diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/builtin/BuiltInQProfileInsertImplIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/builtin/BuiltInQProfileInsertImplIT.java index 651c85e5913..631c741d34e 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/builtin/BuiltInQProfileInsertImplIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/builtin/BuiltInQProfileInsertImplIT.java @@ -59,7 +59,7 @@ public class BuiltInQProfileInsertImplIT { @Rule public BuiltInQProfileRepositoryRule builtInQProfileRepository = new BuiltInQProfileRepositoryRule(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final System2 system2 = new AlwaysIncreasingSystem2(); private final UuidFactory uuidFactory = new SequenceUuidFactory(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/builtin/BuiltInQProfileRepositoryImplIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/builtin/BuiltInQProfileRepositoryImplIT.java index 6dc286ae501..6f4f752b799 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/builtin/BuiltInQProfileRepositoryImplIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/builtin/BuiltInQProfileRepositoryImplIT.java @@ -50,7 +50,7 @@ public class BuiltInQProfileRepositoryImplIT { private static final String SONAR_WAY_QP_NAME = "Sonar way"; @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final DbClient dbClient = db.getDbClient(); private final ServerRuleFinder ruleFinder = new DefaultRuleFinder(dbClient, mock(RuleDescriptionFormatter.class)); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/builtin/BuiltInQProfileUpdateImplIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/builtin/BuiltInQProfileUpdateImplIT.java index afe413d6b0f..71c4a03af93 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/builtin/BuiltInQProfileUpdateImplIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/builtin/BuiltInQProfileUpdateImplIT.java @@ -80,7 +80,7 @@ public class BuiltInQProfileUpdateImplIT { @Rule public BuiltInQProfileRepositoryRule builtInProfileRepository = new BuiltInQProfileRepositoryRule(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); private System2 system2 = new TestSystem2().setNow(NOW); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/builtin/RuleActivatorIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/builtin/RuleActivatorIT.java index d98d870c196..208dc9ee6f9 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/builtin/RuleActivatorIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/builtin/RuleActivatorIT.java @@ -64,7 +64,7 @@ import static org.sonar.server.qualityprofile.ActiveRuleInheritance.OVERRIDES; */ public class RuleActivatorIT { @Rule - public final DbTester db = DbTester.create(true); + public final DbTester db = DbTester.create(); @Rule public final UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/ActivateRuleActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/ActivateRuleActionIT.java index 4508853dbd0..f982f31eae7 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/ActivateRuleActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/ActivateRuleActionIT.java @@ -61,7 +61,7 @@ import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters. public class ActivateRuleActionIT { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/ActivateRulesActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/ActivateRulesActionIT.java index 2347b25850c..c2cf53926db 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/ActivateRulesActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/ActivateRulesActionIT.java @@ -50,7 +50,7 @@ import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters. public class ActivateRulesActionIT { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/AddGroupActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/AddGroupActionIT.java index 83ca536267b..64fa9ff5ce9 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/AddGroupActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/AddGroupActionIT.java @@ -53,7 +53,7 @@ public class AddGroupActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final QProfileWsSupport wsSupport = new QProfileWsSupport(db.getDbClient(), userSession); private final UuidFactory uuidFactory = UuidFactoryFast.getInstance(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/AddProjectActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/AddProjectActionIT.java index 1ba8e251608..4edf4521f9a 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/AddProjectActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/AddProjectActionIT.java @@ -56,7 +56,7 @@ public class AddProjectActionIT { private static final String LANGUAGE_2 = "foo"; @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/AddUserActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/AddUserActionIT.java index 44fad8bc8bc..a1cdf072a40 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/AddUserActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/AddUserActionIT.java @@ -52,7 +52,7 @@ public class AddUserActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final QProfileWsSupport wsSupport = new QProfileWsSupport(db.getDbClient(), userSession); private final UuidFactory uuidFactory = UuidFactoryFast.getInstance(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/BackupActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/BackupActionIT.java index b102fbe3c83..0159f070a83 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/BackupActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/BackupActionIT.java @@ -43,7 +43,7 @@ public class BackupActionIT { private static final String A_LANGUAGE = "xoo"; @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/ChangeParentActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/ChangeParentActionIT.java index ab87edacb8f..145ea3bc32f 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/ChangeParentActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/ChangeParentActionIT.java @@ -74,7 +74,7 @@ import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters. public class ChangeParentActionIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); @Rule public EsTester es = EsTester.create(); @Rule diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/ChangelogActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/ChangelogActionIT.java index abb80f78c76..7d282d04319 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/ChangelogActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/ChangelogActionIT.java @@ -54,7 +54,7 @@ public class ChangelogActionIT { private final TestSystem2 system2 = new TestSystem2().setNow(DateUtils.parseDateTime(DATE).getTime()); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/CompareActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/CompareActionIT.java index 3186746766d..0e5274a4673 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/CompareActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/CompareActionIT.java @@ -51,7 +51,7 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy; public class CompareActionIT { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public UserSessionRule userSessionRule = UserSessionRule.standalone(); @Rule diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/CopyActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/CopyActionIT.java index f8233a8433f..9433d00d9b4 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/CopyActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/CopyActionIT.java @@ -57,7 +57,7 @@ public class CopyActionIT { private static final String A_LANGUAGE = "lang1"; @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/CreateActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/CreateActionIT.java index 57eb50793df..0bf5c551208 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/CreateActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/CreateActionIT.java @@ -76,7 +76,7 @@ public class CreateActionIT { .setLanguage(XOO_LANGUAGE); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public EsTester es = EsTester.create(); @Rule diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/DeactivateRuleActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/DeactivateRuleActionIT.java index 39b4157ddb9..f49a9e7e3ab 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/DeactivateRuleActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/DeactivateRuleActionIT.java @@ -57,7 +57,7 @@ import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters. public class DeactivateRuleActionIT { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/DeactivateRulesActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/DeactivateRulesActionIT.java index c05829c3370..3e51f51ec04 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/DeactivateRulesActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/DeactivateRulesActionIT.java @@ -51,7 +51,7 @@ import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters. public class DeactivateRulesActionIT { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/DeleteActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/DeleteActionIT.java index ca0b4c25aa0..352ff1bc8f0 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/DeleteActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/DeleteActionIT.java @@ -58,7 +58,7 @@ public class DeleteActionIT { private static final String A_LANGUAGE = "xoo"; @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/ExportActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/ExportActionIT.java index 65ef950cfce..317b94ca6ae 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/ExportActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/ExportActionIT.java @@ -52,7 +52,7 @@ public class ExportActionIT { private static final String JAVA_LANGUAGE = "java"; @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/InheritanceActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/InheritanceActionIT.java index a2710a9452f..ef5abc51e4b 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/InheritanceActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/InheritanceActionIT.java @@ -69,7 +69,7 @@ import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters. public class InheritanceActionIT { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public EsTester es = EsTester.create(); @Rule diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/ProjectsActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/ProjectsActionIT.java index e7c85b57ad8..9c77ed5c016 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/ProjectsActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/ProjectsActionIT.java @@ -44,7 +44,7 @@ import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters. public class ProjectsActionIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/QProfileWsSupportIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/QProfileWsSupportIT.java index 0d580f32b79..0feff039eec 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/QProfileWsSupportIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/QProfileWsSupportIT.java @@ -36,7 +36,7 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy; public class QProfileWsSupportIT { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/QProfilesWsMediumIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/QProfilesWsMediumIT.java index 4fe7fbe111e..2318e4b0819 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/QProfilesWsMediumIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/QProfilesWsMediumIT.java @@ -76,7 +76,7 @@ public class QProfilesWsMediumIT { @Rule public EsTester es = EsTester.create(); @Rule - public DbTester dbTester = DbTester.create(true); + public DbTester dbTester = DbTester.create(); private final DbClient dbClient = dbTester.getDbClient(); private final DbSession dbSession = dbTester.getSession(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/RemoveGroupActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/RemoveGroupActionIT.java index 62e5b52b1a3..bc06530287b 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/RemoveGroupActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/RemoveGroupActionIT.java @@ -51,7 +51,7 @@ public class RemoveGroupActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final QProfileWsSupport wsSupport = new QProfileWsSupport(db.getDbClient(), userSession); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/RemoveProjectActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/RemoveProjectActionIT.java index 32b7603bf90..38ac097dd0d 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/RemoveProjectActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/RemoveProjectActionIT.java @@ -57,7 +57,7 @@ public class RemoveProjectActionIT { private static final String LANGUAGE_2 = "foo"; @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/RemoveUserActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/RemoveUserActionIT.java index e1635e66bc4..1a6dd87dc9e 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/RemoveUserActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/RemoveUserActionIT.java @@ -51,7 +51,7 @@ public class RemoveUserActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final QProfileWsSupport wsSupport = new QProfileWsSupport(db.getDbClient(), userSession); private final WsActionTester ws = new WsActionTester(new RemoveUserAction(db.getDbClient(), wsSupport, LANGUAGES)); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/RenameActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/RenameActionIT.java index f086be7dc05..e6ec279fee9 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/RenameActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/RenameActionIT.java @@ -48,7 +48,7 @@ import static org.sonar.db.permission.GlobalPermission.SCAN; public class RenameActionIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/RestoreActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/RestoreActionIT.java index 4c7276347c6..2d86a4125c5 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/RestoreActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/RestoreActionIT.java @@ -52,7 +52,7 @@ public class RestoreActionIT { private static final String A_LANGUAGE = "xoo"; @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/SearchActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/SearchActionIT.java index 961924a3c73..bb1fa77deb0 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/SearchActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/SearchActionIT.java @@ -68,7 +68,7 @@ public class SearchActionIT { private static final Languages LANGUAGES = new Languages(XOO1, XOO2); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); private final QualityProfileDbTester qualityProfileDb = db.qualityProfiles(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/SearchGroupsActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/SearchGroupsActionIT.java index 68db8044d86..87ca9310452 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/SearchGroupsActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/SearchGroupsActionIT.java @@ -58,7 +58,7 @@ public class SearchGroupsActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final QProfileWsSupport wsSupport = new QProfileWsSupport(db.getDbClient(), userSession); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/SearchUsersActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/SearchUsersActionIT.java index e9e2295d9fb..3b7a7820097 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/SearchUsersActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/SearchUsersActionIT.java @@ -60,7 +60,7 @@ public class SearchUsersActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final QProfileWsSupport wsSupport = new QProfileWsSupport(db.getDbClient(), userSession); private AvatarResolver avatarResolver = new FakeAvatarResolver(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/SetDefaultActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/SetDefaultActionIT.java index 1656c5a62ef..c2c51efd83e 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/SetDefaultActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/SetDefaultActionIT.java @@ -50,7 +50,7 @@ public class SetDefaultActionIT { private static final String XOO_2_KEY = "xoo2"; @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public UserSessionRule userSessionRule = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/ShowActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/ShowActionIT.java index c954374da91..c7fc1eb58de 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/ShowActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualityprofile/ws/ShowActionIT.java @@ -62,7 +62,7 @@ public class ShowActionIT { @Rule public EsTester es = EsTester.create(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/RuleCreatorIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/RuleCreatorIT.java index 3c1f81b6e9a..5cc1717306c 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/RuleCreatorIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/RuleCreatorIT.java @@ -55,7 +55,6 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.junit.Assert.fail; -import static org.sonar.db.rule.RuleDescriptionSectionDto.createDefaultRuleDescriptionSection; import static org.sonar.db.rule.RuleTesting.newCustomRule; import static org.sonar.db.rule.RuleTesting.newRule; import static org.sonar.server.util.TypeValidationsTesting.newFullTypeValidations; @@ -65,7 +64,7 @@ public class RuleCreatorIT { private final System2 system2 = new TestSystem2().setNow(Instant.now().toEpochMilli()); @Rule - public DbTester dbTester = DbTester.create(system2, true); + public DbTester dbTester = DbTester.create(system2); @Rule public EsTester es = EsTester.create(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/RuleUpdaterIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/RuleUpdaterIT.java index dfe5c39634b..587fb83ac2a 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/RuleUpdaterIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/RuleUpdaterIT.java @@ -73,7 +73,7 @@ public class RuleUpdaterIT { public UserSessionRule userSessionRule = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); @Rule public EsTester es = EsTester.create(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/ActiveRuleCompleterIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/ActiveRuleCompleterIT.java index a24307be57b..7b7bdad00e9 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/ActiveRuleCompleterIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/ActiveRuleCompleterIT.java @@ -34,7 +34,7 @@ import static org.assertj.core.api.Assertions.assertThat; public class ActiveRuleCompleterIT { @Rule - public DbTester dbTester = DbTester.create(true); + public DbTester dbTester = DbTester.create(); @Test public void test_completeShow() { diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/AppActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/AppActionIT.java index 05d0b7ae9be..e4df4e339a0 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/AppActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/AppActionIT.java @@ -42,7 +42,7 @@ public class AppActionIT { private static final Language LANG2 = LanguageTesting.newLanguage("ws", "Whitespace"); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/CreateActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/CreateActionIT.java index 18750232872..23cef90350c 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/CreateActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/CreateActionIT.java @@ -26,7 +26,6 @@ import org.sonar.api.resources.Languages; import org.sonar.api.rule.RuleKey; import org.sonar.api.rule.RuleStatus; import org.sonar.api.rule.Severity; -import org.sonar.api.rules.RuleType; import org.sonar.api.utils.System2; import org.sonar.core.util.SequenceUuidFactory; import org.sonar.core.util.UuidFactory; @@ -51,7 +50,6 @@ import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.mock; import static org.sonar.api.rules.RuleType.BUG; -import static org.sonar.api.rules.RuleType.CODE_SMELL; import static org.sonar.db.permission.GlobalPermission.ADMINISTER_QUALITY_PROFILES; import static org.sonar.db.rule.RuleTesting.newCustomRule; import static org.sonar.db.rule.RuleTesting.newTemplateRule; @@ -66,7 +64,7 @@ public class CreateActionIT { public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); @Rule public EsTester es = EsTester.create(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/DeleteActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/DeleteActionIT.java index 0dc5c789951..ccfc4d18a6d 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/DeleteActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/DeleteActionIT.java @@ -50,7 +50,7 @@ public class DeleteActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester dbTester = DbTester.create(true); + public DbTester dbTester = DbTester.create(); @Rule public EsTester es = EsTester.create(); private DbClient dbClient = dbTester.getDbClient(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/ListActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/ListActionIT.java index 490d35c0143..c4cd5bb9773 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/ListActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/ListActionIT.java @@ -38,7 +38,7 @@ public class ListActionIT { private static final String RULE_KEY_2 = "S002"; @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); ListAction underTest = new ListAction(dbTester.getDbClient()); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/RepositoriesActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/RepositoriesActionIT.java index b97822854c5..e70c26a86db 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/RepositoriesActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/RepositoriesActionIT.java @@ -36,7 +36,7 @@ public class RepositoriesActionIT { private static final String EMPTY_JSON_RESPONSE = "{\"repositories\":[]}"; @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private RepositoriesAction underTest = new RepositoriesAction(dbTester.getDbClient()); private WsActionTester tester = new WsActionTester(underTest); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/RuleQueryFactoryIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/RuleQueryFactoryIT.java index f4177d92041..52df5617a90 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/RuleQueryFactoryIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/RuleQueryFactoryIT.java @@ -71,7 +71,7 @@ import static org.sonar.server.rule.ws.RulesWsParameters.PARAM_TYPES; public class RuleQueryFactoryIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/SearchActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/SearchActionIT.java index bbf8f70feba..0e6a06f7971 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/SearchActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/SearchActionIT.java @@ -114,7 +114,7 @@ public class SearchActionIT { private final System2 system2 = new AlwaysIncreasingSystem2(); @org.junit.Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); @org.junit.Rule public EsTester es = EsTester.create(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/ShowActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/ShowActionIT.java index 34745ad1349..eb34ca1e806 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/ShowActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/ShowActionIT.java @@ -82,7 +82,7 @@ public class ShowActionIT { @org.junit.Rule public UserSessionRule userSession = UserSessionRule.standalone(); @org.junit.Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final UuidFactory uuidFactory = UuidFactoryFast.getInstance(); private final MacroInterpreter macroInterpreter = mock(MacroInterpreter.class); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/TagsActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/TagsActionIT.java index cb2daec3685..04bbeba8981 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/TagsActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/TagsActionIT.java @@ -43,7 +43,7 @@ public class TagsActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public EsTester es = EsTester.create(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/UpdateActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/UpdateActionIT.java index 910c687bb4a..0280eaec457 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/UpdateActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/rule/ws/UpdateActionIT.java @@ -72,7 +72,7 @@ public class UpdateActionIT { private static final long PAST = 10000L; @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public EsTester es = EsTester.create(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/scannercache/ws/ClearActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/scannercache/ws/ClearActionIT.java index bf82e2923ff..db7e55a404f 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/scannercache/ws/ClearActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/scannercache/ws/ClearActionIT.java @@ -51,7 +51,7 @@ public class ClearActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private final ScannerAnalysisCacheDao dao = new ScannerAnalysisCacheDao(); private final ProjectDao projectDao = new ProjectDao(System2.INSTANCE, new NoOpAuditPersister()); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/scannercache/ws/GetActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/scannercache/ws/GetActionIT.java index 1a47676e9dd..592452642ed 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/scannercache/ws/GetActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/scannercache/ws/GetActionIT.java @@ -56,7 +56,7 @@ public class GetActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private final ScannerAnalysisCacheDao dao = new ScannerAnalysisCacheDao(); private final ProjectDao projectDao = new ProjectDao(System2.INSTANCE, new NoOpAuditPersister()); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/setting/ws/GenerateSecretKeyActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/setting/ws/GenerateSecretKeyActionIT.java index ab99b80b025..be15012b0ee 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/setting/ws/GenerateSecretKeyActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/setting/ws/GenerateSecretKeyActionIT.java @@ -47,7 +47,7 @@ public class GenerateSecretKeyActionIT { @Rule public TemporaryFolder temporaryFolder = new TemporaryFolder(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private DbClient dbClient = db.getDbClient(); private MapSettings settings = new MapSettings(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/setting/ws/ListDefinitionsActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/setting/ws/ListDefinitionsActionIT.java index e400fa39ebf..4fc97352a34 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/setting/ws/ListDefinitionsActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/setting/ws/ListDefinitionsActionIT.java @@ -68,7 +68,7 @@ public class ListDefinitionsActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final DbClient dbClient = db.getDbClient(); private ProjectDto project; diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/setting/ws/ResetActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/setting/ws/ResetActionIT.java index bbdbdb77fa0..9e2d6411294 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/setting/ws/ResetActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/setting/ws/ResetActionIT.java @@ -67,7 +67,7 @@ public class ResetActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final I18nRule i18n = new I18nRule(); private final PropertyDbTester propertyDb = new PropertyDbTester(db); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/setting/ws/SetActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/setting/ws/SetActionIT.java index f022e088bab..a7d893ff04e 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/setting/ws/SetActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/setting/ws/SetActionIT.java @@ -82,7 +82,7 @@ public class SetActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone().logIn(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final PropertyDbTester propertyDb = new PropertyDbTester(db); private final DbClient dbClient = db.getDbClient(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/setting/ws/SettingsUpdaterIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/setting/ws/SettingsUpdaterIT.java index d370f9f4648..41a106a54d6 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/setting/ws/SettingsUpdaterIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/setting/ws/SettingsUpdaterIT.java @@ -30,7 +30,6 @@ import org.sonar.api.utils.System2; import org.sonar.db.DbClient; import org.sonar.db.DbSession; import org.sonar.db.DbTester; -import org.sonar.db.component.ComponentDbTester; import org.sonar.db.project.ProjectDto; import org.sonar.db.property.PropertyDbTester; import org.sonar.db.property.PropertyQuery; @@ -48,7 +47,7 @@ public class SettingsUpdaterIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); DbClient dbClient = db.getDbClient(); DbSession dbSession = db.getSession(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/setting/ws/ValuesActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/setting/ws/ValuesActionIT.java index 9b8173d141d..ba39718b785 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/setting/ws/ValuesActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/setting/ws/ValuesActionIT.java @@ -74,7 +74,7 @@ public class ValuesActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final DbClient dbClient = db.getDbClient(); private final PropertyDefinitions definitions = new PropertyDefinitions(System2.INSTANCE); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/source/SourceServiceIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/source/SourceServiceIT.java index cea9fbd67bc..af716867dbf 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/source/SourceServiceIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/source/SourceServiceIT.java @@ -45,7 +45,7 @@ public class SourceServiceIT { public static final String FILE_UUID = "FILE_UUID"; @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); HtmlSourceDecorator htmlDecorator = mock(HtmlSourceDecorator.class); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/source/ws/IndexActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/source/ws/IndexActionIT.java index 54dc83be607..b5a99a69b2b 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/source/ws/IndexActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/source/ws/IndexActionIT.java @@ -47,7 +47,7 @@ public class IndexActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); WsActionTester tester = new WsActionTester( new IndexAction(db.getDbClient(), new SourceService(db.getDbClient(), new HtmlSourceDecorator()), userSession, TestComponentFinder.from(db))); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/source/ws/IssueSnippetsActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/source/ws/IssueSnippetsActionIT.java index 7792130d79b..c25e9c3fcd2 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/source/ws/IssueSnippetsActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/source/ws/IssueSnippetsActionIT.java @@ -67,7 +67,7 @@ import static org.sonar.db.component.ComponentTesting.newFileDto; public class IssueSnippetsActionIT { @Rule - public final DbTester db = DbTester.create(System2.INSTANCE, true); + public final DbTester db = DbTester.create(System2.INSTANCE); @Rule public final UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/source/ws/LinesActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/source/ws/LinesActionIT.java index e49658c97cf..8ab9426c416 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/source/ws/LinesActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/source/ws/LinesActionIT.java @@ -59,7 +59,7 @@ import static org.sonar.db.component.ComponentTesting.newFileDto; public class LinesActionIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/source/ws/RawActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/source/ws/RawActionIT.java index 3bd9ec6969d..5c49515e166 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/source/ws/RawActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/source/ws/RawActionIT.java @@ -47,7 +47,7 @@ public class RawActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private ResourceTypesRule resourceTypes = new ResourceTypesRule().setRootQualifiers(Qualifiers.PROJECT); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/source/ws/ScmActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/source/ws/ScmActionIT.java index 31712ec694e..8ec90888d79 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/source/ws/ScmActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/source/ws/ScmActionIT.java @@ -50,7 +50,7 @@ public class ScmActionIT { private static final String PROJECT_UUID = "PROJECT_A"; @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); @Rule public UserSessionRule userSessionRule = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ui/ws/ComponentActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ui/ws/ComponentActionIT.java index eab265a34c1..183647f37fe 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ui/ws/ComponentActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ui/ws/ComponentActionIT.java @@ -82,7 +82,6 @@ import static org.mockito.Mockito.when; import static org.sonar.api.measures.CoreMetrics.QUALITY_PROFILES_KEY; import static org.sonar.api.utils.DateUtils.parseDateTime; import static org.sonar.api.web.page.Page.Scope.COMPONENT; -import static org.sonar.db.component.ComponentDbTester.toProjectDto; import static org.sonar.db.component.ComponentTesting.newDirectory; import static org.sonar.db.component.ComponentTesting.newFileDto; import static org.sonar.db.component.ComponentTesting.newPrivateProjectDto; @@ -98,7 +97,7 @@ import static org.sonar.test.JsonAssert.assertJson; public class ComponentActionIT { @Rule - public final DbTester db = DbTester.create(System2.INSTANCE, true); + public final DbTester db = DbTester.create(System2.INSTANCE); @Rule public final UserSessionRule userSession = UserSessionRule.standalone(); @@ -256,34 +255,36 @@ public class ComponentActionIT { @Test public void return_canBrowseAllChildProjects_when_component_is_an_application() { db.qualityGates().createDefaultQualityGate(); - ComponentDto application1 = db.components().insertPrivateApplication().getMainBranchComponent(); - ComponentDto project11 = db.components().insertPrivateProject().getMainBranchComponent(); - ComponentDto project12 = db.components().insertPrivateProject().getMainBranchComponent(); + ProjectData application1 = db.components().insertPrivateApplication(); + ProjectData project11 = db.components().insertPrivateProject(); + ProjectData project12 = db.components().insertPrivateProject(); userSession.registerApplication( - toProjectDto(application1, 1L), - toProjectDto(project11, 1L), - toProjectDto(project12, 1L)); - userSession.addProjectPermission(UserRole.USER, application1, project11, project12); - - ComponentDto application2 = db.components().insertPrivateApplication().getMainBranchComponent(); - ComponentDto project21 = db.components().insertPrivateProject().getMainBranchComponent(); - ComponentDto project22 = db.components().insertPrivateProject().getMainBranchComponent(); + application1.getProjectDto(), + project11.getProjectDto(), + project12.getProjectDto()); + userSession.addProjectPermission(UserRole.USER, application1.getProjectDto(), project11.getProjectDto(), project12.getProjectDto()) + .registerBranches(application1.getMainBranchDto()); + + ProjectData application2 = db.components().insertPrivateApplication(); + ProjectData project21 = db.components().insertPrivateProject(); + ProjectData project22 = db.components().insertPrivateProject(); userSession.registerApplication( - toProjectDto(application2, 1L), - toProjectDto(project21, 1L), - toProjectDto(project22, 1L)); - userSession.addProjectPermission(UserRole.USER, application2, project21); + application2.getProjectDto(), + project21.getProjectDto(), + project22.getProjectDto()); + userSession.addProjectPermission(UserRole.USER, application2.getProjectDto(), project21.getProjectDto()) + .registerBranches(application2.getMainBranchDto()); init(); // access to all projects (project11, project12) - String json = execute(application1.getKey()); + String json = execute(application1.projectKey()); assertJson(json).isSimilarTo("{" + "\"canBrowseAllChildProjects\":true" + "}"); // access to some projects (project11) - json = execute(application2.getKey()); + json = execute(application2.projectKey()); assertJson(json).isSimilarTo("{" + "\"canBrowseAllChildProjects\":false" + "}"); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ui/ws/MarketplaceActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ui/ws/MarketplaceActionIT.java index 244c45af479..81346617760 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ui/ws/MarketplaceActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/ui/ws/MarketplaceActionIT.java @@ -27,7 +27,6 @@ import org.sonar.api.platform.Server; import org.sonar.api.server.ws.WebService; import org.sonar.db.DbClient; import org.sonar.db.DbTester; -import org.sonar.db.component.ComponentDto; import org.sonar.db.project.ProjectDto; import org.sonar.server.exceptions.ForbiddenException; import org.sonar.server.exceptions.UnauthorizedException; @@ -48,7 +47,7 @@ public class MarketplaceActionIT { @Rule public UserSessionRule userSessionRule = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final Server server = mock(Server.class); private final DbClient dbClient = db.getDbClient(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/AnonymizeActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/AnonymizeActionIT.java index 22852b0f1a3..a03f4399b57 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/AnonymizeActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/AnonymizeActionIT.java @@ -48,7 +48,7 @@ public class AnonymizeActionIT { private final System2 system2 = new AlwaysIncreasingSystem2(); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/ChangePasswordActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/ChangePasswordActionIT.java index 291a79ef12b..83b30b34dba 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/ChangePasswordActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/ChangePasswordActionIT.java @@ -69,7 +69,7 @@ public class ChangePasswordActionIT { private static final String NEW_PASSWORD = "12345"; @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public UserSessionRule userSessionRule = UserSessionRule.standalone().logIn(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/CreateActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/CreateActionIT.java index 96e5b27f69b..5af7f5a8c5e 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/CreateActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/CreateActionIT.java @@ -64,7 +64,7 @@ public class CreateActionIT { private final System2 system2 = new AlwaysIncreasingSystem2(); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); @Rule public UserSessionRule userSessionRule = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/CurrentActionHomepageIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/CurrentActionHomepageIT.java index 4925a930beb..261b65a08a5 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/CurrentActionHomepageIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/CurrentActionHomepageIT.java @@ -58,7 +58,7 @@ public class CurrentActionHomepageIT { @Rule public UserSessionRule userSessionRule = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final DbClient dbClient = db.getDbClient(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/CurrentActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/CurrentActionIT.java index c9f6fa59d5a..0d1d89ef5b1 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/CurrentActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/CurrentActionIT.java @@ -57,7 +57,7 @@ public class CurrentActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final PlatformEditionProvider platformEditionProvider = mock(PlatformEditionProvider.class); private final HomepageTypesImpl homepageTypes = new HomepageTypesImpl(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/DeactivateActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/DeactivateActionIT.java index 097371f5ceb..665db995126 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/DeactivateActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/DeactivateActionIT.java @@ -71,7 +71,7 @@ public class DeactivateActionIT { private final System2 system2 = new AlwaysIncreasingSystem2(); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/DismissNoticeActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/DismissNoticeActionIT.java index 219d8aca4c0..7e5f410dbf8 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/DismissNoticeActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/DismissNoticeActionIT.java @@ -37,7 +37,7 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy; public class DismissNoticeActionIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); @Rule public UserSessionRule userSessionRule = UserSessionRule.standalone(); @@ -122,4 +122,4 @@ public class DismissNoticeActionIT { } -}
\ No newline at end of file +} diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/GroupsActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/GroupsActionIT.java index 951bb1c1e62..af07217fedd 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/GroupsActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/GroupsActionIT.java @@ -53,7 +53,7 @@ public class GroupsActionIT { private static final String USER_LOGIN = "john"; @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public UserSessionRule userSession = UserSessionRule.standalone().logIn().addPermission(GlobalPermission.ADMINISTER); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/SearchActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/SearchActionIT.java index 4d498fea5d9..4a4c315715d 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/SearchActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/SearchActionIT.java @@ -69,7 +69,7 @@ public class SearchActionIT { public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private ManagedInstanceService managedInstanceService = mock(ManagedInstanceService.class); private WsActionTester ws = new WsActionTester(new SearchAction(userSession, db.getDbClient(), new AvatarResolverImpl(), managedInstanceService)); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/SetHomepageActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/SetHomepageActionIT.java index 893033bd2a2..8d8953c104b 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/SetHomepageActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/SetHomepageActionIT.java @@ -45,7 +45,7 @@ public class SetHomepageActionIT { public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final DbClient dbClient = db.getDbClient(); private final WsActionTester ws = new WsActionTester(new SetHomepageAction(userSession, dbClient, TestComponentFinder.from(db))); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/UpdateActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/UpdateActionIT.java index 716ec175f9a..cf0f8bfee69 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/UpdateActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/UpdateActionIT.java @@ -60,7 +60,7 @@ public class UpdateActionIT { private final System2 system2 = new System2(); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); @Rule public UserSessionRule userSession = UserSessionRule.standalone().logIn().setSystemAdministrator(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/UpdateIdentityProviderActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/UpdateIdentityProviderActionIT.java index afd973ef4b2..125339b82ba 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/UpdateIdentityProviderActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/UpdateIdentityProviderActionIT.java @@ -59,7 +59,7 @@ public class UpdateIdentityProviderActionIT { .addIdentityProvider(new TestIdentityProvider().setName("Github").setKey("github").setEnabled(true)); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); @Rule public UserSessionRule userSession = UserSessionRule.standalone().logIn().setSystemAdministrator(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/UpdateLoginActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/UpdateLoginActionIT.java index 9874b303854..ef372d567d0 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/UpdateLoginActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/UpdateLoginActionIT.java @@ -52,7 +52,7 @@ public class UpdateLoginActionIT { private final System2 system2 = new System2(); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); @Rule public UserSessionRule userSession = UserSessionRule.standalone().logIn().setSystemAdministrator(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/UserAnonymizerIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/UserAnonymizerIT.java index d54826d578a..e10daea53a4 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/UserAnonymizerIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/user/ws/UserAnonymizerIT.java @@ -34,7 +34,7 @@ import static org.assertj.core.api.Assertions.assertThat; public class UserAnonymizerIT { private final System2 system2 = new AlwaysIncreasingSystem2(); @Rule - public DbTester db = DbTester.create(system2, true); + public DbTester db = DbTester.create(system2); private final UserAnonymizer userAnonymizer = new UserAnonymizer(db.getDbClient()); @Test diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/usergroups/ws/CreateActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/usergroups/ws/CreateActionIT.java index b440e2a158b..42043b7af36 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/usergroups/ws/CreateActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/usergroups/ws/CreateActionIT.java @@ -45,7 +45,7 @@ import static org.sonar.db.permission.GlobalPermission.ADMINISTER; public class CreateActionIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); private ManagedInstanceChecker managedInstanceChecker = mock(ManagedInstanceChecker.class); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/usergroups/ws/DeleteActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/usergroups/ws/DeleteActionIT.java index 8a65fe1d359..cba6d341edb 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/usergroups/ws/DeleteActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/usergroups/ws/DeleteActionIT.java @@ -30,7 +30,6 @@ import org.sonar.api.web.UserRole; import org.sonar.core.util.UuidFactoryImpl; import org.sonar.db.DbSession; import org.sonar.db.DbTester; -import org.sonar.db.component.ComponentDbTester; import org.sonar.db.component.ComponentDto; import org.sonar.db.permission.template.PermissionTemplateDto; import org.sonar.db.permission.template.PermissionTemplateTesting; diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/usergroups/ws/ExternalGroupServiceIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/usergroups/ws/ExternalGroupServiceIT.java index 5d039607ba4..a355dbfd164 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/usergroups/ws/ExternalGroupServiceIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/usergroups/ws/ExternalGroupServiceIT.java @@ -39,7 +39,7 @@ public class ExternalGroupServiceIT { private static final String EXTERNAL_IDENTITY_PROVIDER = "EXTERNAL_IDENTITY_PROVIDER"; @Rule - public DbTester dbTester = DbTester.create(System2.INSTANCE, true); + public DbTester dbTester = DbTester.create(System2.INSTANCE); private final DbClient dbClient = dbTester.getDbClient(); private final DbSession dbSession = dbTester.getSession(); private final GroupService groupService = new GroupService(dbClient, UuidFactoryFast.getInstance()); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/usergroups/ws/SearchActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/usergroups/ws/SearchActionIT.java index afd4f683982..c8951c475cb 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/usergroups/ws/SearchActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/usergroups/ws/SearchActionIT.java @@ -65,7 +65,7 @@ import static org.sonarqube.ws.UserGroups.SearchWsResponse; public class SearchActionIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/usergroups/ws/UpdateActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/usergroups/ws/UpdateActionIT.java index 6b72a31fb3c..c065b8e5300 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/usergroups/ws/UpdateActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/usergroups/ws/UpdateActionIT.java @@ -50,7 +50,7 @@ import static org.sonar.test.JsonAssert.assertJson; public class UpdateActionIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/usergroups/ws/UsersActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/usergroups/ws/UsersActionIT.java index ac1645f2718..3888e144b20 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/usergroups/ws/UsersActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/usergroups/ws/UsersActionIT.java @@ -54,7 +54,7 @@ import static org.sonar.test.JsonAssert.assertJson; public class UsersActionIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/usertoken/ws/GenerateActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/usertoken/ws/GenerateActionIT.java index 70f73fad6b4..57884a31df3 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/usertoken/ws/GenerateActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/usertoken/ws/GenerateActionIT.java @@ -81,7 +81,7 @@ public class GenerateActionIT { private static final String TOKEN_NAME = "Third Party Application"; @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/usertoken/ws/RevokeActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/usertoken/ws/RevokeActionIT.java index b01d3ebf449..c819e7bcf55 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/usertoken/ws/RevokeActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/usertoken/ws/RevokeActionIT.java @@ -44,7 +44,7 @@ import static org.sonar.server.usertoken.ws.UserTokenSupport.PARAM_NAME; public class RevokeActionIT { @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); @Rule public UserSessionRule userSession = UserSessionRule.standalone(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/usertoken/ws/SearchActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/usertoken/ws/SearchActionIT.java index 2ce697bce68..2d55976dd08 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/usertoken/ws/SearchActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/usertoken/ws/SearchActionIT.java @@ -26,7 +26,6 @@ import org.sonar.api.server.ws.WebService; import org.sonar.api.utils.System2; import org.sonar.db.DbClient; import org.sonar.db.DbTester; -import org.sonar.db.component.ComponentDto; import org.sonar.db.project.ProjectDto; import org.sonar.db.user.UserDto; import org.sonar.db.user.UserTokenDto; @@ -51,7 +50,7 @@ public class SearchActionIT { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private DbClient dbClient = db.getDbClient(); private WsActionTester ws = new WsActionTester(new SearchAction(dbClient, new UserTokenSupport(db.getDbClient(), userSession))); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/webhook/ws/CreateActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/webhook/ws/CreateActionIT.java index c66e27ec981..2dbf79402a1 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/webhook/ws/CreateActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/webhook/ws/CreateActionIT.java @@ -62,7 +62,7 @@ public class CreateActionIT { public UserSessionRule userSession = standalone(); @Rule - public DbTester db = create(true); + public DbTester db = create(); private final DbClient dbClient = db.getDbClient(); private final WebhookDbTester webhookDbTester = db.webhooks(); private final ComponentDbTester componentDbTester = db.components(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/webhook/ws/DeleteActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/webhook/ws/DeleteActionIT.java index 0f0172c6575..48de6658adb 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/webhook/ws/DeleteActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/webhook/ws/DeleteActionIT.java @@ -59,7 +59,7 @@ public class DeleteActionIT { public UserSessionRule userSession = standalone(); @Rule - public DbTester db = create(true); + public DbTester db = create(); private final DbClient dbClient = db.getDbClient(); private final DbSession dbSession = db.getSession(); private final WebhookDbTester webhookDbTester = db.webhooks(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/webhook/ws/ListActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/webhook/ws/ListActionIT.java index 637538187eb..1d00b408567 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/webhook/ws/ListActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/webhook/ws/ListActionIT.java @@ -66,7 +66,7 @@ public class ListActionIT { public UserSessionRule userSession = standalone(); @Rule - public DbTester db = create(true); + public DbTester db = create(); private final DbClient dbClient = db.getDbClient(); private final Configuration configuration = mock(Configuration.class); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/webhook/ws/UpdateActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/webhook/ws/UpdateActionIT.java index 49c7176841c..ef84925ecda 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/webhook/ws/UpdateActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/webhook/ws/UpdateActionIT.java @@ -58,7 +58,7 @@ public class UpdateActionIT { public UserSessionRule userSession = standalone(); @Rule - public DbTester db = create(true); + public DbTester db = create(); private final DbClient dbClient = db.getDbClient(); private final WebhookDbTester webhookDbTester = db.webhooks(); private final ComponentDbTester componentDbTester = db.components(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/webhook/ws/WebhookDeliveriesActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/webhook/ws/WebhookDeliveriesActionIT.java index aeb4c395d5e..adfca843df3 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/webhook/ws/WebhookDeliveriesActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/webhook/ws/WebhookDeliveriesActionIT.java @@ -51,7 +51,7 @@ public class WebhookDeliveriesActionIT { public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private DbClient dbClient = db.getDbClient(); private WebhookDeliveryDbTester webhookDeliveryDbTester = db.webhookDelivery(); diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/webhook/ws/WebhookDeliveryActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/webhook/ws/WebhookDeliveryActionIT.java index b12e175b40e..11be2a86c96 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/webhook/ws/WebhookDeliveryActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/webhook/ws/WebhookDeliveryActionIT.java @@ -49,7 +49,7 @@ public class WebhookDeliveryActionIT { public UserSessionRule userSession = UserSessionRule.standalone(); @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private DbClient dbClient = db.getDbClient(); private WsActionTester ws; diff --git a/server/sonar-webserver-webapi/src/test/java/org/sonar/server/ce/ws/TaskFormatterTest.java b/server/sonar-webserver-webapi/src/test/java/org/sonar/server/ce/ws/TaskFormatterTest.java index 98acd6d07b7..ed2da8ed38b 100644 --- a/server/sonar-webserver-webapi/src/test/java/org/sonar/server/ce/ws/TaskFormatterTest.java +++ b/server/sonar-webserver-webapi/src/test/java/org/sonar/server/ce/ws/TaskFormatterTest.java @@ -52,7 +52,7 @@ public class TaskFormatterTest { private static final int WARNING_COUNT = 5; @Rule - public DbTester db = DbTester.create(System2.INSTANCE, true); + public DbTester db = DbTester.create(System2.INSTANCE); private final System2 system2 = mock(System2.class); private final TaskFormatter underTest = new TaskFormatter(db.getDbClient(), system2); diff --git a/server/sonar-webserver-webapi/src/test/java/org/sonar/server/issue/ws/SearchResponseFormatFormatOperationTest.java b/server/sonar-webserver-webapi/src/test/java/org/sonar/server/issue/ws/SearchResponseFormatFormatOperationTest.java index 2656f772d0b..cebac2d567c 100644 --- a/server/sonar-webserver-webapi/src/test/java/org/sonar/server/issue/ws/SearchResponseFormatFormatOperationTest.java +++ b/server/sonar-webserver-webapi/src/test/java/org/sonar/server/issue/ws/SearchResponseFormatFormatOperationTest.java @@ -71,7 +71,7 @@ import static org.sonar.server.issue.index.IssueScope.TEST; @RunWith(MockitoJUnitRunner.class) public class SearchResponseFormatFormatOperationTest { @Rule - public DbTester db = DbTester.create(true); + public DbTester db = DbTester.create(); private final Durations durations = new Durations(); private final Languages languages = mock(Languages.class); private final TextRangeResponseFormatter textRangeResponseFormatter = mock(TextRangeResponseFormatter.class); diff --git a/server/sonar-webserver/src/it/java/org/sonar/server/platform/web/SonarLintConnectionFilterIT.java b/server/sonar-webserver/src/it/java/org/sonar/server/platform/web/SonarLintConnectionFilterIT.java index 8a2c97b4f12..ff14e8d21f2 100644 --- a/server/sonar-webserver/src/it/java/org/sonar/server/platform/web/SonarLintConnectionFilterIT.java +++ b/server/sonar-webserver/src/it/java/org/sonar/server/platform/web/SonarLintConnectionFilterIT.java @@ -45,7 +45,7 @@ public class SonarLintConnectionFilterIT { private final TestSystem2 system2 = new TestSystem2(); @Rule - public DbTester dbTester = DbTester.create(system2, true); + public DbTester dbTester = DbTester.create(system2); @Test public void update() throws IOException { |