aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>2017-02-15 18:18:27 +0100
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>2017-02-17 13:31:49 +0100
commit9824b94f16109305b4847a611379029695823427 (patch)
tree85b339103ce4c56df78e3e26f21117da7fb04976
parent0d3be9943570cf5bfb7fbb72fdfe5a6fcb2798c0 (diff)
downloadsonarqube-9824b94f16109305b4847a611379029695823427.tar.gz
sonarqube-9824b94f16109305b4847a611379029695823427.zip
split sonar-db into server/sonar-db-core and server/sonar-db-dao
-rw-r--r--pom.xml19
-rwxr-xr-xrun-db-unit-tests.sh2
-rw-r--r--server/pom.xml3
-rw-r--r--server/sonar-ce/pom.xml10
-rw-r--r--server/sonar-db-core/pom.xml (renamed from sonar-db/pom.xml)12
-rw-r--r--server/sonar-db-core/src/main/java/org/sonar/core/DatabaseUtils.java (renamed from sonar-db/src/main/java/org/sonar/core/persistence/DatabaseUtils.java)2
-rw-r--r--server/sonar-db-core/src/main/java/org/sonar/core/package-info.java24
-rw-r--r--server/sonar-db-core/src/main/java/org/sonar/db/Database.java (renamed from sonar-db/src/main/java/org/sonar/db/Database.java)0
-rw-r--r--server/sonar-db-core/src/main/java/org/sonar/db/DatabaseChecker.java (renamed from sonar-db/src/main/java/org/sonar/db/DatabaseChecker.java)0
-rw-r--r--server/sonar-db-core/src/main/java/org/sonar/db/DatabaseUtils.java (renamed from sonar-db/src/main/java/org/sonar/db/DatabaseUtils.java)36
-rw-r--r--server/sonar-db-core/src/main/java/org/sonar/db/DdlUtils.java (renamed from sonar-db/src/main/java/org/sonar/db/DdlUtils.java)0
-rw-r--r--server/sonar-db-core/src/main/java/org/sonar/db/DefaultDatabase.java (renamed from sonar-db/src/main/java/org/sonar/db/DefaultDatabase.java)0
-rw-r--r--server/sonar-db-core/src/main/java/org/sonar/db/ResultSetIterator.java (renamed from sonar-db/src/main/java/org/sonar/db/ResultSetIterator.java)0
-rw-r--r--server/sonar-db-core/src/main/java/org/sonar/db/RowNotFoundException.java (renamed from sonar-db/src/main/java/org/sonar/db/RowNotFoundException.java)0
-rw-r--r--server/sonar-db-core/src/main/java/org/sonar/db/dialect/AbstractDialect.java (renamed from sonar-db/src/main/java/org/sonar/db/dialect/AbstractDialect.java)0
-rw-r--r--server/sonar-db-core/src/main/java/org/sonar/db/dialect/Dialect.java (renamed from sonar-db/src/main/java/org/sonar/db/dialect/Dialect.java)0
-rw-r--r--server/sonar-db-core/src/main/java/org/sonar/db/dialect/DialectUtils.java (renamed from sonar-db/src/main/java/org/sonar/db/dialect/DialectUtils.java)0
-rw-r--r--server/sonar-db-core/src/main/java/org/sonar/db/dialect/H2.java (renamed from sonar-db/src/main/java/org/sonar/db/dialect/H2.java)0
-rw-r--r--server/sonar-db-core/src/main/java/org/sonar/db/dialect/MsSql.java (renamed from sonar-db/src/main/java/org/sonar/db/dialect/MsSql.java)0
-rw-r--r--server/sonar-db-core/src/main/java/org/sonar/db/dialect/MySql.java (renamed from sonar-db/src/main/java/org/sonar/db/dialect/MySql.java)0
-rw-r--r--server/sonar-db-core/src/main/java/org/sonar/db/dialect/Oracle.java (renamed from sonar-db/src/main/java/org/sonar/db/dialect/Oracle.java)0
-rw-r--r--server/sonar-db-core/src/main/java/org/sonar/db/dialect/PostgreSql.java (renamed from sonar-db/src/main/java/org/sonar/db/dialect/PostgreSql.java)0
-rw-r--r--server/sonar-db-core/src/main/java/org/sonar/db/dialect/package-info.java (renamed from sonar-db/src/main/java/org/sonar/db/dialect/package-info.java)0
-rw-r--r--server/sonar-db-core/src/main/java/org/sonar/db/package-info.java (renamed from sonar-db/src/main/java/org/sonar/db/package-info.java)0
-rw-r--r--server/sonar-db-core/src/main/java/org/sonar/db/profiling/ConnectionInterceptor.java (renamed from sonar-db/src/main/java/org/sonar/db/profiling/ConnectionInterceptor.java)0
-rw-r--r--server/sonar-db-core/src/main/java/org/sonar/db/profiling/InvocationUtils.java (renamed from sonar-db/src/main/java/org/sonar/db/profiling/InvocationUtils.java)0
-rw-r--r--server/sonar-db-core/src/main/java/org/sonar/db/profiling/NullConnectionInterceptor.java (renamed from sonar-db/src/main/java/org/sonar/db/profiling/NullConnectionInterceptor.java)0
-rw-r--r--server/sonar-db-core/src/main/java/org/sonar/db/profiling/ProfiledConnectionInterceptor.java (renamed from sonar-db/src/main/java/org/sonar/db/profiling/ProfiledConnectionInterceptor.java)0
-rw-r--r--server/sonar-db-core/src/main/java/org/sonar/db/profiling/ProfiledDataSource.java (renamed from sonar-db/src/main/java/org/sonar/db/profiling/ProfiledDataSource.java)0
-rw-r--r--server/sonar-db-core/src/main/java/org/sonar/db/profiling/ProfilingConnectionHandler.java (renamed from sonar-db/src/main/java/org/sonar/db/profiling/ProfilingConnectionHandler.java)0
-rw-r--r--server/sonar-db-core/src/main/java/org/sonar/db/profiling/ProfilingPreparedStatementHandler.java (renamed from sonar-db/src/main/java/org/sonar/db/profiling/ProfilingPreparedStatementHandler.java)0
-rw-r--r--server/sonar-db-core/src/main/java/org/sonar/db/profiling/ProfilingStatementHandler.java (renamed from sonar-db/src/main/java/org/sonar/db/profiling/ProfilingStatementHandler.java)0
-rw-r--r--server/sonar-db-core/src/main/java/org/sonar/db/profiling/SqlLogFormatter.java (renamed from sonar-db/src/main/java/org/sonar/db/profiling/SqlLogFormatter.java)0
-rw-r--r--server/sonar-db-core/src/main/java/org/sonar/db/profiling/package-info.java (renamed from sonar-db/src/main/java/org/sonar/db/profiling/package-info.java)0
-rw-r--r--server/sonar-db-core/src/main/java/org/sonar/db/semaphore/SemaphoresImpl.java (renamed from sonar-db/src/main/java/org/sonar/db/semaphore/SemaphoresImpl.java)0
-rw-r--r--server/sonar-db-core/src/main/java/org/sonar/db/semaphore/package-info.java (renamed from sonar-db/src/main/java/org/sonar/db/semaphore/package-info.java)0
-rw-r--r--server/sonar-db-core/src/main/java/org/sonar/db/version/SqTables.java (renamed from sonar-db/src/main/java/org/sonar/db/version/SqTables.java)0
-rw-r--r--server/sonar-db-core/src/main/java/org/sonar/db/version/package-info.java (renamed from sonar-db/src/main/java/org/sonar/db/version/package-info.java)0
-rw-r--r--server/sonar-db-core/src/main/resources/org/sonar/db/version/rows-h2.sql (renamed from sonar-db/src/main/resources/org/sonar/db/version/rows-h2.sql)0
-rw-r--r--server/sonar-db-core/src/main/resources/org/sonar/db/version/schema-h2.ddl (renamed from sonar-db/src/main/resources/org/sonar/db/version/schema-h2.ddl)0
-rw-r--r--server/sonar-db-core/src/main/resources/org/sonar/db/version/schema_migrations-h2.ddl (renamed from sonar-db/src/main/resources/org/sonar/db/version/schema_migrations-h2.ddl)0
-rw-r--r--server/sonar-db-core/src/test/java/org/sonar/db/AbstractDbTester.java (renamed from sonar-db/src/test/java/org/sonar/db/DbTester.java)347
-rw-r--r--server/sonar-db-core/src/test/java/org/sonar/db/CoreDbTester.java57
-rw-r--r--server/sonar-db-core/src/test/java/org/sonar/db/CoreTestDb.java (renamed from sonar-db/src/test/java/org/sonar/db/TestDb.java)36
-rw-r--r--server/sonar-db-core/src/test/java/org/sonar/db/DatabaseCheckerTest.java (renamed from sonar-db/src/test/java/org/sonar/db/DatabaseCheckerTest.java)0
-rw-r--r--server/sonar-db-core/src/test/java/org/sonar/db/DatabaseCommands.java (renamed from sonar-db/src/test/java/org/sonar/db/DatabaseCommands.java)0
-rw-r--r--server/sonar-db-core/src/test/java/org/sonar/db/DatabaseUtilsTest.java (renamed from sonar-db/src/test/java/org/sonar/db/DatabaseUtilsTest.java)17
-rw-r--r--server/sonar-db-core/src/test/java/org/sonar/db/DdlUtilsTest.java (renamed from sonar-db/src/test/java/org/sonar/db/DdlUtilsTest.java)0
-rw-r--r--server/sonar-db-core/src/test/java/org/sonar/db/DefaultDatabaseTest.java (renamed from sonar-db/src/test/java/org/sonar/db/DefaultDatabaseTest.java)0
-rw-r--r--server/sonar-db-core/src/test/java/org/sonar/db/H2Database.java (renamed from sonar-db/src/test/java/org/sonar/db/H2Database.java)0
-rw-r--r--server/sonar-db-core/src/test/java/org/sonar/db/H2DatabaseTest.java (renamed from sonar-db/src/test/java/org/sonar/db/H2DatabaseTest.java)0
-rw-r--r--server/sonar-db-core/src/test/java/org/sonar/db/ResultSetIteratorTest.java (renamed from sonar-db/src/test/java/org/sonar/db/ResultSetIteratorTest.java)2
-rw-r--r--server/sonar-db-core/src/test/java/org/sonar/db/dialect/DialectUtilsTest.java (renamed from sonar-db/src/test/java/org/sonar/db/dialect/DialectUtilsTest.java)0
-rw-r--r--server/sonar-db-core/src/test/java/org/sonar/db/dialect/H2Test.java (renamed from sonar-db/src/test/java/org/sonar/db/dialect/H2Test.java)0
-rw-r--r--server/sonar-db-core/src/test/java/org/sonar/db/dialect/MsSqlTest.java (renamed from sonar-db/src/test/java/org/sonar/db/dialect/MsSqlTest.java)0
-rw-r--r--server/sonar-db-core/src/test/java/org/sonar/db/dialect/MySqlTest.java (renamed from sonar-db/src/test/java/org/sonar/db/dialect/MySqlTest.java)0
-rw-r--r--server/sonar-db-core/src/test/java/org/sonar/db/dialect/OracleTest.java (renamed from sonar-db/src/test/java/org/sonar/db/dialect/OracleTest.java)0
-rw-r--r--server/sonar-db-core/src/test/java/org/sonar/db/dialect/PostgreSqlTest.java (renamed from sonar-db/src/test/java/org/sonar/db/dialect/PostgreSqlTest.java)0
-rw-r--r--server/sonar-db-core/src/test/java/org/sonar/db/profiling/InvocationUtilsTest.java (renamed from sonar-db/src/test/java/org/sonar/db/profiling/InvocationUtilsTest.java)0
-rw-r--r--server/sonar-db-core/src/test/java/org/sonar/db/profiling/ProfiledDataSourceTest.java (renamed from sonar-db/src/test/java/org/sonar/db/profiling/ProfiledDataSourceTest.java)0
-rw-r--r--server/sonar-db-core/src/test/java/org/sonar/db/profiling/SqlLogFormatterTest.java (renamed from sonar-db/src/test/java/org/sonar/db/profiling/SqlLogFormatterTest.java)0
-rw-r--r--server/sonar-db-core/src/test/java/org/sonar/db/semaphore/SemaphoresImplTest.java (renamed from sonar-db/src/test/java/org/sonar/db/semaphore/SemaphoresImplTest.java)0
-rw-r--r--server/sonar-db-core/src/test/resources/logback-test.xml (renamed from sonar-db/src/test/resources/logback-test.xml)0
-rw-r--r--server/sonar-db-core/src/test/resources/org/sonar/db/CoreDbTester/empty.sql0
-rw-r--r--server/sonar-db-core/src/test/resources/org/sonar/db/DatabaseUtilsTest/just_one_table.sql3
-rw-r--r--server/sonar-db-core/src/test/resources/org/sonar/db/ResultSetIteratorTest/feed.xml (renamed from sonar-db/src/test/resources/org/sonar/db/ResultSetIteratorTest/feed.xml)0
-rw-r--r--server/sonar-db-core/src/test/resources/org/sonar/db/ResultSetIteratorTest/schema.sql (renamed from sonar-db/src/test/resources/org/sonar/db/ResultSetIteratorTest/schema.sql)0
-rw-r--r--server/sonar-db-dao/pom.xml86
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/core/permission/GlobalPermissions.java (renamed from sonar-db/src/main/java/org/sonar/core/permission/GlobalPermissions.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/core/permission/ProjectPermissions.java (renamed from sonar-db/src/main/java/org/sonar/core/permission/ProjectPermissions.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/core/permission/package-info.java (renamed from sonar-db/src/main/java/org/sonar/core/permission/package-info.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/core/persistence/MyBatis.java (renamed from sonar-db/src/main/java/org/sonar/core/persistence/MyBatis.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/core/persistence/package-info.java (renamed from sonar-db/src/main/java/org/sonar/core/persistence/package-info.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/core/properties/PropertiesDao.java (renamed from sonar-db/src/main/java/org/sonar/core/properties/PropertiesDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/core/properties/PropertyDto.java (renamed from sonar-db/src/main/java/org/sonar/core/properties/PropertyDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/core/properties/package-info.java (renamed from sonar-db/src/main/java/org/sonar/core/properties/package-info.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/BatchSession.java (renamed from sonar-db/src/main/java/org/sonar/db/BatchSession.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/Dao.java (renamed from sonar-db/src/main/java/org/sonar/db/Dao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/DaoDatabaseUtils.java59
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/DaoModule.java (renamed from sonar-db/src/main/java/org/sonar/db/DaoModule.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/DbClient.java (renamed from sonar-db/src/main/java/org/sonar/db/DbClient.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/DbSession.java (renamed from sonar-db/src/main/java/org/sonar/db/DbSession.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/Dto.java (renamed from sonar-db/src/main/java/org/sonar/db/Dto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/IsAliveMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/IsAliveMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/MyBatis.java (renamed from sonar-db/src/main/java/org/sonar/db/MyBatis.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/MyBatisConfBuilder.java (renamed from sonar-db/src/main/java/org/sonar/db/MyBatisConfBuilder.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/SQXMLMapperBuilder.java (renamed from sonar-db/src/main/java/org/sonar/db/SQXMLMapperBuilder.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/WildcardPosition.java (renamed from sonar-db/src/main/java/org/sonar/db/WildcardPosition.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/ce/CeActivityDao.java (renamed from sonar-db/src/main/java/org/sonar/db/ce/CeActivityDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/ce/CeActivityDto.java (renamed from sonar-db/src/main/java/org/sonar/db/ce/CeActivityDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/ce/CeActivityMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/ce/CeActivityMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/ce/CeQueueDao.java (renamed from sonar-db/src/main/java/org/sonar/db/ce/CeQueueDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/ce/CeQueueDto.java (renamed from sonar-db/src/main/java/org/sonar/db/ce/CeQueueDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/ce/CeQueueMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/ce/CeQueueMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/ce/CeScannerContextDao.java (renamed from sonar-db/src/main/java/org/sonar/db/ce/CeScannerContextDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/ce/CeScannerContextMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/ce/CeScannerContextMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/ce/CeTaskInputDao.java (renamed from sonar-db/src/main/java/org/sonar/db/ce/CeTaskInputDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/ce/CeTaskInputMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/ce/CeTaskInputMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/ce/CeTaskQuery.java (renamed from sonar-db/src/main/java/org/sonar/db/ce/CeTaskQuery.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/ce/CeTaskTypes.java (renamed from sonar-db/src/main/java/org/sonar/db/ce/CeTaskTypes.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/ce/LogsIteratorInputStream.java (renamed from sonar-db/src/main/java/org/sonar/db/ce/LogsIteratorInputStream.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/ce/package-info.java (renamed from sonar-db/src/main/java/org/sonar/db/ce/package-info.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentDao.java (renamed from sonar-db/src/main/java/org/sonar/db/component/ComponentDao.java)6
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentDto.java (renamed from sonar-db/src/main/java/org/sonar/db/component/ComponentDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentDtoWithSnapshotId.java (renamed from sonar-db/src/main/java/org/sonar/db/component/ComponentDtoWithSnapshotId.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentKeyUpdaterDao.java (renamed from sonar-db/src/main/java/org/sonar/db/component/ComponentKeyUpdaterDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentKeyUpdaterMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/component/ComponentKeyUpdaterMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentLinkDao.java (renamed from sonar-db/src/main/java/org/sonar/db/component/ComponentLinkDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentLinkDto.java (renamed from sonar-db/src/main/java/org/sonar/db/component/ComponentLinkDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentLinkMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/component/ComponentLinkMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/component/ComponentMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentQuery.java (renamed from sonar-db/src/main/java/org/sonar/db/component/ComponentQuery.java)2
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentTreeQuery.java (renamed from sonar-db/src/main/java/org/sonar/db/component/ComponentTreeQuery.java)2
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentUpdateDto.java (renamed from sonar-db/src/main/java/org/sonar/db/component/ComponentUpdateDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentValidator.java (renamed from sonar-db/src/main/java/org/sonar/db/component/ComponentValidator.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/component/FilePathWithHashDto.java (renamed from sonar-db/src/main/java/org/sonar/db/component/FilePathWithHashDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/component/ResourceDao.java (renamed from sonar-db/src/main/java/org/sonar/db/component/ResourceDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/component/ResourceDto.java (renamed from sonar-db/src/main/java/org/sonar/db/component/ResourceDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/component/ResourceMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/component/ResourceMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/component/SnapshotDao.java (renamed from sonar-db/src/main/java/org/sonar/db/component/SnapshotDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/component/SnapshotDto.java (renamed from sonar-db/src/main/java/org/sonar/db/component/SnapshotDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/component/SnapshotMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/component/SnapshotMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/component/SnapshotQuery.java (renamed from sonar-db/src/main/java/org/sonar/db/component/SnapshotQuery.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/component/UuidWithProjectUuidDto.java (renamed from sonar-db/src/main/java/org/sonar/db/component/UuidWithProjectUuidDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/component/ViewsSnapshotDto.java (renamed from sonar-db/src/main/java/org/sonar/db/component/ViewsSnapshotDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/component/package-info.java (renamed from sonar-db/src/main/java/org/sonar/db/component/package-info.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/debt/RequirementMigrationDto.java (renamed from sonar-db/src/main/java/org/sonar/db/debt/RequirementMigrationDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/debt/package-info.java (renamed from sonar-db/src/main/java/org/sonar/db/debt/package-info.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/duplication/DuplicationDao.java (renamed from sonar-db/src/main/java/org/sonar/db/duplication/DuplicationDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/duplication/DuplicationMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/duplication/DuplicationMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/duplication/DuplicationUnitDto.java (renamed from sonar-db/src/main/java/org/sonar/db/duplication/DuplicationUnitDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/duplication/package-info.java (renamed from sonar-db/src/main/java/org/sonar/db/duplication/package-info.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/event/EventDao.java (renamed from sonar-db/src/main/java/org/sonar/db/event/EventDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/event/EventDto.java (renamed from sonar-db/src/main/java/org/sonar/db/event/EventDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/event/EventMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/event/EventMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/event/EventValidator.java (renamed from sonar-db/src/main/java/org/sonar/db/event/EventValidator.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/event/package-info.java (renamed from sonar-db/src/main/java/org/sonar/db/event/package-info.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueChangeDao.java (renamed from sonar-db/src/main/java/org/sonar/db/issue/IssueChangeDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueChangeDto.java (renamed from sonar-db/src/main/java/org/sonar/db/issue/IssueChangeDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueChangeMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/issue/IssueChangeMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueDao.java (renamed from sonar-db/src/main/java/org/sonar/db/issue/IssueDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueDto.java (renamed from sonar-db/src/main/java/org/sonar/db/issue/IssueDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/issue/IssueMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueTesting.java (renamed from sonar-db/src/main/java/org/sonar/db/issue/IssueTesting.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/issue/package-info.java (renamed from sonar-db/src/main/java/org/sonar/db/issue/package-info.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/loadedtemplate/LoadedTemplateDao.java (renamed from sonar-db/src/main/java/org/sonar/db/loadedtemplate/LoadedTemplateDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/loadedtemplate/LoadedTemplateDto.java (renamed from sonar-db/src/main/java/org/sonar/db/loadedtemplate/LoadedTemplateDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/loadedtemplate/LoadedTemplateMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/loadedtemplate/LoadedTemplateMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/loadedtemplate/package-info.java (renamed from sonar-db/src/main/java/org/sonar/db/loadedtemplate/package-info.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/measure/MeasureDao.java (renamed from sonar-db/src/main/java/org/sonar/db/measure/MeasureDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/measure/MeasureDto.java (renamed from sonar-db/src/main/java/org/sonar/db/measure/MeasureDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/measure/MeasureMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/measure/MeasureMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/measure/MeasureQuery.java (renamed from sonar-db/src/main/java/org/sonar/db/measure/MeasureQuery.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/measure/MeasureTreeQuery.java (renamed from sonar-db/src/main/java/org/sonar/db/measure/MeasureTreeQuery.java)2
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/measure/PastMeasureDto.java (renamed from sonar-db/src/main/java/org/sonar/db/measure/PastMeasureDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/measure/PastMeasureQuery.java (renamed from sonar-db/src/main/java/org/sonar/db/measure/PastMeasureQuery.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/measure/ProjectMeasuresIndexerIterator.java (renamed from sonar-db/src/main/java/org/sonar/db/measure/ProjectMeasuresIndexerIterator.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/measure/custom/CustomMeasureDao.java (renamed from sonar-db/src/main/java/org/sonar/db/measure/custom/CustomMeasureDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/measure/custom/CustomMeasureDto.java (renamed from sonar-db/src/main/java/org/sonar/db/measure/custom/CustomMeasureDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/measure/custom/CustomMeasureMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/measure/custom/CustomMeasureMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/measure/custom/package-info.java (renamed from sonar-db/src/main/java/org/sonar/db/measure/custom/package-info.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/measure/package-info.java (renamed from sonar-db/src/main/java/org/sonar/db/measure/package-info.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/metric/MetricDao.java (renamed from sonar-db/src/main/java/org/sonar/db/metric/MetricDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/metric/MetricDto.java (renamed from sonar-db/src/main/java/org/sonar/db/metric/MetricDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/metric/MetricDtoFunctions.java (renamed from sonar-db/src/main/java/org/sonar/db/metric/MetricDtoFunctions.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/metric/MetricMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/metric/MetricMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/metric/package-info.java (renamed from sonar-db/src/main/java/org/sonar/db/metric/package-info.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/notification/NotificationQueueDao.java (renamed from sonar-db/src/main/java/org/sonar/db/notification/NotificationQueueDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/notification/NotificationQueueDto.java (renamed from sonar-db/src/main/java/org/sonar/db/notification/NotificationQueueDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/notification/NotificationQueueMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/notification/NotificationQueueMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/notification/package-info.java (renamed from sonar-db/src/main/java/org/sonar/db/notification/package-info.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/organization/DefaultTemplates.java (renamed from sonar-db/src/main/java/org/sonar/db/organization/DefaultTemplates.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/organization/OrganizationDao.java (renamed from sonar-db/src/main/java/org/sonar/db/organization/OrganizationDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/organization/OrganizationDto.java (renamed from sonar-db/src/main/java/org/sonar/db/organization/OrganizationDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/organization/OrganizationMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/organization/OrganizationMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/organization/OrganizationQuery.java (renamed from sonar-db/src/main/java/org/sonar/db/organization/OrganizationQuery.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/organization/package-info.java (renamed from sonar-db/src/main/java/org/sonar/db/organization/package-info.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/permission/AuthorizationDao.java (renamed from sonar-db/src/main/java/org/sonar/db/permission/AuthorizationDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/permission/AuthorizationMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/permission/AuthorizationMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/permission/CountPerProjectPermission.java (renamed from sonar-db/src/main/java/org/sonar/db/permission/CountPerProjectPermission.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/permission/GroupPermissionDao.java (renamed from sonar-db/src/main/java/org/sonar/db/permission/GroupPermissionDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/permission/GroupPermissionDto.java (renamed from sonar-db/src/main/java/org/sonar/db/permission/GroupPermissionDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/permission/GroupPermissionMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/permission/GroupPermissionMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/permission/PermissionQuery.java (renamed from sonar-db/src/main/java/org/sonar/db/permission/PermissionQuery.java)2
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/permission/UserPermissionDao.java (renamed from sonar-db/src/main/java/org/sonar/db/permission/UserPermissionDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/permission/UserPermissionDto.java (renamed from sonar-db/src/main/java/org/sonar/db/permission/UserPermissionDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/permission/UserPermissionMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/permission/UserPermissionMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/permission/package-info.java (renamed from sonar-db/src/main/java/org/sonar/db/permission/package-info.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/permission/template/CountByTemplateAndPermissionDto.java (renamed from sonar-db/src/main/java/org/sonar/db/permission/template/CountByTemplateAndPermissionDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/permission/template/PermissionTemplateCharacteristicDao.java (renamed from sonar-db/src/main/java/org/sonar/db/permission/template/PermissionTemplateCharacteristicDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/permission/template/PermissionTemplateCharacteristicDto.java (renamed from sonar-db/src/main/java/org/sonar/db/permission/template/PermissionTemplateCharacteristicDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/permission/template/PermissionTemplateCharacteristicMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/permission/template/PermissionTemplateCharacteristicMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/permission/template/PermissionTemplateDao.java (renamed from sonar-db/src/main/java/org/sonar/db/permission/template/PermissionTemplateDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/permission/template/PermissionTemplateDto.java (renamed from sonar-db/src/main/java/org/sonar/db/permission/template/PermissionTemplateDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/permission/template/PermissionTemplateGroupDto.java (renamed from sonar-db/src/main/java/org/sonar/db/permission/template/PermissionTemplateGroupDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/permission/template/PermissionTemplateMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/permission/template/PermissionTemplateMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/permission/template/PermissionTemplateUserDto.java (renamed from sonar-db/src/main/java/org/sonar/db/permission/template/PermissionTemplateUserDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/permission/template/package-info.java (renamed from sonar-db/src/main/java/org/sonar/db/permission/template/package-info.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/property/InternalPropertiesDao.java (renamed from sonar-db/src/main/java/org/sonar/db/property/InternalPropertiesDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/property/InternalPropertiesMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/property/InternalPropertiesMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/property/InternalPropertyDto.java (renamed from sonar-db/src/main/java/org/sonar/db/property/InternalPropertyDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/property/PropertiesDao.java (renamed from sonar-db/src/main/java/org/sonar/db/property/PropertiesDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/property/PropertiesMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/property/PropertiesMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/property/PropertyDto.java (renamed from sonar-db/src/main/java/org/sonar/db/property/PropertyDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/property/PropertyQuery.java (renamed from sonar-db/src/main/java/org/sonar/db/property/PropertyQuery.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/property/PropertyTesting.java (renamed from sonar-db/src/main/java/org/sonar/db/property/PropertyTesting.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/property/ScrapPropertyDto.java (renamed from sonar-db/src/main/java/org/sonar/db/property/ScrapPropertyDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/property/package-info.java (renamed from sonar-db/src/main/java/org/sonar/db/property/package-info.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/purge/IdUuidPair.java (renamed from sonar-db/src/main/java/org/sonar/db/purge/IdUuidPair.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/purge/IdUuidPairs.java (renamed from sonar-db/src/main/java/org/sonar/db/purge/IdUuidPairs.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/purge/PurgeCommands.java (renamed from sonar-db/src/main/java/org/sonar/db/purge/PurgeCommands.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/purge/PurgeConfiguration.java (renamed from sonar-db/src/main/java/org/sonar/db/purge/PurgeConfiguration.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/purge/PurgeDao.java (renamed from sonar-db/src/main/java/org/sonar/db/purge/PurgeDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/purge/PurgeListener.java (renamed from sonar-db/src/main/java/org/sonar/db/purge/PurgeListener.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/purge/PurgeMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/purge/PurgeMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/purge/PurgeProfiler.java (renamed from sonar-db/src/main/java/org/sonar/db/purge/PurgeProfiler.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/purge/PurgeSnapshotQuery.java (renamed from sonar-db/src/main/java/org/sonar/db/purge/PurgeSnapshotQuery.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/purge/PurgeableAnalysisDto.java (renamed from sonar-db/src/main/java/org/sonar/db/purge/PurgeableAnalysisDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/purge/package-info.java (renamed from sonar-db/src/main/java/org/sonar/db/purge/package-info.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/purge/period/DefaultPeriodCleaner.java (renamed from sonar-db/src/main/java/org/sonar/db/purge/period/DefaultPeriodCleaner.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/purge/period/DeleteAllFilter.java (renamed from sonar-db/src/main/java/org/sonar/db/purge/period/DeleteAllFilter.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/purge/period/Filter.java (renamed from sonar-db/src/main/java/org/sonar/db/purge/period/Filter.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/purge/period/Filters.java (renamed from sonar-db/src/main/java/org/sonar/db/purge/period/Filters.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/purge/period/Interval.java (renamed from sonar-db/src/main/java/org/sonar/db/purge/period/Interval.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/purge/period/KeepOneFilter.java (renamed from sonar-db/src/main/java/org/sonar/db/purge/period/KeepOneFilter.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/purge/period/package-info.java (renamed from sonar-db/src/main/java/org/sonar/db/purge/period/package-info.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/qualitygate/ProjectQgateAssociation.java (renamed from sonar-db/src/main/java/org/sonar/db/qualitygate/ProjectQgateAssociation.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/qualitygate/ProjectQgateAssociationDao.java (renamed from sonar-db/src/main/java/org/sonar/db/qualitygate/ProjectQgateAssociationDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/qualitygate/ProjectQgateAssociationDto.java (renamed from sonar-db/src/main/java/org/sonar/db/qualitygate/ProjectQgateAssociationDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/qualitygate/ProjectQgateAssociationMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/qualitygate/ProjectQgateAssociationMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/qualitygate/ProjectQgateAssociationQuery.java (renamed from sonar-db/src/main/java/org/sonar/db/qualitygate/ProjectQgateAssociationQuery.java)4
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/qualitygate/QualityGateConditionDao.java (renamed from sonar-db/src/main/java/org/sonar/db/qualitygate/QualityGateConditionDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/qualitygate/QualityGateConditionDto.java (renamed from sonar-db/src/main/java/org/sonar/db/qualitygate/QualityGateConditionDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/qualitygate/QualityGateConditionMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/qualitygate/QualityGateConditionMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/qualitygate/QualityGateDao.java (renamed from sonar-db/src/main/java/org/sonar/db/qualitygate/QualityGateDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/qualitygate/QualityGateDto.java (renamed from sonar-db/src/main/java/org/sonar/db/qualitygate/QualityGateDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/qualitygate/QualityGateMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/qualitygate/QualityGateMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/qualitygate/package-info.java (renamed from sonar-db/src/main/java/org/sonar/db/qualitygate/package-info.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/ActiveRuleDao.java (renamed from sonar-db/src/main/java/org/sonar/db/qualityprofile/ActiveRuleDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/ActiveRuleDto.java (renamed from sonar-db/src/main/java/org/sonar/db/qualityprofile/ActiveRuleDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/ActiveRuleKey.java (renamed from sonar-db/src/main/java/org/sonar/db/qualityprofile/ActiveRuleKey.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/ActiveRuleMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/qualityprofile/ActiveRuleMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/ActiveRuleParamDto.java (renamed from sonar-db/src/main/java/org/sonar/db/qualityprofile/ActiveRuleParamDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/ProjectQprofileAssociationDto.java (renamed from sonar-db/src/main/java/org/sonar/db/qualityprofile/ProjectQprofileAssociationDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/QProfileChangeDao.java (renamed from sonar-db/src/main/java/org/sonar/db/qualityprofile/QProfileChangeDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/QProfileChangeDto.java (renamed from sonar-db/src/main/java/org/sonar/db/qualityprofile/QProfileChangeDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/QProfileChangeMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/qualityprofile/QProfileChangeMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/QProfileChangeQuery.java (renamed from sonar-db/src/main/java/org/sonar/db/qualityprofile/QProfileChangeQuery.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/QualityProfileDao.java (renamed from sonar-db/src/main/java/org/sonar/db/qualityprofile/QualityProfileDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/QualityProfileDto.java (renamed from sonar-db/src/main/java/org/sonar/db/qualityprofile/QualityProfileDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/QualityProfileMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/qualityprofile/QualityProfileMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/QualityProfileProjectCount.java (renamed from sonar-db/src/main/java/org/sonar/db/qualityprofile/QualityProfileProjectCount.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/package-info.java (renamed from sonar-db/src/main/java/org/sonar/db/qualityprofile/package-info.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/rule/RuleDao.java (renamed from sonar-db/src/main/java/org/sonar/db/rule/RuleDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/rule/RuleDto.java (renamed from sonar-db/src/main/java/org/sonar/db/rule/RuleDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/rule/RuleMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/rule/RuleMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/rule/RuleParamDto.java (renamed from sonar-db/src/main/java/org/sonar/db/rule/RuleParamDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/rule/RuleRepositoryDao.java (renamed from sonar-db/src/main/java/org/sonar/db/rule/RuleRepositoryDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/rule/RuleRepositoryDto.java (renamed from sonar-db/src/main/java/org/sonar/db/rule/RuleRepositoryDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/rule/RuleRepositoryMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/rule/RuleRepositoryMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/rule/SeverityUtil.java (renamed from sonar-db/src/main/java/org/sonar/db/rule/SeverityUtil.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/rule/package-info.java (renamed from sonar-db/src/main/java/org/sonar/db/rule/package-info.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/schemamigration/SchemaMigrationDao.java (renamed from sonar-db/src/main/java/org/sonar/db/schemamigration/SchemaMigrationDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/schemamigration/SchemaMigrationDto.java (renamed from sonar-db/src/main/java/org/sonar/db/schemamigration/SchemaMigrationDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/schemamigration/SchemaMigrationMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/schemamigration/SchemaMigrationMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/schemamigration/package-info.java (renamed from sonar-db/src/main/java/org/sonar/db/schemamigration/package-info.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/source/FileSourceDao.java (renamed from sonar-db/src/main/java/org/sonar/db/source/FileSourceDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/source/FileSourceDto.java (renamed from sonar-db/src/main/java/org/sonar/db/source/FileSourceDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/source/FileSourceMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/source/FileSourceMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/source/package-info.java (renamed from sonar-db/src/main/java/org/sonar/db/source/package-info.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/user/AuthorDao.java (renamed from sonar-db/src/main/java/org/sonar/db/user/AuthorDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/user/AuthorDto.java (renamed from sonar-db/src/main/java/org/sonar/db/user/AuthorDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/user/AuthorMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/user/AuthorMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/user/GroupDao.java (renamed from sonar-db/src/main/java/org/sonar/db/user/GroupDao.java)4
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/user/GroupDto.java (renamed from sonar-db/src/main/java/org/sonar/db/user/GroupDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/user/GroupMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/user/GroupMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/user/GroupMembershipDao.java (renamed from sonar-db/src/main/java/org/sonar/db/user/GroupMembershipDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/user/GroupMembershipDto.java (renamed from sonar-db/src/main/java/org/sonar/db/user/GroupMembershipDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/user/GroupMembershipMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/user/GroupMembershipMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/user/GroupMembershipQuery.java (renamed from sonar-db/src/main/java/org/sonar/db/user/GroupMembershipQuery.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/user/GroupUserCount.java (renamed from sonar-db/src/main/java/org/sonar/db/user/GroupUserCount.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/user/LoginGroup.java (renamed from sonar-db/src/main/java/org/sonar/db/user/LoginGroup.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/user/RoleDao.java (renamed from sonar-db/src/main/java/org/sonar/db/user/RoleDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/user/RoleMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/user/RoleMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/user/UserDao.java (renamed from sonar-db/src/main/java/org/sonar/db/user/UserDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/user/UserDto.java (renamed from sonar-db/src/main/java/org/sonar/db/user/UserDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/user/UserGroupDao.java (renamed from sonar-db/src/main/java/org/sonar/db/user/UserGroupDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/user/UserGroupDto.java (renamed from sonar-db/src/main/java/org/sonar/db/user/UserGroupDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/user/UserGroupMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/user/UserGroupMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/user/UserMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/user/UserMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/user/UserMembershipDto.java (renamed from sonar-db/src/main/java/org/sonar/db/user/UserMembershipDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/user/UserMembershipQuery.java (renamed from sonar-db/src/main/java/org/sonar/db/user/UserMembershipQuery.java)2
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/user/UserTokenCount.java (renamed from sonar-db/src/main/java/org/sonar/db/user/UserTokenCount.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/user/UserTokenDao.java (renamed from sonar-db/src/main/java/org/sonar/db/user/UserTokenDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/user/UserTokenDto.java (renamed from sonar-db/src/main/java/org/sonar/db/user/UserTokenDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/user/UserTokenMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/user/UserTokenMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/user/UserTokenValidator.java (renamed from sonar-db/src/main/java/org/sonar/db/user/UserTokenValidator.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/user/package-info.java (renamed from sonar-db/src/main/java/org/sonar/db/user/package-info.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/webhook/WebhookDeliveryDao.java (renamed from sonar-db/src/main/java/org/sonar/db/webhook/WebhookDeliveryDao.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/webhook/WebhookDeliveryDto.java (renamed from sonar-db/src/main/java/org/sonar/db/webhook/WebhookDeliveryDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/webhook/WebhookDeliveryLiteDto.java (renamed from sonar-db/src/main/java/org/sonar/db/webhook/WebhookDeliveryLiteDto.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/webhook/WebhookDeliveryMapper.java (renamed from sonar-db/src/main/java/org/sonar/db/webhook/WebhookDeliveryMapper.java)0
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/webhook/package-info.java (renamed from sonar-db/src/main/java/org/sonar/db/webhook/package-info.java)0
-rw-r--r--server/sonar-db-dao/src/main/protobuf/db-commons.proto (renamed from sonar-db/src/main/protobuf/db-commons.proto)0
-rw-r--r--server/sonar-db-dao/src/main/protobuf/db-file-sources.proto (renamed from sonar-db/src/main/protobuf/db-file-sources.proto)0
-rw-r--r--server/sonar-db-dao/src/main/protobuf/db-issues.proto (renamed from sonar-db/src/main/protobuf/db-issues.proto)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/IsAliveMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/IsAliveMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/ce/CeActivityMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/ce/CeActivityMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/ce/CeQueueMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/ce/CeQueueMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/ce/CeScannerContextMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/ce/CeScannerContextMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/ce/CeTaskInputMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/ce/CeTaskInputMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/component/ComponentKeyUpdaterMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/component/ComponentKeyUpdaterMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/component/ComponentLinkMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/component/ComponentLinkMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/component/ComponentMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/component/ComponentMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/component/ResourceMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/component/ResourceMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/component/SnapshotMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/component/SnapshotMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/duplication/DuplicationMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/duplication/DuplicationMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/event/EventMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/event/EventMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/issue/IssueChangeMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/issue/IssueChangeMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/issue/IssueMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/issue/IssueMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/loadedtemplate/LoadedTemplateMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/loadedtemplate/LoadedTemplateMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/measure/MeasureMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/measure/MeasureMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/measure/custom/CustomMeasureMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/measure/custom/CustomMeasureMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/metric/MetricMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/metric/MetricMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/notification/NotificationQueueMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/notification/NotificationQueueMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/organization/OrganizationMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/organization/OrganizationMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/permission/AuthorizationMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/permission/AuthorizationMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/permission/GroupPermissionMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/permission/GroupPermissionMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/permission/UserPermissionMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/permission/UserPermissionMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/permission/template/PermissionTemplateCharacteristicMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/permission/template/PermissionTemplateCharacteristicMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/permission/template/PermissionTemplateMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/permission/template/PermissionTemplateMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/property/InternalPropertiesMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/property/InternalPropertiesMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/property/PropertiesMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/property/PropertiesMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/purge/PurgeMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/purge/PurgeMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/qualitygate/ProjectQgateAssociationMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/qualitygate/ProjectQgateAssociationMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/qualitygate/QualityGateConditionMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/qualitygate/QualityGateConditionMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/qualitygate/QualityGateMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/qualitygate/QualityGateMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/qualityprofile/ActiveRuleMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/qualityprofile/ActiveRuleMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/qualityprofile/QProfileChangeMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/qualityprofile/QProfileChangeMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/qualityprofile/QualityProfileMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/qualityprofile/QualityProfileMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/rule/RuleMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/rule/RuleMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/rule/RuleRepositoryMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/rule/RuleRepositoryMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/schemamigration/SchemaMigrationMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/schemamigration/SchemaMigrationMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/source/FileSourceMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/source/FileSourceMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/user/AuthorMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/user/AuthorMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/user/GroupMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/user/GroupMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/user/GroupMembershipMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/user/GroupMembershipMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/user/RoleMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/user/RoleMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/user/UserGroupMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/user/UserGroupMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/user/UserMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/user/UserMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/user/UserTokenMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/user/UserTokenMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/webhook/WebhookDeliveryMapper.xml (renamed from sonar-db/src/main/resources/org/sonar/db/webhook/WebhookDeliveryMapper.xml)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/core/permission/ProjectPermissionsTest.java (renamed from sonar-db/src/test/java/org/sonar/core/permission/ProjectPermissionsTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/BatchSessionTest.java (renamed from sonar-db/src/test/java/org/sonar/db/BatchSessionTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/DaoDatabaseUtilsTest.java43
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/DaoModuleTest.java (renamed from sonar-db/src/test/java/org/sonar/db/DaoModuleTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/DbTester.java299
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/IsAliveMapperTest.java (renamed from sonar-db/src/test/java/org/sonar/db/IsAliveMapperTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/MyBatisTest.java (renamed from sonar-db/src/test/java/org/sonar/db/MyBatisTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/TestDb.java53
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/ce/CeActivityDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/ce/CeActivityDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/ce/CeQueueDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/ce/CeQueueDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/ce/CeQueueTesting.java (renamed from sonar-db/src/test/java/org/sonar/db/ce/CeQueueTesting.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/ce/CeScannerContextDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/ce/CeScannerContextDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/ce/CeTaskInputDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/ce/CeTaskInputDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/ce/CeTaskQueryTest.java (renamed from sonar-db/src/test/java/org/sonar/db/ce/CeTaskQueryTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/ce/LogsIteratorInputStreamTest.java (renamed from sonar-db/src/test/java/org/sonar/db/ce/LogsIteratorInputStreamTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/component/ComponentDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/component/ComponentDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/component/ComponentDaoWithDuplicatedKeysTest.java (renamed from sonar-db/src/test/java/org/sonar/db/component/ComponentDaoWithDuplicatedKeysTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/component/ComponentDbTester.java (renamed from sonar-db/src/test/java/org/sonar/db/component/ComponentDbTester.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/component/ComponentDtoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/component/ComponentDtoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/component/ComponentKeyUpdaterDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/component/ComponentKeyUpdaterDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/component/ComponentLinkDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/component/ComponentLinkDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/component/ComponentLinkDtoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/component/ComponentLinkDtoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/component/ComponentLinkTesting.java (renamed from sonar-db/src/test/java/org/sonar/db/component/ComponentLinkTesting.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/component/ComponentQueryTest.java (renamed from sonar-db/src/test/java/org/sonar/db/component/ComponentQueryTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/component/ComponentTesting.java (renamed from sonar-db/src/test/java/org/sonar/db/component/ComponentTesting.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/component/ComponentTreeQueryTest.java (renamed from sonar-db/src/test/java/org/sonar/db/component/ComponentTreeQueryTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/component/ComponentValidatorTest.java (renamed from sonar-db/src/test/java/org/sonar/db/component/ComponentValidatorTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/component/ResourceDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/component/ResourceDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/component/ResourceTypesRule.java (renamed from sonar-db/src/test/java/org/sonar/db/component/ResourceTypesRule.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/component/SnapshotDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/component/SnapshotDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/component/SnapshotDtoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/component/SnapshotDtoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/component/SnapshotQueryTest.java (renamed from sonar-db/src/test/java/org/sonar/db/component/SnapshotQueryTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/component/SnapshotTesting.java (renamed from sonar-db/src/test/java/org/sonar/db/component/SnapshotTesting.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/duplication/DuplicationDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/duplication/DuplicationDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/event/EventDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/event/EventDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/event/EventDbTester.java (renamed from sonar-db/src/test/java/org/sonar/db/event/EventDbTester.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/event/EventDtoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/event/EventDtoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/event/EventTesting.java (renamed from sonar-db/src/test/java/org/sonar/db/event/EventTesting.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/event/EventValidatorTest.java (renamed from sonar-db/src/test/java/org/sonar/db/event/EventValidatorTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/favorite/FavoriteDbTester.java (renamed from sonar-db/src/test/java/org/sonar/db/favorite/FavoriteDbTester.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/issue/IssueChangeDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/issue/IssueChangeDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/issue/IssueChangeDtoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/issue/IssueChangeDtoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/issue/IssueChangeMapperTest.java (renamed from sonar-db/src/test/java/org/sonar/db/issue/IssueChangeMapperTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/issue/IssueDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/issue/IssueDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/issue/IssueDbTester.java (renamed from sonar-db/src/test/java/org/sonar/db/issue/IssueDbTester.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/issue/IssueDtoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/issue/IssueDtoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/issue/IssueMapperTest.java (renamed from sonar-db/src/test/java/org/sonar/db/issue/IssueMapperTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/loadedtemplate/LoadedTemplateDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/loadedtemplate/LoadedTemplateDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/measure/MeasureDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/measure/MeasureDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/measure/MeasureDtoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/measure/MeasureDtoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/measure/MeasureQueryTest.java (renamed from sonar-db/src/test/java/org/sonar/db/measure/MeasureQueryTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/measure/MeasureTesting.java (renamed from sonar-db/src/test/java/org/sonar/db/measure/MeasureTesting.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/measure/MeasureTreeQueryTest.java (renamed from sonar-db/src/test/java/org/sonar/db/measure/MeasureTreeQueryTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/measure/PastMeasureDtoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/measure/PastMeasureDtoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/measure/ProjectMeasuresIndexerIteratorTest.java (renamed from sonar-db/src/test/java/org/sonar/db/measure/ProjectMeasuresIndexerIteratorTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/measure/custom/CustomMeasureDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/measure/custom/CustomMeasureDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/measure/custom/CustomMeasureTesting.java (renamed from sonar-db/src/test/java/org/sonar/db/measure/custom/CustomMeasureTesting.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/metric/MetricDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/metric/MetricDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/metric/MetricDtoFunctionsTest.java (renamed from sonar-db/src/test/java/org/sonar/db/metric/MetricDtoFunctionsTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/metric/MetricDtoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/metric/MetricDtoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/metric/MetricTesting.java (renamed from sonar-db/src/test/java/org/sonar/db/metric/MetricTesting.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/notification/NotificationDbTester.java (renamed from sonar-db/src/test/java/org/sonar/db/notification/NotificationDbTester.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/notification/NotificationQueueDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/notification/NotificationQueueDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/organization/DefaultTemplatesTest.java (renamed from sonar-db/src/test/java/org/sonar/db/organization/DefaultTemplatesTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/organization/OrganizationDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/organization/OrganizationDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/organization/OrganizationDbTester.java (renamed from sonar-db/src/test/java/org/sonar/db/organization/OrganizationDbTester.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/organization/OrganizationTesting.java (renamed from sonar-db/src/test/java/org/sonar/db/organization/OrganizationTesting.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/permission/AuthorizationDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/permission/AuthorizationDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/permission/GroupPermissionDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/permission/GroupPermissionDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/permission/UserPermissionDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/permission/UserPermissionDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/permission/template/GroupWithPermissionTemplateDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/permission/template/GroupWithPermissionTemplateDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/permission/template/PermissionTemplateCharacteristicDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/permission/template/PermissionTemplateCharacteristicDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/permission/template/PermissionTemplateCharacteristicDtoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/permission/template/PermissionTemplateCharacteristicDtoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/permission/template/PermissionTemplateDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/permission/template/PermissionTemplateDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/permission/template/PermissionTemplateDbTester.java (renamed from sonar-db/src/test/java/org/sonar/db/permission/template/PermissionTemplateDbTester.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/permission/template/PermissionTemplateTesting.java (renamed from sonar-db/src/test/java/org/sonar/db/permission/template/PermissionTemplateTesting.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/permission/template/UserWithPermissionTemplateDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/permission/template/UserWithPermissionTemplateDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/property/InternalPropertiesDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/property/InternalPropertiesDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/property/PropertiesDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/property/PropertiesDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/property/PropertiesRow.java (renamed from sonar-db/src/test/java/org/sonar/db/property/PropertiesRow.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/property/PropertiesRowAssert.java (renamed from sonar-db/src/test/java/org/sonar/db/property/PropertiesRowAssert.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/property/PropertyDbTester.java (renamed from sonar-db/src/test/java/org/sonar/db/property/PropertyDbTester.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/property/PropertyDtoAssert.java (renamed from sonar-db/src/test/java/org/sonar/db/property/PropertyDtoAssert.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/property/PropertyDtoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/property/PropertyDtoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/purge/DbCleanerTestUtils.java (renamed from sonar-db/src/test/java/org/sonar/db/purge/DbCleanerTestUtils.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/purge/IdUuidPairsTest.java (renamed from sonar-db/src/test/java/org/sonar/db/purge/IdUuidPairsTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/purge/PurgeCommandsTest.java (renamed from sonar-db/src/test/java/org/sonar/db/purge/PurgeCommandsTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/purge/PurgeConfigurationTest.java (renamed from sonar-db/src/test/java/org/sonar/db/purge/PurgeConfigurationTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/purge/PurgeDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/purge/PurgeDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/purge/PurgeProfilerTest.java (renamed from sonar-db/src/test/java/org/sonar/db/purge/PurgeProfilerTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/purge/PurgeableAnalysisDtoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/purge/PurgeableAnalysisDtoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/purge/period/DefaultPeriodCleanerTest.java (renamed from sonar-db/src/test/java/org/sonar/db/purge/period/DefaultPeriodCleanerTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/purge/period/DeleteAllFilterTest.java (renamed from sonar-db/src/test/java/org/sonar/db/purge/period/DeleteAllFilterTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/purge/period/IntervalTest.java (renamed from sonar-db/src/test/java/org/sonar/db/purge/period/IntervalTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/purge/period/KeepOneFilterTest.java (renamed from sonar-db/src/test/java/org/sonar/db/purge/period/KeepOneFilterTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/qualitygate/ProjectQgateAssociationDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/qualitygate/ProjectQgateAssociationDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/qualitygate/ProjectQgateAssociationDtoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/qualitygate/ProjectQgateAssociationDtoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/qualitygate/ProjectQgateAssociationQueryTest.java (renamed from sonar-db/src/test/java/org/sonar/db/qualitygate/ProjectQgateAssociationQueryTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/qualitygate/QualityGateConditionDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/qualitygate/QualityGateConditionDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/qualitygate/QualityGateConditionDtoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/qualitygate/QualityGateConditionDtoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/qualitygate/QualityGateDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/qualitygate/QualityGateDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/qualitygate/QualityGateDbTester.java (renamed from sonar-db/src/test/java/org/sonar/db/qualitygate/QualityGateDbTester.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/ActiveRuleDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/qualityprofile/ActiveRuleDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/ActiveRuleKeyTest.java (renamed from sonar-db/src/test/java/org/sonar/db/qualityprofile/ActiveRuleKeyTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/ActiveRuleParamDtoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/qualityprofile/ActiveRuleParamDtoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/QProfileChangeDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/qualityprofile/QProfileChangeDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/QProfileChangeDtoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/qualityprofile/QProfileChangeDtoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/QualityProfileDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/qualityprofile/QualityProfileDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/QualityProfileDbTester.java (renamed from sonar-db/src/test/java/org/sonar/db/qualityprofile/QualityProfileDbTester.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/QualityProfileTesting.java (renamed from sonar-db/src/test/java/org/sonar/db/qualityprofile/QualityProfileTesting.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/rule/RuleDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/rule/RuleDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/rule/RuleDbTester.java (renamed from sonar-db/src/test/java/org/sonar/db/rule/RuleDbTester.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/rule/RuleDtoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/rule/RuleDtoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/rule/RuleRepositoryDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/rule/RuleRepositoryDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/rule/RuleTesting.java (renamed from sonar-db/src/test/java/org/sonar/db/rule/RuleTesting.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/schemamigration/SchemaMigrationDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/schemamigration/SchemaMigrationDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/source/FileSourceDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/source/FileSourceDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/source/FileSourceDtoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/source/FileSourceDtoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/user/AuthorDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/user/AuthorDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/user/GroupDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/user/GroupDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/user/GroupMembershipDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/user/GroupMembershipDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/user/GroupMembershipQueryTest.java (renamed from sonar-db/src/test/java/org/sonar/db/user/GroupMembershipQueryTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/user/GroupTesting.java (renamed from sonar-db/src/test/java/org/sonar/db/user/GroupTesting.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/user/RoleDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/user/RoleDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/user/RootFlagAssertions.java (renamed from sonar-db/src/test/java/org/sonar/db/user/RootFlagAssertions.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/user/UserDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/user/UserDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/user/UserDbTester.java (renamed from sonar-db/src/test/java/org/sonar/db/user/UserDbTester.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/user/UserDtoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/user/UserDtoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/user/UserGroupDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/user/UserGroupDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/user/UserTesting.java (renamed from sonar-db/src/test/java/org/sonar/db/user/UserTesting.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/user/UserTokenDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/user/UserTokenDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/user/UserTokenDtoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/user/UserTokenDtoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/user/UserTokenTesting.java (renamed from sonar-db/src/test/java/org/sonar/db/user/UserTokenTesting.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/webhook/WebhookDbTesting.java (renamed from sonar-db/src/test/java/org/sonar/db/webhook/WebhookDbTesting.java)0
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/webhook/WebhookDeliveryDaoTest.java (renamed from sonar-db/src/test/java/org/sonar/db/webhook/WebhookDeliveryDaoTest.java)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/core/qualitymodel/DefaultModelFinderTest/shared.xml (renamed from sonar-db/src/test/resources/org/sonar/core/qualitymodel/DefaultModelFinderTest/shared.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentDaoTest/delete-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/delete-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentDaoTest/delete.xml (renamed from sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/delete.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentDaoTest/empty.xml (renamed from sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/empty.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentDaoTest/insert-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/insert-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentDaoTest/insert_disabled_component-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/insert_disabled_component-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentDaoTest/multi-modules.xml (renamed from sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/multi-modules.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentDaoTest/selectForIndexing.xml (renamed from sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/selectForIndexing.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentDaoTest/select_module_files_tree.xml (renamed from sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/select_module_files_tree.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentDaoTest/select_provisioned_projects.xml (renamed from sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/select_provisioned_projects.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentDaoTest/shared.xml (renamed from sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/shared.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentDaoTest/shared_views.xml (renamed from sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/shared_views.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentDaoTest/update-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/update-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentDaoTest/update.xml (renamed from sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/update.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentDaoWithDuplicatedKeysTest/schema.sql (renamed from sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoWithDuplicatedKeysTest/schema.sql)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentKeyUpdaterDaoTest/shared.xml (renamed from sonar-db/src/test/resources/org/sonar/db/component/ComponentKeyUpdaterDaoTest/shared.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentKeyUpdaterDaoTest/shouldBulkUpdateKey-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/component/ComponentKeyUpdaterDaoTest/shouldBulkUpdateKey-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentKeyUpdaterDaoTest/shouldBulkUpdateKeyOnOnlyOneSubmodule-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/component/ComponentKeyUpdaterDaoTest/shouldBulkUpdateKeyOnOnlyOneSubmodule-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentKeyUpdaterDaoTest/shouldNotUpdateAllSubmodules-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/component/ComponentKeyUpdaterDaoTest/shouldNotUpdateAllSubmodules-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentKeyUpdaterDaoTest/shouldNotUpdateAllSubmodules.xml (renamed from sonar-db/src/test/resources/org/sonar/db/component/ComponentKeyUpdaterDaoTest/shouldNotUpdateAllSubmodules.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentKeyUpdaterDaoTest/shouldUpdateKey-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/component/ComponentKeyUpdaterDaoTest/shouldUpdateKey-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentLinkDaoTest/delete.xml (renamed from sonar-db/src/test/resources/org/sonar/db/component/ComponentLinkDaoTest/delete.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentLinkDaoTest/empty.xml (renamed from sonar-db/src/test/resources/org/sonar/db/component/ComponentLinkDaoTest/empty.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentLinkDaoTest/insert-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/component/ComponentLinkDaoTest/insert-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentLinkDaoTest/shared.xml (renamed from sonar-db/src/test/resources/org/sonar/db/component/ComponentLinkDaoTest/shared.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentLinkDaoTest/update-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/component/ComponentLinkDaoTest/update-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentLinkDaoTest/update.xml (renamed from sonar-db/src/test/resources/org/sonar/db/component/ComponentLinkDaoTest/update.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/component/ResourceDaoTest/update_authorization_date-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/component/ResourceDaoTest/update_authorization_date-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/component/ResourceDaoTest/update_authorization_date.xml (renamed from sonar-db/src/test/resources/org/sonar/db/component/ResourceDaoTest/update_authorization_date.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/component/SnapshotDaoTest/select_previous_version_snapshots.xml (renamed from sonar-db/src/test/resources/org/sonar/db/component/SnapshotDaoTest/select_previous_version_snapshots.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/component/SnapshotDaoTest/select_snapshots_by_query.xml (renamed from sonar-db/src/test/resources/org/sonar/db/component/SnapshotDaoTest/select_snapshots_by_query.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/component/SnapshotDaoTest/snapshots.xml (renamed from sonar-db/src/test/resources/org/sonar/db/component/SnapshotDaoTest/snapshots.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/duplication/DuplicationDaoTest/insert-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/duplication/DuplicationDaoTest/insert-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/duplication/DuplicationDaoTest/insert.xml (renamed from sonar-db/src/test/resources/org/sonar/db/duplication/DuplicationDaoTest/insert.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/duplication/DuplicationDaoTest/select_candidates.xml (renamed from sonar-db/src/test/resources/org/sonar/db/duplication/DuplicationDaoTest/select_candidates.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/event/EventDaoTest/delete.xml (renamed from sonar-db/src/test/resources/org/sonar/db/event/EventDaoTest/delete.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/event/EventDaoTest/empty.xml (renamed from sonar-db/src/test/resources/org/sonar/db/event/EventDaoTest/empty.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/event/EventDaoTest/insert-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/event/EventDaoTest/insert-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/event/EventDaoTest/shared.xml (renamed from sonar-db/src/test/resources/org/sonar/db/event/EventDaoTest/shared.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/delete-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/delete-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/delete.xml (renamed from sonar-db/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/delete.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/empty.xml (renamed from sonar-db/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/empty.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/insert-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/insert-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/selectChangelogOfNonClosedIssuesByComponent.xml (renamed from sonar-db/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/selectChangelogOfNonClosedIssuesByComponent.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/shared.xml (renamed from sonar-db/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/shared.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/update-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/update-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/update.xml (renamed from sonar-db/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/update.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueChangeMapperTest/insert_comment-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/issue/IssueChangeMapperTest/insert_comment-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueChangeMapperTest/insert_diff-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/issue/IssueChangeMapperTest/insert_diff-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueDaoTest/shared.xml (renamed from sonar-db/src/test/resources/org/sonar/db/issue/IssueDaoTest/shared.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueDaoTest/should_select_issue_and_component_ids.xml (renamed from sonar-db/src/test/resources/org/sonar/db/issue/IssueDaoTest/should_select_issue_and_component_ids.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueDaoTest/should_select_non_closed_issues_by_module.xml (renamed from sonar-db/src/test/resources/org/sonar/db/issue/IssueDaoTest/should_select_non_closed_issues_by_module.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueDaoTest/should_select_non_closed_issues_by_module_on_removed_project.xml (renamed from sonar-db/src/test/resources/org/sonar/db/issue/IssueDaoTest/should_select_non_closed_issues_by_module_on_removed_project.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueStatsDaoTest/should_select_assignees.xml (renamed from sonar-db/src/test/resources/org/sonar/db/issue/IssueStatsDaoTest/should_select_assignees.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/loadedtemplate/LoadedTemplateDaoTest/shouldCountByTypeAndKey.xml (renamed from sonar-db/src/test/resources/org/sonar/db/loadedtemplate/LoadedTemplateDaoTest/shouldCountByTypeAndKey.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/loadedtemplate/LoadedTemplateDaoTest/shouldInsert-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/loadedtemplate/LoadedTemplateDaoTest/shouldInsert-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/loadedtemplate/LoadedTemplateDaoTest/shouldInsert.xml (renamed from sonar-db/src/test/resources/org/sonar/db/loadedtemplate/LoadedTemplateDaoTest/shouldInsert.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/measure/MeasureDaoTest/empty.xml (renamed from sonar-db/src/test/resources/org/sonar/db/measure/MeasureDaoTest/empty.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/measure/MeasureDaoTest/insert-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/measure/MeasureDaoTest/insert-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/measure/MeasureDaoTest/past_measures.xml (renamed from sonar-db/src/test/resources/org/sonar/db/measure/MeasureDaoTest/past_measures.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/measure/MeasureDaoTest/past_measures_with_person_id.xml (renamed from sonar-db/src/test/resources/org/sonar/db/measure/MeasureDaoTest/past_measures_with_person_id.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/measure/MeasureDaoTest/select_by_snapshot_and_metric_keys.xml (renamed from sonar-db/src/test/resources/org/sonar/db/measure/MeasureDaoTest/select_by_snapshot_and_metric_keys.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/measure/MeasureDaoTest/shared.xml (renamed from sonar-db/src/test/resources/org/sonar/db/measure/MeasureDaoTest/shared.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/measure/MeasureDaoTest/with_some_measures_for_developer.xml (renamed from sonar-db/src/test/resources/org/sonar/db/measure/MeasureDaoTest/with_some_measures_for_developer.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/measure/custom/CustomMeasureDaoTest/select_by_metric_key_and_text_value.xml (renamed from sonar-db/src/test/resources/org/sonar/db/measure/custom/CustomMeasureDaoTest/select_by_metric_key_and_text_value.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/metric/MetricDaoTest/manual_metric.xml (renamed from sonar-db/src/test/resources/org/sonar/db/metric/MetricDaoTest/manual_metric.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/metric/MetricDaoTest/shared.xml (renamed from sonar-db/src/test/resources/org/sonar/db/metric/MetricDaoTest/shared.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/notification/NotificationQueueDaoTest/should_delete_notification-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/notification/NotificationQueueDaoTest/should_delete_notification-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/notification/NotificationQueueDaoTest/should_delete_notification.xml (renamed from sonar-db/src/test/resources/org/sonar/db/notification/NotificationQueueDaoTest/should_delete_notification.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/notification/NotificationQueueDaoTest/should_findOldest.xml (renamed from sonar-db/src/test/resources/org/sonar/db/notification/NotificationQueueDaoTest/should_findOldest.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/notification/NotificationQueueDaoTest/should_insert_new_notification_queue-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/notification/NotificationQueueDaoTest/should_insert_new_notification_queue-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/anonymous_should_be_authorized.xml (renamed from sonar-db/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/anonymous_should_be_authorized.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/group_should_be_authorized.xml (renamed from sonar-db/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/group_should_be_authorized.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/keep_authorized_project_ids_for_anonymous.xml (renamed from sonar-db/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/keep_authorized_project_ids_for_anonymous.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/keep_authorized_project_ids_for_group.xml (renamed from sonar-db/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/keep_authorized_project_ids_for_group.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/keep_authorized_project_ids_for_user.xml (renamed from sonar-db/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/keep_authorized_project_ids_for_user.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/keep_authorized_users_for_role_and_project_for_anonymous.xml (renamed from sonar-db/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/keep_authorized_users_for_role_and_project_for_anonymous.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/keep_authorized_users_for_role_and_project_for_group.xml (renamed from sonar-db/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/keep_authorized_users_for_role_and_project_for_group.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/keep_authorized_users_for_role_and_project_for_user.xml (renamed from sonar-db/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/keep_authorized_users_for_role_and_project_for_user.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/should_return_root_project_keys_for_anonymous.xml (renamed from sonar-db/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/should_return_root_project_keys_for_anonymous.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/should_return_root_project_keys_for_group.xml (renamed from sonar-db/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/should_return_root_project_keys_for_group.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/should_return_root_project_keys_for_user.xml (renamed from sonar-db/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/should_return_root_project_keys_for_user.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/user_should_be_authorized.xml (renamed from sonar-db/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/user_should_be_authorized.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/addGroupPermissionToTemplate-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/addGroupPermissionToTemplate-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/addGroupPermissionToTemplate.xml (renamed from sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/addGroupPermissionToTemplate.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/addNullGroupPermissionToTemplate-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/addNullGroupPermissionToTemplate-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/addNullGroupPermissionToTemplate.xml (renamed from sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/addNullGroupPermissionToTemplate.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/addUserPermissionToTemplate-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/addUserPermissionToTemplate-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/addUserPermissionToTemplate.xml (renamed from sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/addUserPermissionToTemplate.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/createPermissionTemplate-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/createPermissionTemplate-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/createPermissionTemplate.xml (renamed from sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/createPermissionTemplate.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/deletePermissionTemplate-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/deletePermissionTemplate-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/deletePermissionTemplate.xml (renamed from sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/deletePermissionTemplate.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/removeUserPermissionFromTemplate-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/removeUserPermissionFromTemplate-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/removeUserPermissionFromTemplate.xml (renamed from sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/removeUserPermissionFromTemplate.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/remove_by_group-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/remove_by_group-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/remove_by_group.xml (renamed from sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/remove_by_group.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/selectAllPermissionTemplates.xml (renamed from sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/selectAllPermissionTemplates.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/selectEmptyPermissionTemplate.xml (renamed from sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/selectEmptyPermissionTemplate.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/selectPermissionTemplate.xml (renamed from sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/selectPermissionTemplate.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/updatePermissionTemplate-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/updatePermissionTemplate-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/updatePermissionTemplate.xml (renamed from sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/updatePermissionTemplate.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/UserWithPermissionTemplateDaoTest/select_only_enable_users.xml (renamed from sonar-db/src/test/resources/org/sonar/db/permission/template/UserWithPermissionTemplateDaoTest/select_only_enable_users.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/UserWithPermissionTemplateDaoTest/users_with_permissions.xml (renamed from sonar-db/src/test/resources/org/sonar/db/permission/template/UserWithPermissionTemplateDaoTest/users_with_permissions.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/UserWithPermissionTemplateDaoTest/users_with_permissions_should_be_sorted_by_user_name.xml (renamed from sonar-db/src/test/resources/org/sonar/db/permission/template/UserWithPermissionTemplateDaoTest/users_with_permissions_should_be_sorted_by_user_name.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/property/PropertiesDaoTest/select_module_properties_tree.xml (renamed from sonar-db/src/test/resources/org/sonar/db/property/PropertiesDaoTest/select_module_properties_tree.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldDeleteResource.xml (renamed from sonar-db/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldDeleteResource.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldDeleteSnapshot-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldDeleteSnapshot-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldDeleteSnapshot.xml (renamed from sonar-db/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldDeleteSnapshot.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldDeleteWastedMeasuresWhenPurgingAnalysis-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldDeleteWastedMeasuresWhenPurgingAnalysis-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldDeleteWastedMeasuresWhenPurgingAnalysis.xml (renamed from sonar-db/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldDeleteWastedMeasuresWhenPurgingAnalysis.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldPurgeAnalysis-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldPurgeAnalysis-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldPurgeAnalysis.xml (renamed from sonar-db/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldPurgeAnalysis.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/close_issues_clean_index_and_files_sources_of_specified_components-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/close_issues_clean_index_and_files_sources_of_specified_components-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/close_issues_clean_index_and_files_sources_of_specified_components.xml (renamed from sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/close_issues_clean_index_and_files_sources_of_specified_components.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/delete_project_in_ce_activity_when_deleting_project.xml (renamed from sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/delete_project_in_ce_activity_when_deleting_project.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteAbortedBuilds-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteAbortedBuilds-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteAbortedBuilds.xml (renamed from sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteAbortedBuilds.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteAnalyses-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteAnalyses-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteAnalyses.xml (renamed from sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteAnalyses.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteHistoricalDataOfDirectoriesAndFiles-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteHistoricalDataOfDirectoriesAndFiles-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteHistoricalDataOfDirectoriesAndFiles.xml (renamed from sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteHistoricalDataOfDirectoriesAndFiles.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteProject.xml (renamed from sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteProject.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldPurgeProject-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldPurgeProject-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldPurgeProject.xml (renamed from sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldPurgeProject.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldSelectPurgeableAnalysis.xml (renamed from sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldSelectPurgeableAnalysis.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/should_delete_all_closed_issues-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/should_delete_all_closed_issues-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/should_delete_all_closed_issues.xml (renamed from sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/should_delete_all_closed_issues.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/should_delete_old_closed_issues-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/should_delete_old_closed_issues-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/should_delete_old_closed_issues.xml (renamed from sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/should_delete_old_closed_issues.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/view_sub_view_and_tech_project.xml (renamed from sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/view_sub_view_and_tech_project.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/qualitygate/ProjectQgateAssociationDaoTest/shared.xml (renamed from sonar-db/src/test/resources/org/sonar/db/qualitygate/ProjectQgateAssociationDaoTest/shared.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/qualitygate/QualityGateConditionDaoTest/delete-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/qualitygate/QualityGateConditionDaoTest/delete-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/qualitygate/QualityGateConditionDaoTest/insert-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/qualitygate/QualityGateConditionDaoTest/insert-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/qualitygate/QualityGateConditionDaoTest/insert.xml (renamed from sonar-db/src/test/resources/org/sonar/db/qualitygate/QualityGateConditionDaoTest/insert.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/qualitygate/QualityGateConditionDaoTest/selectForQualityGate.xml (renamed from sonar-db/src/test/resources/org/sonar/db/qualitygate/QualityGateConditionDaoTest/selectForQualityGate.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/qualitygate/QualityGateConditionDaoTest/shouldCleanConditions-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/qualitygate/QualityGateConditionDaoTest/shouldCleanConditions-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/qualitygate/QualityGateConditionDaoTest/shouldCleanConditions.xml (renamed from sonar-db/src/test/resources/org/sonar/db/qualitygate/QualityGateConditionDaoTest/shouldCleanConditions.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/qualitygate/QualityGateConditionDaoTest/update-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/qualitygate/QualityGateConditionDaoTest/update-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/qualitygate/QualityGateDaoTest/delete-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/qualitygate/QualityGateDaoTest/delete-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/qualitygate/QualityGateDaoTest/insert-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/qualitygate/QualityGateDaoTest/insert-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/qualitygate/QualityGateDaoTest/insert.xml (renamed from sonar-db/src/test/resources/org/sonar/db/qualitygate/QualityGateDaoTest/insert.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/qualitygate/QualityGateDaoTest/selectAll.xml (renamed from sonar-db/src/test/resources/org/sonar/db/qualitygate/QualityGateDaoTest/selectAll.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/qualitygate/QualityGateDaoTest/update-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/qualitygate/QualityGateDaoTest/update-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/delete-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/delete-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/inheritance.xml (renamed from sonar-db/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/inheritance.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/insert-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/insert-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/projects.xml (renamed from sonar-db/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/projects.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/select_all_is_sorted_by_profile_name.xml (renamed from sonar-db/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/select_all_is_sorted_by_profile_name.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/select_by_language.xml (renamed from sonar-db/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/select_by_language.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/shared.xml (renamed from sonar-db/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/shared.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/update-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/update-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/rule/RuleDaoTest/insert_parameter-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/rule/RuleDaoTest/insert_parameter-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/rule/RuleDaoTest/insert_parameter.xml (renamed from sonar-db/src/test/resources/org/sonar/db/rule/RuleDaoTest/insert_parameter.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/rule/RuleDaoTest/selectEnabled.xml (renamed from sonar-db/src/test/resources/org/sonar/db/rule/RuleDaoTest/selectEnabled.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/rule/RuleDaoTest/selectNonManual.xml (renamed from sonar-db/src/test/resources/org/sonar/db/rule/RuleDaoTest/selectNonManual.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/rule/RuleDaoTest/select_parameters_by_rule_key.xml (renamed from sonar-db/src/test/resources/org/sonar/db/rule/RuleDaoTest/select_parameters_by_rule_key.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/rule/RuleDaoTest/shared.xml (renamed from sonar-db/src/test/resources/org/sonar/db/rule/RuleDaoTest/shared.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/rule/RuleDaoTest/update.xml (renamed from sonar-db/src/test/resources/org/sonar/db/rule/RuleDaoTest/update.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/rule/RuleDaoTest/update_parameter-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/rule/RuleDaoTest/update_parameter-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/rule/RuleDaoTest/update_parameter.xml (renamed from sonar-db/src/test/resources/org/sonar/db/rule/RuleDaoTest/update_parameter.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/source/FileSourceDaoTest/insert-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/source/FileSourceDaoTest/insert-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/source/FileSourceDaoTest/no_line_hashes_when_only_test_data.xml (renamed from sonar-db/src/test/resources/org/sonar/db/source/FileSourceDaoTest/no_line_hashes_when_only_test_data.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/source/FileSourceDaoTest/shared.xml (renamed from sonar-db/src/test/resources/org/sonar/db/source/FileSourceDaoTest/shared.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/source/FileSourceDaoTest/update-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/source/FileSourceDaoTest/update-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/user/AuthorDaoTest/add_missing_module_uuid_path-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/user/AuthorDaoTest/add_missing_module_uuid_path-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/user/AuthorDaoTest/add_missing_module_uuid_path.xml (renamed from sonar-db/src/test/resources/org/sonar/db/user/AuthorDaoTest/add_missing_module_uuid_path.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/user/AuthorDaoTest/countDeveloperLogins.xml (renamed from sonar-db/src/test/resources/org/sonar/db/user/AuthorDaoTest/countDeveloperLogins.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldInsertAuthor-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldInsertAuthor-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldInsertAuthor.xml (renamed from sonar-db/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldInsertAuthor.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldInsertAuthorAndDeveloper-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldInsertAuthorAndDeveloper-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldInsertAuthorAndDeveloper.xml (renamed from sonar-db/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldInsertAuthorAndDeveloper.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldPreventAuthorsAndDevelopersDuplication-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldPreventAuthorsAndDevelopersDuplication-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldPreventAuthorsAndDevelopersDuplication.xml (renamed from sonar-db/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldPreventAuthorsAndDevelopersDuplication.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldPreventAuthorsDuplication-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldPreventAuthorsDuplication-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldPreventAuthorsDuplication.xml (renamed from sonar-db/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldPreventAuthorsDuplication.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldSelectByLogin.xml (renamed from sonar-db/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldSelectByLogin.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/user/GroupDaoTest/find_by_user_login.xml (renamed from sonar-db/src/test/resources/org/sonar/db/user/GroupDaoTest/find_by_user_login.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/user/GroupDaoTest/select_by_query.xml (renamed from sonar-db/src/test/resources/org/sonar/db/user/GroupDaoTest/select_by_query.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/user/GroupMembershipDaoTest/select_user_group.xml (renamed from sonar-db/src/test/resources/org/sonar/db/user/GroupMembershipDaoTest/select_user_group.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/user/GroupMembershipDaoTest/shared.xml (renamed from sonar-db/src/test/resources/org/sonar/db/user/GroupMembershipDaoTest/shared.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/user/GroupMembershipDaoTest/shared_plus_empty_group.xml (renamed from sonar-db/src/test/resources/org/sonar/db/user/GroupMembershipDaoTest/shared_plus_empty_group.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/user/GroupMembershipDaoTest/should_be_sorted_by_group_name.xml (renamed from sonar-db/src/test/resources/org/sonar/db/user/GroupMembershipDaoTest/should_be_sorted_by_group_name.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/user/RoleDaoTest/deleteGroupPermissionsByGroupId-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/user/RoleDaoTest/deleteGroupPermissionsByGroupId-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/user/RoleDaoTest/deleteGroupPermissionsByGroupId.xml (renamed from sonar-db/src/test/resources/org/sonar/db/user/RoleDaoTest/deleteGroupPermissionsByGroupId.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserDaoTest/exists_by_email.xml (renamed from sonar-db/src/test/resources/org/sonar/db/user/UserDaoTest/exists_by_email.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserDaoTest/insert-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/user/UserDaoTest/insert-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserDaoTest/selectActiveUserByLogin.xml (renamed from sonar-db/src/test/resources/org/sonar/db/user/UserDaoTest/selectActiveUserByLogin.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserDaoTest/selectGroupByName.xml (renamed from sonar-db/src/test/resources/org/sonar/db/user/UserDaoTest/selectGroupByName.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserDaoTest/selectUsersByIds.xml (renamed from sonar-db/src/test/resources/org/sonar/db/user/UserDaoTest/selectUsersByIds.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserDaoTest/selectUsersByLogins.xml (renamed from sonar-db/src/test/resources/org/sonar/db/user/UserDaoTest/selectUsersByLogins.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserDaoTest/selectUsersByQuery.xml (renamed from sonar-db/src/test/resources/org/sonar/db/user/UserDaoTest/selectUsersByQuery.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserDaoTest/selectUsersByText.xml (renamed from sonar-db/src/test/resources/org/sonar/db/user/UserDaoTest/selectUsersByText.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserDaoTest/select_by_login.xml (renamed from sonar-db/src/test/resources/org/sonar/db/user/UserDaoTest/select_by_login.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserDaoTest/select_nullable_by_scm_account.xml (renamed from sonar-db/src/test/resources/org/sonar/db/user/UserDaoTest/select_nullable_by_scm_account.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserDaoTest/select_nullable_by_scm_account_return_many_results_when_same_email_is_used_by_many_users.xml (renamed from sonar-db/src/test/resources/org/sonar/db/user/UserDaoTest/select_nullable_by_scm_account_return_many_results_when_same_email_is_used_by_many_users.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserDaoTest/update_user.xml (renamed from sonar-db/src/test/resources/org/sonar/db/user/UserDaoTest/update_user.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserGroupDaoTest/delete_members_by_group_id-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/user/UserGroupDaoTest/delete_members_by_group_id-result.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserGroupDaoTest/delete_members_by_group_id.xml (renamed from sonar-db/src/test/resources/org/sonar/db/user/UserGroupDaoTest/delete_members_by_group_id.xml)0
-rw-r--r--server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserGroupDaoTest/insert-result.xml (renamed from sonar-db/src/test/resources/org/sonar/db/user/UserGroupDaoTest/insert-result.xml)0
-rw-r--r--server/sonar-db-migration/pom.xml4
-rw-r--r--server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/history/MigrationHistoryImpl.java57
-rw-r--r--server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/history/MigrationHistoryTableImpl.java18
-rw-r--r--server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/step/UpsertImpl.java5
-rw-r--r--server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v61/DeleteReportsFromCeQueue.java3
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/AutoDbMigrationH2Test.java54
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/charset/SelectExecutorTest.java19
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/charset/SqlExecutorTest.java9
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/history/MigrationHistoryImplTest.java36
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/history/MigrationHistoryTableImplTest.java11
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/history/NoTableMigrationHistoryImplTest.java7
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/sql/CreateTableBuilderDbTesterTest.java8
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/step/DataChangeTest.java10
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v56/CreateInitialSchemaTest.java5
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v56/PopulateInitialSchemaTest.java4
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v561/UpdateUsersExternalIdentityWhenEmptyTest.java4
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddAnalysisUuidColumnToCeActivityTest.java6
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddAnalysisUuidColumnToEventsTest.java6
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddAnalysisUuidColumnToMeasuresTest.java6
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddBColumnsToProjectsTest.java6
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddComponentUuidAndAnalysisUuidColumnToDuplicationsIndexTest.java6
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddComponentUuidColumnToMeasuresTest.java6
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddComponentUuidColumnsToSnapshotsTest.java6
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddLastUsedColumnToRulesProfilesTest.java6
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddProfileKeyToActivitiesTest.java6
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddUserUpdatedAtToRulesProfilesTest.java6
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddUuidColumnToSnapshotsTest.java6
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddUuidColumnsToProjectsTest.java6
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddUuidColumnsToResourceIndexTest.java6
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/CleanEventsWithoutAnalysisUuidTest.java6
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/CleanEventsWithoutSnapshotIdTest.java6
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/CleanMeasuresWithNullAnalysisUuidTest.java7
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/CleanOrphanRowsInResourceIndexTest.java6
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/CleanOrphanRowsInSnapshotsTest.java7
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/CleanUsurperRootComponentsTest.java33
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/CreatePermTemplatesCharacteristicsTest.java5
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/DbVersion60Test.java5
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/DeleteOrphanMeasuresWithoutComponentTest.java6
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/DropTreesOfSnapshotsTest.java7
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/FixProjectUuidOfDeveloperProjectsTest.java8
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/MakeAnalysisUuidNotNullOnMeasuresTest.java5
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/MakeComponentUuidAndAnalysisUuidNotNullOnDuplicationsIndexTest.java5
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/MakeComponentUuidColumnsNotNullOnSnapshotsTest.java5
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/MakeComponentUuidNotNullOnMeasuresTest.java5
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/MakeProfileKeyNotNullOnActivitiesTest.java5
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/MakeUuidColumnNotNullOnSnapshotsTest.java5
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/MakeUuidColumnsNotNullOnProjectsTest.java5
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/MakeUuidColumnsNotNullOnResourceIndexTest.java5
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateAnalysisUuidColumnOnCeActivityTest.java6
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateAnalysisUuidOnEventsTest.java6
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateAnalysisUuidOnMeasuresTest.java6
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateComponentUuidAndAnalysisUuidOfDuplicationsIndexTest.java6
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateComponentUuidColumnsOfSnapshotsTest.java6
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateComponentUuidOfMeasuresTest.java6
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateLastUsedColumnOfRulesProfilesTest.java5
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateProfileKeyOfActivitiesTest.java5
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateUserUpdatedAtOfRulesProfilesTest.java9
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateUuidColumnOnSnapshotsTest.java5
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateUuidColumnsOfProjectsTest.java6
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateUuidColumnsOfResourceIndexTest.java6
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateUuidPathColumnOnProjectsTest.java6
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/RemoveUsersPasswordWhenNotLocalTest.java4
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/AddErrorColumnsToCeActivityTest.java6
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/CopyActivitiesToQprofileChangesTest.java15
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/CreateTableCeTaskInputTest.java5
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/CreateTableInternalPropertiesTest.java5
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/CreateTableProperties2Test.java5
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/CreateTableQprofileChangesTest.java5
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/CreateTableRuleRepositoriesTest.java5
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/CreateTableScannerContextTest.java5
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/DeleteProjectDashboardsTest.java5
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/DeleteReportsFromCeQueueTest.java8
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/PopulateTableProperties2Test.java16
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/RemoveViewsDefinitionFromPropertiesTest.java4
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/AddIsRootColumnOnTableUsersTest.java4
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/AddOrganizationUuidToGroupRolesTest.java4
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/AddOrganizationUuidToGroupsTest.java4
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/AddOrganizationUuidToPermissionTemplatesTest.java4
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/AddOrganizationUuidToUserRolesTest.java4
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/CreateDefaultOrganizationTest.java23
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/CreateTableOrganizationsTest.java4
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/CreateTableWebhookDeliveriesTest.java4
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/DeletePermissionShareDashboardTest.java4
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/DropIssueFiltersTableTest.java4
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/DropMeasureFiltersTableTest.java4
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/DropRelatedDashboardTablesTest.java4
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/MakeOrganizationUuidNotNullOnGroupRolesTest.java4
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/MakeOrganizationUuidNotNullOnGroupsTest.java4
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/MakeOrganizationUuidNotNullOnPermissionTemplatesTest.java4
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/MakeOrganizationUuidNotNullOnUserRolesTest.java4
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/MakeRootColumnNotNullOnTableUsersTest.java4
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/PopulateIsRootColumnOnTableUsersTest.java27
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/PopulateOrganizationUuidOfGroupRolesTest.java4
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/PopulateOrganizationUuidOfGroupsTest.java4
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/PopulateOrganizationUuidOfPermissionTemplatesTest.java4
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/PopulateOrganizationUuidOfUserRolesTest.java4
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/UpdateQualityGateConditionsOnCoverageTest.java13
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/AddColumnGuardedToOrganizationsTest.java4
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/AddDefaultPermTemplateColumnsToOrganizationsTest.java4
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/AddIndexOnOrganizationUuidOfProjectsTest.java4
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/AddOrganizationUuidToProjectsTest.java4
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/AddUserIdToOrganizationsTest.java4
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/AddUuidToEventsTest.java4
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/DefaultOrganizationUuidImplTest.java4
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/DeleteMeasuresHavingNoValueTest.java10
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/DeleteUselessPropertiesTest.java12
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/DropTableResourceIndexTest.java4
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/MakeColumnGuardedOfOrganizationsNotNullableTest.java4
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/MakeDefaultOrganizationGuardedTest.java5
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/MakeOrganizationUuidOfProjectsNotNullableTest.java5
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/MakeUuidNotNullOnEventsTest.java4
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/PopulateColumnGuardedOfOrganizationsTest.java4
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/PopulateDefaultPermTemplateColumnsOfOrganizationsTest.java4
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/PopulateOrganizationUuidToProjectsTest.java4
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/PopulateUuidColumnOfEventsTest.java6
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/UnsetUserRootFlagsTest.java51
-rw-r--r--server/sonar-db-migration/src/test/resources/org/sonar/server/platform/db/migration/charset/SelectExecutorTest/users_table.sql4
-rw-r--r--server/sonar-db-migration/src/test/resources/org/sonar/server/platform/db/migration/charset/SqlExecutorTest/users_table.sql5
-rw-r--r--server/sonar-db-migration/src/test/resources/org/sonar/server/platform/db/migration/history/MigrationHistoryImplTest/schema_migration.sql4
-rw-r--r--server/sonar-db-testing/pom.xml46
-rw-r--r--server/sonar-server/pom.xml17
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/component/ws/ProjectMeasuresQueryFactory.java4
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/platform/db/migration/AutoDbMigration.java (renamed from server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/AutoDbMigration.java)0
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/platform/db/migration/AutoDbMigrationTest.java (renamed from server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/AutoDbMigrationTest.java)0
811 files changed, 1193 insertions, 939 deletions
diff --git a/pom.xml b/pom.xml
index 24a4d709fe9..c6f51e8ee6f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,6 @@
<module>sonar-check-api</module>
<module>sonar-colorizer</module>
<module>sonar-core</module>
- <module>sonar-db</module>
<module>sonar-duplications</module>
<module>sonar-home</module>
<module>sonar-markdown</module>
@@ -419,7 +418,7 @@
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
- <artifactId>sonar-db</artifactId>
+ <artifactId>sonar-db-dao</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
@@ -429,6 +428,12 @@
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
+ <artifactId>sonar-db-testing</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
<artifactId>sonar-scanner-protocol</artifactId>
<version>${project.version}</version>
</dependency>
@@ -517,6 +522,16 @@
</dependency>
<dependency>
<groupId>org.sonarsource.sonarqube</groupId>
+ <artifactId>sonar-db-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.sonarsource.sonarqube</groupId>
+ <artifactId>sonar-db-testing</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.sonarsource.sonarqube</groupId>
<artifactId>sonar-testing-harness</artifactId>
<version>${project.version}</version>
</dependency>
diff --git a/run-db-unit-tests.sh b/run-db-unit-tests.sh
index 596f5e605db..7eea321bbeb 100755
--- a/run-db-unit-tests.sh
+++ b/run-db-unit-tests.sh
@@ -5,7 +5,7 @@ ORCHESTRATOR_CONFIG_URL=$1
shift
mvn verify \
- -pl :sonar-db,:sonar-db-migration \
+ -pl :sonar-db-core,:sonar-db-migration,:sonar-db-dao \
-Dorchestrator.configUrl=$ORCHESTRATOR_CONFIG_URL \
-Dwith-db-drivers \
-B -e -V $*
diff --git a/server/pom.xml b/server/pom.xml
index da172f600da..4d33bf6327b 100644
--- a/server/pom.xml
+++ b/server/pom.xml
@@ -14,7 +14,10 @@
<module>sonar-process</module>
<module>sonar-process-monitor</module>
<module>sonar-search</module>
+ <module>sonar-db-core</module>
<module>sonar-db-migration</module>
+ <module>sonar-db-dao</module>
+ <module>sonar-db-testing</module>
<module>sonar-server</module>
<module>sonar-ce</module>
<module>sonar-plugin-bridge</module>
diff --git a/server/sonar-ce/pom.xml b/server/sonar-ce/pom.xml
index cd449ba2258..8aafdcdfb6f 100644
--- a/server/sonar-ce/pom.xml
+++ b/server/sonar-ce/pom.xml
@@ -40,14 +40,8 @@
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
- <artifactId>sonar-db</artifactId>
- <version>${project.version}</version>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.dbunit</groupId>
- <artifactId>dbunit</artifactId>
+ <artifactId>sonar-db-testing</artifactId>
+ <type>pom</type>
<scope>test</scope>
</dependency>
</dependencies>
diff --git a/sonar-db/pom.xml b/server/sonar-db-core/pom.xml
index 5c39cf12e84..9db00b7555c 100644
--- a/sonar-db/pom.xml
+++ b/server/sonar-db-core/pom.xml
@@ -4,19 +4,15 @@
<parent>
<groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonarqube</artifactId>
+ <artifactId>server</artifactId>
<version>6.4-SNAPSHOT</version>
</parent>
- <artifactId>sonar-db</artifactId>
+ <artifactId>sonar-db-core</artifactId>
- <name>SonarQube :: Database</name>
- <description>Request SonarQube schema</description>
+ <name>SonarQube :: Database Core</name>
+ <description>Core Database support</description>
- <properties>
- <sonar.exclusions>target/generated-sources/**</sonar.exclusions>
- </properties>
-
<dependencies>
<dependency>
<groupId>com.google.code.findbugs</groupId>
diff --git a/sonar-db/src/main/java/org/sonar/core/persistence/DatabaseUtils.java b/server/sonar-db-core/src/main/java/org/sonar/core/DatabaseUtils.java
index a881ca5eb8b..742f61cd39a 100644
--- a/sonar-db/src/main/java/org/sonar/core/persistence/DatabaseUtils.java
+++ b/server/sonar-db-core/src/main/java/org/sonar/core/DatabaseUtils.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.core.persistence;
+package org.sonar.core;
/**
* Kept for backward compatibility of plugins/libs (like sonar-license) that are directly calling classes from the core
diff --git a/server/sonar-db-core/src/main/java/org/sonar/core/package-info.java b/server/sonar-db-core/src/main/java/org/sonar/core/package-info.java
new file mode 100644
index 00000000000..d0f6201b2b6
--- /dev/null
+++ b/server/sonar-db-core/src/main/java/org/sonar/core/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+@ParametersAreNonnullByDefault
+package org.sonar.core;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-db/src/main/java/org/sonar/db/Database.java b/server/sonar-db-core/src/main/java/org/sonar/db/Database.java
index c5f7862a83f..c5f7862a83f 100644
--- a/sonar-db/src/main/java/org/sonar/db/Database.java
+++ b/server/sonar-db-core/src/main/java/org/sonar/db/Database.java
diff --git a/sonar-db/src/main/java/org/sonar/db/DatabaseChecker.java b/server/sonar-db-core/src/main/java/org/sonar/db/DatabaseChecker.java
index 110fcae0daa..110fcae0daa 100644
--- a/sonar-db/src/main/java/org/sonar/db/DatabaseChecker.java
+++ b/server/sonar-db-core/src/main/java/org/sonar/db/DatabaseChecker.java
diff --git a/sonar-db/src/main/java/org/sonar/db/DatabaseUtils.java b/server/sonar-db-core/src/main/java/org/sonar/db/DatabaseUtils.java
index 31f5abebb9f..9afd83c3135 100644
--- a/sonar-db/src/main/java/org/sonar/db/DatabaseUtils.java
+++ b/server/sonar-db-core/src/main/java/org/sonar/db/DatabaseUtils.java
@@ -89,42 +89,6 @@ public class DatabaseUtils {
}
/**
- * Returns an escaped value in parameter, with the desired wildcards. Suitable to be used in a like sql query<br />
- * Escapes the "/", "%" and "_" characters.<br/>
- *
- * You <strong>must</strong> add "ESCAPE '/'" after your like query. It defines '/' as the escape character.
- */
- public static String buildLikeValue(String value, WildcardPosition wildcardPosition) {
- String escapedValue = escapePercentAndUnderscore(value);
- String wildcard = "%";
- switch (wildcardPosition) {
- case BEFORE:
- escapedValue = wildcard + escapedValue;
- break;
- case AFTER:
- escapedValue += wildcard;
- break;
- case BEFORE_AND_AFTER:
- escapedValue = wildcard + escapedValue + wildcard;
- break;
- default:
- throw new UnsupportedOperationException("Unhandled WildcardPosition: " + wildcardPosition);
- }
-
- return escapedValue;
- }
-
- /**
- * Replace escape percent and underscore by adding a slash just before
- */
- private static String escapePercentAndUnderscore(String value) {
- return value
- .replaceAll("/", "//")
- .replaceAll("%", "/%")
- .replaceAll("_", "/_");
- }
-
- /**
* Partition by 1000 elements a list of input and execute a function on each part.
*
* The goal is to prevent issue with ORACLE when there's more than 1000 elements in a 'in ('X', 'Y', ...)'
diff --git a/sonar-db/src/main/java/org/sonar/db/DdlUtils.java b/server/sonar-db-core/src/main/java/org/sonar/db/DdlUtils.java
index 32675984093..32675984093 100644
--- a/sonar-db/src/main/java/org/sonar/db/DdlUtils.java
+++ b/server/sonar-db-core/src/main/java/org/sonar/db/DdlUtils.java
diff --git a/sonar-db/src/main/java/org/sonar/db/DefaultDatabase.java b/server/sonar-db-core/src/main/java/org/sonar/db/DefaultDatabase.java
index c1a3c28dfff..c1a3c28dfff 100644
--- a/sonar-db/src/main/java/org/sonar/db/DefaultDatabase.java
+++ b/server/sonar-db-core/src/main/java/org/sonar/db/DefaultDatabase.java
diff --git a/sonar-db/src/main/java/org/sonar/db/ResultSetIterator.java b/server/sonar-db-core/src/main/java/org/sonar/db/ResultSetIterator.java
index 6545555c6d2..6545555c6d2 100644
--- a/sonar-db/src/main/java/org/sonar/db/ResultSetIterator.java
+++ b/server/sonar-db-core/src/main/java/org/sonar/db/ResultSetIterator.java
diff --git a/sonar-db/src/main/java/org/sonar/db/RowNotFoundException.java b/server/sonar-db-core/src/main/java/org/sonar/db/RowNotFoundException.java
index 86614240093..86614240093 100644
--- a/sonar-db/src/main/java/org/sonar/db/RowNotFoundException.java
+++ b/server/sonar-db-core/src/main/java/org/sonar/db/RowNotFoundException.java
diff --git a/sonar-db/src/main/java/org/sonar/db/dialect/AbstractDialect.java b/server/sonar-db-core/src/main/java/org/sonar/db/dialect/AbstractDialect.java
index f442c088c21..f442c088c21 100644
--- a/sonar-db/src/main/java/org/sonar/db/dialect/AbstractDialect.java
+++ b/server/sonar-db-core/src/main/java/org/sonar/db/dialect/AbstractDialect.java
diff --git a/sonar-db/src/main/java/org/sonar/db/dialect/Dialect.java b/server/sonar-db-core/src/main/java/org/sonar/db/dialect/Dialect.java
index a7f02670fb9..a7f02670fb9 100644
--- a/sonar-db/src/main/java/org/sonar/db/dialect/Dialect.java
+++ b/server/sonar-db-core/src/main/java/org/sonar/db/dialect/Dialect.java
diff --git a/sonar-db/src/main/java/org/sonar/db/dialect/DialectUtils.java b/server/sonar-db-core/src/main/java/org/sonar/db/dialect/DialectUtils.java
index ce20c6cf893..ce20c6cf893 100644
--- a/sonar-db/src/main/java/org/sonar/db/dialect/DialectUtils.java
+++ b/server/sonar-db-core/src/main/java/org/sonar/db/dialect/DialectUtils.java
diff --git a/sonar-db/src/main/java/org/sonar/db/dialect/H2.java b/server/sonar-db-core/src/main/java/org/sonar/db/dialect/H2.java
index e94cbf0a348..e94cbf0a348 100644
--- a/sonar-db/src/main/java/org/sonar/db/dialect/H2.java
+++ b/server/sonar-db-core/src/main/java/org/sonar/db/dialect/H2.java
diff --git a/sonar-db/src/main/java/org/sonar/db/dialect/MsSql.java b/server/sonar-db-core/src/main/java/org/sonar/db/dialect/MsSql.java
index 802688af9b3..802688af9b3 100644
--- a/sonar-db/src/main/java/org/sonar/db/dialect/MsSql.java
+++ b/server/sonar-db-core/src/main/java/org/sonar/db/dialect/MsSql.java
diff --git a/sonar-db/src/main/java/org/sonar/db/dialect/MySql.java b/server/sonar-db-core/src/main/java/org/sonar/db/dialect/MySql.java
index bb16869d798..bb16869d798 100644
--- a/sonar-db/src/main/java/org/sonar/db/dialect/MySql.java
+++ b/server/sonar-db-core/src/main/java/org/sonar/db/dialect/MySql.java
diff --git a/sonar-db/src/main/java/org/sonar/db/dialect/Oracle.java b/server/sonar-db-core/src/main/java/org/sonar/db/dialect/Oracle.java
index ac49a24a9ad..ac49a24a9ad 100644
--- a/sonar-db/src/main/java/org/sonar/db/dialect/Oracle.java
+++ b/server/sonar-db-core/src/main/java/org/sonar/db/dialect/Oracle.java
diff --git a/sonar-db/src/main/java/org/sonar/db/dialect/PostgreSql.java b/server/sonar-db-core/src/main/java/org/sonar/db/dialect/PostgreSql.java
index bdb81f80abc..bdb81f80abc 100644
--- a/sonar-db/src/main/java/org/sonar/db/dialect/PostgreSql.java
+++ b/server/sonar-db-core/src/main/java/org/sonar/db/dialect/PostgreSql.java
diff --git a/sonar-db/src/main/java/org/sonar/db/dialect/package-info.java b/server/sonar-db-core/src/main/java/org/sonar/db/dialect/package-info.java
index 5602ddce667..5602ddce667 100644
--- a/sonar-db/src/main/java/org/sonar/db/dialect/package-info.java
+++ b/server/sonar-db-core/src/main/java/org/sonar/db/dialect/package-info.java
diff --git a/sonar-db/src/main/java/org/sonar/db/package-info.java b/server/sonar-db-core/src/main/java/org/sonar/db/package-info.java
index 0fa491e02ec..0fa491e02ec 100644
--- a/sonar-db/src/main/java/org/sonar/db/package-info.java
+++ b/server/sonar-db-core/src/main/java/org/sonar/db/package-info.java
diff --git a/sonar-db/src/main/java/org/sonar/db/profiling/ConnectionInterceptor.java b/server/sonar-db-core/src/main/java/org/sonar/db/profiling/ConnectionInterceptor.java
index b3912651c85..b3912651c85 100644
--- a/sonar-db/src/main/java/org/sonar/db/profiling/ConnectionInterceptor.java
+++ b/server/sonar-db-core/src/main/java/org/sonar/db/profiling/ConnectionInterceptor.java
diff --git a/sonar-db/src/main/java/org/sonar/db/profiling/InvocationUtils.java b/server/sonar-db-core/src/main/java/org/sonar/db/profiling/InvocationUtils.java
index ad36c802e3f..ad36c802e3f 100644
--- a/sonar-db/src/main/java/org/sonar/db/profiling/InvocationUtils.java
+++ b/server/sonar-db-core/src/main/java/org/sonar/db/profiling/InvocationUtils.java
diff --git a/sonar-db/src/main/java/org/sonar/db/profiling/NullConnectionInterceptor.java b/server/sonar-db-core/src/main/java/org/sonar/db/profiling/NullConnectionInterceptor.java
index c4d83f456b0..c4d83f456b0 100644
--- a/sonar-db/src/main/java/org/sonar/db/profiling/NullConnectionInterceptor.java
+++ b/server/sonar-db-core/src/main/java/org/sonar/db/profiling/NullConnectionInterceptor.java
diff --git a/sonar-db/src/main/java/org/sonar/db/profiling/ProfiledConnectionInterceptor.java b/server/sonar-db-core/src/main/java/org/sonar/db/profiling/ProfiledConnectionInterceptor.java
index ffc74810e73..ffc74810e73 100644
--- a/sonar-db/src/main/java/org/sonar/db/profiling/ProfiledConnectionInterceptor.java
+++ b/server/sonar-db-core/src/main/java/org/sonar/db/profiling/ProfiledConnectionInterceptor.java
diff --git a/sonar-db/src/main/java/org/sonar/db/profiling/ProfiledDataSource.java b/server/sonar-db-core/src/main/java/org/sonar/db/profiling/ProfiledDataSource.java
index ee831a9d95a..ee831a9d95a 100644
--- a/sonar-db/src/main/java/org/sonar/db/profiling/ProfiledDataSource.java
+++ b/server/sonar-db-core/src/main/java/org/sonar/db/profiling/ProfiledDataSource.java
diff --git a/sonar-db/src/main/java/org/sonar/db/profiling/ProfilingConnectionHandler.java b/server/sonar-db-core/src/main/java/org/sonar/db/profiling/ProfilingConnectionHandler.java
index d6e63e21dbd..d6e63e21dbd 100644
--- a/sonar-db/src/main/java/org/sonar/db/profiling/ProfilingConnectionHandler.java
+++ b/server/sonar-db-core/src/main/java/org/sonar/db/profiling/ProfilingConnectionHandler.java
diff --git a/sonar-db/src/main/java/org/sonar/db/profiling/ProfilingPreparedStatementHandler.java b/server/sonar-db-core/src/main/java/org/sonar/db/profiling/ProfilingPreparedStatementHandler.java
index 1c9bd8f3868..1c9bd8f3868 100644
--- a/sonar-db/src/main/java/org/sonar/db/profiling/ProfilingPreparedStatementHandler.java
+++ b/server/sonar-db-core/src/main/java/org/sonar/db/profiling/ProfilingPreparedStatementHandler.java
diff --git a/sonar-db/src/main/java/org/sonar/db/profiling/ProfilingStatementHandler.java b/server/sonar-db-core/src/main/java/org/sonar/db/profiling/ProfilingStatementHandler.java
index 4a8c1ef6053..4a8c1ef6053 100644
--- a/sonar-db/src/main/java/org/sonar/db/profiling/ProfilingStatementHandler.java
+++ b/server/sonar-db-core/src/main/java/org/sonar/db/profiling/ProfilingStatementHandler.java
diff --git a/sonar-db/src/main/java/org/sonar/db/profiling/SqlLogFormatter.java b/server/sonar-db-core/src/main/java/org/sonar/db/profiling/SqlLogFormatter.java
index fafc22ca46f..fafc22ca46f 100644
--- a/sonar-db/src/main/java/org/sonar/db/profiling/SqlLogFormatter.java
+++ b/server/sonar-db-core/src/main/java/org/sonar/db/profiling/SqlLogFormatter.java
diff --git a/sonar-db/src/main/java/org/sonar/db/profiling/package-info.java b/server/sonar-db-core/src/main/java/org/sonar/db/profiling/package-info.java
index 43c7f272860..43c7f272860 100644
--- a/sonar-db/src/main/java/org/sonar/db/profiling/package-info.java
+++ b/server/sonar-db-core/src/main/java/org/sonar/db/profiling/package-info.java
diff --git a/sonar-db/src/main/java/org/sonar/db/semaphore/SemaphoresImpl.java b/server/sonar-db-core/src/main/java/org/sonar/db/semaphore/SemaphoresImpl.java
index ef9030591aa..ef9030591aa 100644
--- a/sonar-db/src/main/java/org/sonar/db/semaphore/SemaphoresImpl.java
+++ b/server/sonar-db-core/src/main/java/org/sonar/db/semaphore/SemaphoresImpl.java
diff --git a/sonar-db/src/main/java/org/sonar/db/semaphore/package-info.java b/server/sonar-db-core/src/main/java/org/sonar/db/semaphore/package-info.java
index a6ff02997db..a6ff02997db 100644
--- a/sonar-db/src/main/java/org/sonar/db/semaphore/package-info.java
+++ b/server/sonar-db-core/src/main/java/org/sonar/db/semaphore/package-info.java
diff --git a/sonar-db/src/main/java/org/sonar/db/version/SqTables.java b/server/sonar-db-core/src/main/java/org/sonar/db/version/SqTables.java
index 968be26f244..968be26f244 100644
--- a/sonar-db/src/main/java/org/sonar/db/version/SqTables.java
+++ b/server/sonar-db-core/src/main/java/org/sonar/db/version/SqTables.java
diff --git a/sonar-db/src/main/java/org/sonar/db/version/package-info.java b/server/sonar-db-core/src/main/java/org/sonar/db/version/package-info.java
index 225b5e6fba6..225b5e6fba6 100644
--- a/sonar-db/src/main/java/org/sonar/db/version/package-info.java
+++ b/server/sonar-db-core/src/main/java/org/sonar/db/version/package-info.java
diff --git a/sonar-db/src/main/resources/org/sonar/db/version/rows-h2.sql b/server/sonar-db-core/src/main/resources/org/sonar/db/version/rows-h2.sql
index 5892eee83ae..5892eee83ae 100644
--- a/sonar-db/src/main/resources/org/sonar/db/version/rows-h2.sql
+++ b/server/sonar-db-core/src/main/resources/org/sonar/db/version/rows-h2.sql
diff --git a/sonar-db/src/main/resources/org/sonar/db/version/schema-h2.ddl b/server/sonar-db-core/src/main/resources/org/sonar/db/version/schema-h2.ddl
index 4c459333be0..4c459333be0 100644
--- a/sonar-db/src/main/resources/org/sonar/db/version/schema-h2.ddl
+++ b/server/sonar-db-core/src/main/resources/org/sonar/db/version/schema-h2.ddl
diff --git a/sonar-db/src/main/resources/org/sonar/db/version/schema_migrations-h2.ddl b/server/sonar-db-core/src/main/resources/org/sonar/db/version/schema_migrations-h2.ddl
index aad2a0750a7..aad2a0750a7 100644
--- a/sonar-db/src/main/resources/org/sonar/db/version/schema_migrations-h2.ddl
+++ b/server/sonar-db-core/src/main/resources/org/sonar/db/version/schema_migrations-h2.ddl
diff --git a/sonar-db/src/test/java/org/sonar/db/DbTester.java b/server/sonar-db-core/src/test/java/org/sonar/db/AbstractDbTester.java
index 61a0c277b1a..5777e7cb974 100644
--- a/sonar-db/src/test/java/org/sonar/db/DbTester.java
+++ b/server/sonar-db-core/src/test/java/org/sonar/db/AbstractDbTester.java
@@ -59,238 +59,36 @@ import org.dbunit.dataset.xml.FlatXmlDataSet;
import org.dbunit.ext.mssql.InsertIdentityOperation;
import org.dbunit.operation.DatabaseOperation;
import org.junit.rules.ExternalResource;
-import org.picocontainer.containers.TransientPicoContainer;
-import org.sonar.api.utils.System2;
import org.sonar.api.utils.log.Loggers;
-import org.sonar.core.util.SequenceUuidFactory;
-import org.sonar.db.component.ComponentDbTester;
-import org.sonar.db.event.EventDbTester;
-import org.sonar.db.favorite.FavoriteDbTester;
-import org.sonar.db.issue.IssueDbTester;
-import org.sonar.db.notification.NotificationDbTester;
-import org.sonar.db.organization.OrganizationDbTester;
-import org.sonar.db.organization.OrganizationDto;
-import org.sonar.db.organization.OrganizationTesting;
-import org.sonar.db.permission.template.PermissionTemplateDbTester;
-import org.sonar.db.property.PropertyDbTester;
-import org.sonar.db.qualitygate.QualityGateDbTester;
-import org.sonar.db.qualityprofile.QualityProfileDbTester;
-import org.sonar.db.rule.RuleDbTester;
-import org.sonar.db.user.RootFlagAssertions;
-import org.sonar.db.user.UserDbTester;
import static com.google.common.base.Preconditions.checkArgument;
-import static com.google.common.base.Preconditions.checkState;
import static com.google.common.collect.Lists.asList;
import static com.google.common.collect.Lists.newArrayList;
import static com.google.common.collect.Maps.newHashMap;
import static java.sql.ResultSetMetaData.columnNoNulls;
import static java.sql.ResultSetMetaData.columnNullable;
-import static org.apache.commons.lang.RandomStringUtils.randomAlphanumeric;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.fail;
-/**
- * This class should be called using @Rule.
- * Data is truncated between each tests. The schema is created between each test.
- */
-public class DbTester extends ExternalResource {
-
- private static final Joiner COMMA_JOINER = Joiner.on(", ");
- private final System2 system2;
- private final TestDb db;
- private DbClient client;
- private DbSession session = null;
- private boolean disableDefaultOrganization = false;
- private boolean started = false;
- private String defaultOrganizationUuid = randomAlphanumeric(40);
- private OrganizationDto defaultOrganization;
-
- private final UserDbTester userTester;
- private final ComponentDbTester componentTester;
- private final FavoriteDbTester favoriteTester;
- private final EventDbTester eventTester;
- private final OrganizationDbTester organizationTester;
- private final PermissionTemplateDbTester permissionTemplateTester;
- private final PropertyDbTester propertyTester;
- private final QualityGateDbTester qualityGateDbTester;
- private final IssueDbTester issueDbTester;
- private final RuleDbTester ruleDbTester;
- private final NotificationDbTester notificationDbTester;
- private final RootFlagAssertions rootFlagAssertions;
- private final QualityProfileDbTester qualityProfileDbTester;
-
- private DbTester(System2 system2, @Nullable String schemaPath) {
- this.system2 = system2;
- this.db = TestDb.create(schemaPath);
- initDbClient();
- this.userTester = new UserDbTester(this);
- this.componentTester = new ComponentDbTester(this);
- this.favoriteTester = new FavoriteDbTester(this);
- this.eventTester = new EventDbTester(this);
- this.organizationTester = new OrganizationDbTester(this);
- this.permissionTemplateTester = new PermissionTemplateDbTester(this);
- this.propertyTester = new PropertyDbTester(this);
- this.qualityGateDbTester = new QualityGateDbTester(this);
- this.issueDbTester = new IssueDbTester(this);
- this.ruleDbTester = new RuleDbTester(this);
- this.notificationDbTester = new NotificationDbTester(this);
- this.rootFlagAssertions = new RootFlagAssertions(this);
- this.qualityProfileDbTester = new QualityProfileDbTester(this);
- }
-
- public static DbTester create() {
- return new DbTester(System2.INSTANCE, null);
- }
-
- public static DbTester create(System2 system2) {
- return new DbTester(system2, null);
- }
-
- public static DbTester createForSchema(System2 system2, Class testClass, String filename) {
- String path = StringUtils.replaceChars(testClass.getCanonicalName(), '.', '/');
- String schemaPath = path + "/" + filename;
- return new DbTester(system2, schemaPath).setDisableDefaultOrganization(true);
- }
-
- private void initDbClient() {
- TransientPicoContainer ioc = new TransientPicoContainer();
- ioc.addComponent(db.getMyBatis());
- ioc.addComponent(system2);
- ioc.addComponent(new SequenceUuidFactory());
- for (Class daoClass : DaoModule.classes()) {
- ioc.addComponent(daoClass);
- }
- List<Dao> daos = ioc.getComponents(Dao.class);
- client = new DbClient(db.getDatabase(), db.getMyBatis(), daos.toArray(new Dao[daos.size()]));
- }
-
- public DbTester setDisableDefaultOrganization(boolean b) {
- checkState(!started, "DbTester is already started");
- this.disableDefaultOrganization = b;
- return this;
- }
-
- public DbTester setDefaultOrganizationUuid(String uuid) {
- checkState(!started, "DbTester is already started");
- this.defaultOrganizationUuid = uuid;
- return this;
- }
-
- public DbTester enableOrganizations() {
- properties().insertInternal("organization.enabled", "true");
- return this;
- }
-
- @Override
- protected void before() throws Throwable {
- db.start();
- db.truncateTables();
- initDbClient();
- if (!disableDefaultOrganization) {
- insertDefaultOrganization();
- }
- started = true;
- }
-
- private void insertDefaultOrganization() {
- defaultOrganization = OrganizationTesting.newOrganizationDto().setUuid(defaultOrganizationUuid);
- try (DbSession dbSession = db.getMyBatis().openSession(false)) {
- client.organizationDao().insert(dbSession, defaultOrganization);
- client.internalPropertiesDao().save(dbSession, "organization.default", defaultOrganization.getUuid());
- dbSession.commit();
- }
- }
-
- public OrganizationDto getDefaultOrganization() {
- checkState(defaultOrganization != null, "Default organization has not been created");
- return defaultOrganization;
- }
-
- public UserDbTester users() {
- return userTester;
- }
-
- public ComponentDbTester components() {
- return componentTester;
- }
-
- public FavoriteDbTester favorites() {
- return favoriteTester;
- }
-
- public EventDbTester events() {
- return eventTester;
- }
-
- public OrganizationDbTester organizations() {
- return organizationTester;
- }
-
- public PermissionTemplateDbTester permissionTemplates() {
- return permissionTemplateTester;
- }
+public class AbstractDbTester<T extends CoreTestDb> extends ExternalResource {
+ protected static final Joiner COMMA_JOINER = Joiner.on(", ");
+ protected final T db;
- public PropertyDbTester properties() {
- return propertyTester;
- }
-
- public QualityGateDbTester qualityGates() {
- return qualityGateDbTester;
- }
-
- public RootFlagAssertions rootFlag() {
- return rootFlagAssertions;
- }
-
- public IssueDbTester issues() {
- return issueDbTester;
- }
-
- public RuleDbTester rules() {
- return ruleDbTester;
- }
-
- public NotificationDbTester notifications() {
- return notificationDbTester;
- }
-
- public QualityProfileDbTester qualityProfiles() {
- return qualityProfileDbTester;
- }
-
- @Override
- protected void after() {
- if (session != null) {
- MyBatis.closeQuietly(session);
- }
- db.stop();
- started = false;
- }
-
- public DbSession getSession() {
- if (session == null) {
- session = db.getMyBatis().openSession(false);
- }
- return session;
- }
-
- public void commit() {
- getSession().commit();
- }
-
- public DbClient getDbClient() {
- return client;
+ public AbstractDbTester(T db) {
+ this.db = db;
}
public void executeUpdateSql(String sql, Object... params) {
try (Connection connection = getConnection()) {
new QueryRunner().update(connection, sql, params);
+ if (!connection.getAutoCommit()) {
+ connection.commit();
+ }
} catch (SQLException e) {
SQLException nextException = e.getNextException();
if (nextException != null) {
throw new IllegalStateException("Fail to execute sql: " + sql,
- new SQLException(e.getMessage(), nextException.getSQLState(), nextException.getErrorCode(), nextException));
+ new SQLException(e.getMessage(), nextException.getSQLState(), nextException.getErrorCode(), nextException));
}
throw new IllegalStateException("Fail to execute sql: " + sql, e);
} catch (Exception e) {
@@ -300,7 +98,7 @@ public class DbTester extends ExternalResource {
public void executeDdl(String ddl) {
try (Connection connection = getConnection();
- Statement stmt = connection.createStatement()) {
+ Statement stmt = connection.createStatement()) {
stmt.execute(ddl);
} catch (SQLException e) {
throw new IllegalStateException("Failed to execute DDL: " + ddl, e);
@@ -339,10 +137,10 @@ public class DbTester extends ExternalResource {
}
String sql = "insert into " + table.toLowerCase(Locale.ENGLISH) + " (" +
- COMMA_JOINER.join(valuesByColumn.keySet()) +
- ") values (" +
- COMMA_JOINER.join(Collections.nCopies(valuesByColumn.size(), '?')) +
- ")";
+ COMMA_JOINER.join(valuesByColumn.keySet()) +
+ ") values (" +
+ COMMA_JOINER.join(Collections.nCopies(valuesByColumn.size(), '?')) +
+ ")";
executeUpdateSql(sql, valuesByColumn.values().toArray(new Object[valuesByColumn.size()]));
}
@@ -354,11 +152,7 @@ public class DbTester extends ExternalResource {
return countRowsOfTable(tableName, new NewConnectionSupplier());
}
- public int countRowsOfTable(DbSession dbSession, String tableName) {
- return countRowsOfTable(tableName, new DbSessionConnectionSupplier(dbSession));
- }
-
- private int countRowsOfTable(String tableName, ConnectionSupplier connectionSupplier) {
+ protected int countRowsOfTable(String tableName, ConnectionSupplier connectionSupplier) {
checkArgument(StringUtils.containsNone(tableName, " "), "Parameter must be the name of a table. Got " + tableName);
return countSql("select count(1) from " + tableName.toLowerCase(Locale.ENGLISH), connectionSupplier);
}
@@ -371,17 +165,13 @@ public class DbTester extends ExternalResource {
return countSql(sql, new NewConnectionSupplier());
}
- public int countSql(DbSession dbSession, String sql) {
- return countSql(sql, new DbSessionConnectionSupplier(dbSession));
- }
-
- private int countSql(String sql, ConnectionSupplier connectionSupplier) {
+ protected int countSql(String sql, ConnectionSupplier connectionSupplier) {
checkArgument(StringUtils.contains(sql, "count("),
- "Parameter must be a SQL request containing 'count(x)' function. Got " + sql);
+ "Parameter must be a SQL request containing 'count(x)' function. Got " + sql);
try (
- ConnectionSupplier supplier = connectionSupplier;
- PreparedStatement stmt = supplier.get().prepareStatement(sql);
- ResultSet rs = stmt.executeQuery()) {
+ ConnectionSupplier supplier = connectionSupplier;
+ PreparedStatement stmt = supplier.get().prepareStatement(sql);
+ ResultSet rs = stmt.executeQuery()) {
if (rs.next()) {
return rs.getInt(1);
}
@@ -396,15 +186,11 @@ public class DbTester extends ExternalResource {
return select(selectSql, new NewConnectionSupplier());
}
- public List<Map<String, Object>> select(DbSession dbSession, String selectSql) {
- return select(selectSql, new DbSessionConnectionSupplier(dbSession));
- }
-
- private List<Map<String, Object>> select(String selectSql, ConnectionSupplier connectionSupplier) {
+ protected List<Map<String, Object>> select(String selectSql, ConnectionSupplier connectionSupplier) {
try (
- ConnectionSupplier supplier = connectionSupplier;
- PreparedStatement stmt = supplier.get().prepareStatement(selectSql);
- ResultSet rs = stmt.executeQuery()) {
+ ConnectionSupplier supplier = connectionSupplier;
+ PreparedStatement stmt = supplier.get().prepareStatement(selectSql);
+ ResultSet rs = stmt.executeQuery()) {
return getHashMap(rs);
} catch (Exception e) {
throw new IllegalStateException("Fail to execute sql: " + selectSql, e);
@@ -415,11 +201,7 @@ public class DbTester extends ExternalResource {
return selectFirst(selectSql, new NewConnectionSupplier());
}
- public Map<String, Object> selectFirst(DbSession dbSession, String selectSql) {
- return selectFirst(selectSql, new DbSessionConnectionSupplier(dbSession));
- }
-
- private Map<String, Object> selectFirst(String selectSql, ConnectionSupplier connectionSupplier) {
+ protected Map<String, Object> selectFirst(String selectSql, ConnectionSupplier connectionSupplier) {
List<Map<String, Object>> rows = select(selectSql, connectionSupplier);
if (rows.isEmpty()) {
throw new IllegalStateException("No results for " + selectSql);
@@ -564,8 +346,8 @@ public class DbTester extends ExternalResource {
public void assertColumnDefinition(String table, String column, int expectedType, @Nullable Integer expectedSize, @Nullable Boolean isNullable) {
try (Connection connection = getConnection();
- PreparedStatement stmt = connection.prepareStatement("select * from " + table);
- ResultSet res = stmt.executeQuery()) {
+ PreparedStatement stmt = connection.prepareStatement("select * from " + table);
+ ResultSet res = stmt.executeQuery()) {
Integer columnIndex = getColumnIndex(res, column);
if (columnIndex == null) {
fail("The column '" + column + "' does not exist");
@@ -608,7 +390,7 @@ public class DbTester extends ExternalResource {
private void assertIndexImpl(String tableName, String indexName, boolean expectedUnique, String expectedColumn, String... expectedSecondaryColumns) {
try (Connection connection = getConnection();
- ResultSet rs = connection.getMetaData().getIndexInfo(null, null, tableName.toUpperCase(Locale.ENGLISH), false, false)) {
+ ResultSet rs = connection.getMetaData().getIndexInfo(null, null, tableName.toUpperCase(Locale.ENGLISH), false, false)) {
List<String> onColumns = new ArrayList<>();
while (rs.next()) {
if (indexName.equalsIgnoreCase(rs.getString("INDEX_NAME"))) {
@@ -628,7 +410,7 @@ public class DbTester extends ExternalResource {
*/
public void assertIndexDoesNotExist(String tableName, String indexName) {
try (Connection connection = getConnection();
- ResultSet rs = connection.getMetaData().getIndexInfo(null, null, tableName.toUpperCase(Locale.ENGLISH), false, false)) {
+ ResultSet rs = connection.getMetaData().getIndexInfo(null, null, tableName.toUpperCase(Locale.ENGLISH), false, false)) {
List<String> indices = new ArrayList<>();
while (rs.next()) {
indices.add(rs.getString("INDEX_NAME").toLowerCase(Locale.ENGLISH));
@@ -683,26 +465,6 @@ public class DbTester extends ExternalResource {
}
}
- private static class PK {
- @CheckForNull
- private final String name;
- private final List<String> columns;
-
- private PK(@Nullable String name, List<String> columns) {
- this.name = name;
- this.columns = ImmutableList.copyOf(columns);
- }
-
- @CheckForNull
- public String getName() {
- return name;
- }
-
- public List<String> getColumns() {
- return columns;
- }
- }
-
@CheckForNull
private Integer getColumnIndex(ResultSet res, String column) {
try {
@@ -743,16 +505,6 @@ public class DbTester extends ExternalResource {
}
}
- private void closeQuietly(@Nullable IDatabaseConnection connection) {
- try {
- if (connection != null) {
- connection.close();
- }
- } catch (SQLException e) {
- // ignore
- }
- }
-
public static RuntimeException translateException(String msg, Exception cause) {
RuntimeException runtimeException = new RuntimeException(String.format("%s: [%s] %s", msg, cause.getClass().getName(), cause.getMessage()));
runtimeException.setStackTrace(cause.getStackTrace());
@@ -767,13 +519,17 @@ public class DbTester extends ExternalResource {
}
}
- @Deprecated
- public MyBatis myBatis() {
- return db.getMyBatis();
+ private void closeQuietly(@Nullable IDatabaseConnection connection) {
+ try {
+ if (connection != null) {
+ connection.close();
+ }
+ } catch (SQLException e) {
+ // ignore
+ }
}
- @Deprecated
- public Connection openConnection() throws Exception {
+ public Connection openConnection() throws SQLException {
return getConnection();
}
@@ -781,7 +537,6 @@ public class DbTester extends ExternalResource {
return db.getDatabase().getDataSource().getConnection();
}
- @Deprecated
public Database database() {
return db.getDatabase();
}
@@ -793,28 +548,30 @@ public class DbTester extends ExternalResource {
/**
* An {@link AutoCloseable} supplier of {@link Connection}.
*/
- private interface ConnectionSupplier extends AutoCloseable {
+ protected interface ConnectionSupplier extends AutoCloseable {
Connection get() throws SQLException;
@Override
void close();
}
- private static class DbSessionConnectionSupplier implements ConnectionSupplier {
- private final DbSession dbSession;
+ private static class PK {
+ @CheckForNull
+ private final String name;
+ private final List<String> columns;
- public DbSessionConnectionSupplier(DbSession dbSession) {
- this.dbSession = dbSession;
+ private PK(@Nullable String name, List<String> columns) {
+ this.name = name;
+ this.columns = ImmutableList.copyOf(columns);
}
- @Override
- public Connection get() throws SQLException {
- return dbSession.getConnection();
+ @CheckForNull
+ public String getName() {
+ return name;
}
- @Override
- public void close() {
- // closing dbSession is not our responsability
+ public List<String> getColumns() {
+ return columns;
}
}
@@ -835,7 +592,7 @@ public class DbTester extends ExternalResource {
try {
this.connection.close();
} catch (SQLException e) {
- Loggers.get(DbTester.class).warn("Fail to close connection", e);
+ Loggers.get(CoreDbTester.class).warn("Fail to close connection", e);
// do not re-throw the exception
}
}
diff --git a/server/sonar-db-core/src/test/java/org/sonar/db/CoreDbTester.java b/server/sonar-db-core/src/test/java/org/sonar/db/CoreDbTester.java
new file mode 100644
index 00000000000..f2ac87ac736
--- /dev/null
+++ b/server/sonar-db-core/src/test/java/org/sonar/db/CoreDbTester.java
@@ -0,0 +1,57 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.sonar.db;
+
+import javax.annotation.Nullable;
+import org.apache.commons.lang.StringUtils;
+
+/**
+ * This class should be called using @Rule.
+ * Data is truncated between each tests. The schema is created between each test.
+ */
+public class CoreDbTester extends AbstractDbTester<CoreTestDb> {
+ private CoreDbTester(@Nullable String schemaPath) {
+ super(CoreTestDb.create(schemaPath));
+ }
+
+ public static CoreDbTester createForSchema(Class testClass, String filename) {
+ String path = StringUtils.replaceChars(testClass.getCanonicalName(), '.', '/');
+ String schemaPath = path + "/" + filename;
+ return new CoreDbTester(schemaPath);
+ }
+
+ public static CoreDbTester createEmpty() {
+ String path = StringUtils.replaceChars(CoreDbTester.class.getCanonicalName(), '.', '/');
+ String schemaPath = path + "/empty.sql";
+ return new CoreDbTester(schemaPath);
+ }
+
+ @Override
+ protected void before() throws Throwable {
+ db.start();
+ db.truncateTables();
+ }
+
+ @Override
+ protected void after() {
+ db.stop();
+ }
+
+}
diff --git a/sonar-db/src/test/java/org/sonar/db/TestDb.java b/server/sonar-db-core/src/test/java/org/sonar/db/CoreTestDb.java
index d19cb31fd16..bc5cd3cb6d4 100644
--- a/sonar-db/src/test/java/org/sonar/db/TestDb.java
+++ b/server/sonar-db-core/src/test/java/org/sonar/db/CoreTestDb.java
@@ -44,36 +44,31 @@ import org.sonar.db.dialect.H2;
import org.sonar.process.logging.LogbackHelper;
/**
- * This class should be call using @ClassRule in order to create the schema once (ft @Rule is used
+ * This class should be call using @ClassRule in order to create the schema once (if @Rule is used
* the schema will be recreated before each test).
- * Data will be truncated each time you call prepareDbUnit().
- * <p/>
- * File using {@link TestDb} must be annotated with {@link org.sonar.test.DbTests} so
- * that they can be executed on all supported DBs (Oracle, MySQL, ...).
*/
-class TestDb {
+class CoreTestDb {
- private static TestDb DEFAULT;
+ private static CoreTestDb DEFAULT;
- private static final Logger LOG = Loggers.get(TestDb.class);
+ private static final Logger LOG = Loggers.get(CoreTestDb.class);
private Database db;
private DatabaseCommands commands;
private IDatabaseTester tester;
- private MyBatis myBatis;
private boolean isDefault;
- static TestDb create(@Nullable String schemaPath) {
+ static CoreTestDb create(@Nullable String schemaPath) {
if (schemaPath == null) {
if (DEFAULT == null) {
- DEFAULT = new TestDb(null);
+ DEFAULT = new CoreTestDb(null);
}
return DEFAULT;
}
- return new TestDb(schemaPath);
+ return new CoreTestDb(schemaPath);
}
- private TestDb(@Nullable String schemaPath) {
+ CoreTestDb(@Nullable String schemaPath) {
if (db == null) {
Settings settings = new MapSettings().addProperties(System.getProperties());
if (settings.hasKey("orchestrator.configUrl")) {
@@ -105,11 +100,18 @@ class TestDb {
commands = DatabaseCommands.forDialect(db.getDialect());
tester = new DataSourceDatabaseTester(db.getDataSource(), commands.useLoginAsSchema() ? login : null);
- myBatis = new MyBatis(db);
- myBatis.start();
+ extendStart(db);
}
}
+ /**
+ * to be overridden by subclasses to extend what's done when db is created
+ * @param db
+ */
+ protected void extendStart(Database db) {
+ // nothing done here
+ }
+
public void start() {
if (!isDefault && !H2.ID.equals(db.getDialect().getId())) {
throw new AssumptionViolatedException("Test disabled because it supports only H2");
@@ -138,10 +140,6 @@ class TestDb {
return commands;
}
- MyBatis getMyBatis() {
- return myBatis;
- }
-
IDatabaseTester getDbUnitTester() {
return tester;
}
diff --git a/sonar-db/src/test/java/org/sonar/db/DatabaseCheckerTest.java b/server/sonar-db-core/src/test/java/org/sonar/db/DatabaseCheckerTest.java
index ebe2e86e4ba..ebe2e86e4ba 100644
--- a/sonar-db/src/test/java/org/sonar/db/DatabaseCheckerTest.java
+++ b/server/sonar-db-core/src/test/java/org/sonar/db/DatabaseCheckerTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/DatabaseCommands.java b/server/sonar-db-core/src/test/java/org/sonar/db/DatabaseCommands.java
index db10daec84c..db10daec84c 100644
--- a/sonar-db/src/test/java/org/sonar/db/DatabaseCommands.java
+++ b/server/sonar-db-core/src/test/java/org/sonar/db/DatabaseCommands.java
diff --git a/sonar-db/src/test/java/org/sonar/db/DatabaseUtilsTest.java b/server/sonar-db-core/src/test/java/org/sonar/db/DatabaseUtilsTest.java
index 17b38ae947d..d5855c87a2c 100644
--- a/sonar-db/src/test/java/org/sonar/db/DatabaseUtilsTest.java
+++ b/server/sonar-db-core/src/test/java/org/sonar/db/DatabaseUtilsTest.java
@@ -33,7 +33,6 @@ import javax.annotation.Nullable;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.utils.System2;
import org.sonar.api.utils.log.LogTester;
import org.sonar.api.utils.log.LoggerLevel;
import org.sonar.api.utils.log.Loggers;
@@ -47,16 +46,12 @@ import static org.assertj.core.api.Assertions.fail;
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
-import static org.sonar.db.DatabaseUtils.buildLikeValue;
import static org.sonar.db.DatabaseUtils.toUniqueAndSortedList;
-import static org.sonar.db.WildcardPosition.AFTER;
-import static org.sonar.db.WildcardPosition.BEFORE;
-import static org.sonar.db.WildcardPosition.BEFORE_AND_AFTER;
public class DatabaseUtilsTest {
@Rule
- public DbTester dbTester = DbTester.create(System2.INSTANCE);
+ public CoreDbTester dbTester = CoreDbTester.createForSchema(DatabaseUtilsTest.class, "just_one_table.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
@Rule
@@ -319,16 +314,6 @@ public class DatabaseUtilsTest {
}
@Test
- public void buildLikeValue_with_special_characters() {
- String escapedValue = "like-\\/_/%//-value";
- String wildcard = "%";
-
- assertThat(buildLikeValue("like-\\_%/-value", BEFORE)).isEqualTo(wildcard + escapedValue);
- assertThat(buildLikeValue("like-\\_%/-value", AFTER)).isEqualTo(escapedValue + wildcard);
- assertThat(buildLikeValue("like-\\_%/-value", BEFORE_AND_AFTER)).isEqualTo(wildcard + escapedValue + wildcard);
- }
-
- @Test
public void tableExists_returns_true_if_table_is_referenced_in_db_metadata() throws Exception {
try (Connection connection = dbTester.openConnection()) {
assertThat(DatabaseUtils.tableExists("SCHEMA_MIGRATIONS", connection)).isTrue();
diff --git a/sonar-db/src/test/java/org/sonar/db/DdlUtilsTest.java b/server/sonar-db-core/src/test/java/org/sonar/db/DdlUtilsTest.java
index 68f64dbf321..68f64dbf321 100644
--- a/sonar-db/src/test/java/org/sonar/db/DdlUtilsTest.java
+++ b/server/sonar-db-core/src/test/java/org/sonar/db/DdlUtilsTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/DefaultDatabaseTest.java b/server/sonar-db-core/src/test/java/org/sonar/db/DefaultDatabaseTest.java
index 1ffc411cb44..1ffc411cb44 100644
--- a/sonar-db/src/test/java/org/sonar/db/DefaultDatabaseTest.java
+++ b/server/sonar-db-core/src/test/java/org/sonar/db/DefaultDatabaseTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/H2Database.java b/server/sonar-db-core/src/test/java/org/sonar/db/H2Database.java
index a6854973bd7..a6854973bd7 100644
--- a/sonar-db/src/test/java/org/sonar/db/H2Database.java
+++ b/server/sonar-db-core/src/test/java/org/sonar/db/H2Database.java
diff --git a/sonar-db/src/test/java/org/sonar/db/H2DatabaseTest.java b/server/sonar-db-core/src/test/java/org/sonar/db/H2DatabaseTest.java
index c4cb43011d6..c4cb43011d6 100644
--- a/sonar-db/src/test/java/org/sonar/db/H2DatabaseTest.java
+++ b/server/sonar-db-core/src/test/java/org/sonar/db/H2DatabaseTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/ResultSetIteratorTest.java b/server/sonar-db-core/src/test/java/org/sonar/db/ResultSetIteratorTest.java
index b6454070f1a..19a9e7089ae 100644
--- a/sonar-db/src/test/java/org/sonar/db/ResultSetIteratorTest.java
+++ b/server/sonar-db-core/src/test/java/org/sonar/db/ResultSetIteratorTest.java
@@ -35,7 +35,7 @@ import static org.junit.Assert.fail;
public class ResultSetIteratorTest {
@Rule
- public DbTester dbTester = DbTester.createForSchema(System2.INSTANCE, ResultSetIteratorTest.class, "schema.sql");
+ public CoreDbTester dbTester = CoreDbTester.createForSchema(ResultSetIteratorTest.class, "schema.sql");
@Test
public void create_iterator_from_statement() throws Exception {
diff --git a/sonar-db/src/test/java/org/sonar/db/dialect/DialectUtilsTest.java b/server/sonar-db-core/src/test/java/org/sonar/db/dialect/DialectUtilsTest.java
index 57aaa9132ce..57aaa9132ce 100644
--- a/sonar-db/src/test/java/org/sonar/db/dialect/DialectUtilsTest.java
+++ b/server/sonar-db-core/src/test/java/org/sonar/db/dialect/DialectUtilsTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/dialect/H2Test.java b/server/sonar-db-core/src/test/java/org/sonar/db/dialect/H2Test.java
index 93249a6d59c..93249a6d59c 100644
--- a/sonar-db/src/test/java/org/sonar/db/dialect/H2Test.java
+++ b/server/sonar-db-core/src/test/java/org/sonar/db/dialect/H2Test.java
diff --git a/sonar-db/src/test/java/org/sonar/db/dialect/MsSqlTest.java b/server/sonar-db-core/src/test/java/org/sonar/db/dialect/MsSqlTest.java
index 0b03fa6bc0f..0b03fa6bc0f 100644
--- a/sonar-db/src/test/java/org/sonar/db/dialect/MsSqlTest.java
+++ b/server/sonar-db-core/src/test/java/org/sonar/db/dialect/MsSqlTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/dialect/MySqlTest.java b/server/sonar-db-core/src/test/java/org/sonar/db/dialect/MySqlTest.java
index e191124a9ed..e191124a9ed 100644
--- a/sonar-db/src/test/java/org/sonar/db/dialect/MySqlTest.java
+++ b/server/sonar-db-core/src/test/java/org/sonar/db/dialect/MySqlTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/dialect/OracleTest.java b/server/sonar-db-core/src/test/java/org/sonar/db/dialect/OracleTest.java
index 6b3698a6e2e..6b3698a6e2e 100644
--- a/sonar-db/src/test/java/org/sonar/db/dialect/OracleTest.java
+++ b/server/sonar-db-core/src/test/java/org/sonar/db/dialect/OracleTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/dialect/PostgreSqlTest.java b/server/sonar-db-core/src/test/java/org/sonar/db/dialect/PostgreSqlTest.java
index c42c50d7db5..c42c50d7db5 100644
--- a/sonar-db/src/test/java/org/sonar/db/dialect/PostgreSqlTest.java
+++ b/server/sonar-db-core/src/test/java/org/sonar/db/dialect/PostgreSqlTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/profiling/InvocationUtilsTest.java b/server/sonar-db-core/src/test/java/org/sonar/db/profiling/InvocationUtilsTest.java
index 708c24f221a..708c24f221a 100644
--- a/sonar-db/src/test/java/org/sonar/db/profiling/InvocationUtilsTest.java
+++ b/server/sonar-db-core/src/test/java/org/sonar/db/profiling/InvocationUtilsTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/profiling/ProfiledDataSourceTest.java b/server/sonar-db-core/src/test/java/org/sonar/db/profiling/ProfiledDataSourceTest.java
index 3f0a29e0dea..3f0a29e0dea 100644
--- a/sonar-db/src/test/java/org/sonar/db/profiling/ProfiledDataSourceTest.java
+++ b/server/sonar-db-core/src/test/java/org/sonar/db/profiling/ProfiledDataSourceTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/profiling/SqlLogFormatterTest.java b/server/sonar-db-core/src/test/java/org/sonar/db/profiling/SqlLogFormatterTest.java
index c3f6f528c01..c3f6f528c01 100644
--- a/sonar-db/src/test/java/org/sonar/db/profiling/SqlLogFormatterTest.java
+++ b/server/sonar-db-core/src/test/java/org/sonar/db/profiling/SqlLogFormatterTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/semaphore/SemaphoresImplTest.java b/server/sonar-db-core/src/test/java/org/sonar/db/semaphore/SemaphoresImplTest.java
index e83b1c608a7..e83b1c608a7 100644
--- a/sonar-db/src/test/java/org/sonar/db/semaphore/SemaphoresImplTest.java
+++ b/server/sonar-db-core/src/test/java/org/sonar/db/semaphore/SemaphoresImplTest.java
diff --git a/sonar-db/src/test/resources/logback-test.xml b/server/sonar-db-core/src/test/resources/logback-test.xml
index 4b0ff6da04b..4b0ff6da04b 100644
--- a/sonar-db/src/test/resources/logback-test.xml
+++ b/server/sonar-db-core/src/test/resources/logback-test.xml
diff --git a/server/sonar-db-core/src/test/resources/org/sonar/db/CoreDbTester/empty.sql b/server/sonar-db-core/src/test/resources/org/sonar/db/CoreDbTester/empty.sql
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/server/sonar-db-core/src/test/resources/org/sonar/db/CoreDbTester/empty.sql
diff --git a/server/sonar-db-core/src/test/resources/org/sonar/db/DatabaseUtilsTest/just_one_table.sql b/server/sonar-db-core/src/test/resources/org/sonar/db/DatabaseUtilsTest/just_one_table.sql
new file mode 100644
index 00000000000..a1019056ef5
--- /dev/null
+++ b/server/sonar-db-core/src/test/resources/org/sonar/db/DatabaseUtilsTest/just_one_table.sql
@@ -0,0 +1,3 @@
+CREATE TABLE "SCHEMA_MIGRATIONS" (
+ "VERSION" VARCHAR(256) NOT NULL
+);
diff --git a/sonar-db/src/test/resources/org/sonar/db/ResultSetIteratorTest/feed.xml b/server/sonar-db-core/src/test/resources/org/sonar/db/ResultSetIteratorTest/feed.xml
index e76d538413e..e76d538413e 100644
--- a/sonar-db/src/test/resources/org/sonar/db/ResultSetIteratorTest/feed.xml
+++ b/server/sonar-db-core/src/test/resources/org/sonar/db/ResultSetIteratorTest/feed.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/ResultSetIteratorTest/schema.sql b/server/sonar-db-core/src/test/resources/org/sonar/db/ResultSetIteratorTest/schema.sql
index 333bb0e193e..333bb0e193e 100644
--- a/sonar-db/src/test/resources/org/sonar/db/ResultSetIteratorTest/schema.sql
+++ b/server/sonar-db-core/src/test/resources/org/sonar/db/ResultSetIteratorTest/schema.sql
diff --git a/server/sonar-db-dao/pom.xml b/server/sonar-db-dao/pom.xml
new file mode 100644
index 00000000000..549c13ad181
--- /dev/null
+++ b/server/sonar-db-dao/pom.xml
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.sonarsource.sonarqube</groupId>
+ <artifactId>server</artifactId>
+ <version>6.4-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>sonar-db-dao</artifactId>
+
+ <name>SonarQube :: DAO</name>
+ <description>DAO layer for SonarQube</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.sonarsource.sonarqube</groupId>
+ <artifactId>sonar-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.sonarsource.sonarqube</groupId>
+ <artifactId>sonar-db-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.sonarsource.sonarqube</groupId>
+ <artifactId>sonar-db-migration</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.google.code.findbugs</groupId>
+ <artifactId>jsr305</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- tests -->
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>sonar-testing-harness</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>sonar-db-core</artifactId>
+ <version>${project.version}</version>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.dbunit</groupId>
+ <artifactId>dbunit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.h2database</groupId>
+ <artifactId>h2</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>${skipServerTests}</skipTests>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ </profiles>
+</project>
diff --git a/sonar-db/src/main/java/org/sonar/core/permission/GlobalPermissions.java b/server/sonar-db-dao/src/main/java/org/sonar/core/permission/GlobalPermissions.java
index 8e14f02fc56..8e14f02fc56 100644
--- a/sonar-db/src/main/java/org/sonar/core/permission/GlobalPermissions.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/core/permission/GlobalPermissions.java
diff --git a/sonar-db/src/main/java/org/sonar/core/permission/ProjectPermissions.java b/server/sonar-db-dao/src/main/java/org/sonar/core/permission/ProjectPermissions.java
index 6a4fb1f455d..6a4fb1f455d 100644
--- a/sonar-db/src/main/java/org/sonar/core/permission/ProjectPermissions.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/core/permission/ProjectPermissions.java
diff --git a/sonar-db/src/main/java/org/sonar/core/permission/package-info.java b/server/sonar-db-dao/src/main/java/org/sonar/core/permission/package-info.java
index ea30da9a906..ea30da9a906 100644
--- a/sonar-db/src/main/java/org/sonar/core/permission/package-info.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/core/permission/package-info.java
diff --git a/sonar-db/src/main/java/org/sonar/core/persistence/MyBatis.java b/server/sonar-db-dao/src/main/java/org/sonar/core/persistence/MyBatis.java
index 30dd26c8bac..30dd26c8bac 100644
--- a/sonar-db/src/main/java/org/sonar/core/persistence/MyBatis.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/core/persistence/MyBatis.java
diff --git a/sonar-db/src/main/java/org/sonar/core/persistence/package-info.java b/server/sonar-db-dao/src/main/java/org/sonar/core/persistence/package-info.java
index 8916a0963ed..8916a0963ed 100644
--- a/sonar-db/src/main/java/org/sonar/core/persistence/package-info.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/core/persistence/package-info.java
diff --git a/sonar-db/src/main/java/org/sonar/core/properties/PropertiesDao.java b/server/sonar-db-dao/src/main/java/org/sonar/core/properties/PropertiesDao.java
index 4572b9b55a7..4572b9b55a7 100644
--- a/sonar-db/src/main/java/org/sonar/core/properties/PropertiesDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/core/properties/PropertiesDao.java
diff --git a/sonar-db/src/main/java/org/sonar/core/properties/PropertyDto.java b/server/sonar-db-dao/src/main/java/org/sonar/core/properties/PropertyDto.java
index 2b20b2a2752..2b20b2a2752 100644
--- a/sonar-db/src/main/java/org/sonar/core/properties/PropertyDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/core/properties/PropertyDto.java
diff --git a/sonar-db/src/main/java/org/sonar/core/properties/package-info.java b/server/sonar-db-dao/src/main/java/org/sonar/core/properties/package-info.java
index e8e5c0d4149..e8e5c0d4149 100644
--- a/sonar-db/src/main/java/org/sonar/core/properties/package-info.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/core/properties/package-info.java
diff --git a/sonar-db/src/main/java/org/sonar/db/BatchSession.java b/server/sonar-db-dao/src/main/java/org/sonar/db/BatchSession.java
index 1e9d37a8176..1e9d37a8176 100644
--- a/sonar-db/src/main/java/org/sonar/db/BatchSession.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/BatchSession.java
diff --git a/sonar-db/src/main/java/org/sonar/db/Dao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/Dao.java
index 647d5b09989..647d5b09989 100644
--- a/sonar-db/src/main/java/org/sonar/db/Dao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/Dao.java
diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/DaoDatabaseUtils.java b/server/sonar-db-dao/src/main/java/org/sonar/db/DaoDatabaseUtils.java
new file mode 100644
index 00000000000..34adb733165
--- /dev/null
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/DaoDatabaseUtils.java
@@ -0,0 +1,59 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.sonar.db;
+
+public class DaoDatabaseUtils extends DatabaseUtils {
+
+ /**
+ * Returns an escaped value in parameter, with the desired wildcards. Suitable to be used in a like sql query<br />
+ * Escapes the "/", "%" and "_" characters.<br/>
+ *
+ * You <strong>must</strong> add "ESCAPE '/'" after your like query. It defines '/' as the escape character.
+ */
+ public static String buildLikeValue(String value, WildcardPosition wildcardPosition) {
+ String escapedValue = escapePercentAndUnderscore(value);
+ String wildcard = "%";
+ switch (wildcardPosition) {
+ case BEFORE:
+ escapedValue = wildcard + escapedValue;
+ break;
+ case AFTER:
+ escapedValue += wildcard;
+ break;
+ case BEFORE_AND_AFTER:
+ escapedValue = wildcard + escapedValue + wildcard;
+ break;
+ default:
+ throw new UnsupportedOperationException("Unhandled WildcardPosition: " + wildcardPosition);
+ }
+
+ return escapedValue;
+ }
+
+ /**
+ * Replace escape percent and underscore by adding a slash just before
+ */
+ private static String escapePercentAndUnderscore(String value) {
+ return value
+ .replaceAll("/", "//")
+ .replaceAll("%", "/%")
+ .replaceAll("_", "/_");
+ }
+}
diff --git a/sonar-db/src/main/java/org/sonar/db/DaoModule.java b/server/sonar-db-dao/src/main/java/org/sonar/db/DaoModule.java
index b088950c1bd..b088950c1bd 100644
--- a/sonar-db/src/main/java/org/sonar/db/DaoModule.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/DaoModule.java
diff --git a/sonar-db/src/main/java/org/sonar/db/DbClient.java b/server/sonar-db-dao/src/main/java/org/sonar/db/DbClient.java
index 24dc5dfea8b..24dc5dfea8b 100644
--- a/sonar-db/src/main/java/org/sonar/db/DbClient.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/DbClient.java
diff --git a/sonar-db/src/main/java/org/sonar/db/DbSession.java b/server/sonar-db-dao/src/main/java/org/sonar/db/DbSession.java
index a53493d3801..a53493d3801 100644
--- a/sonar-db/src/main/java/org/sonar/db/DbSession.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/DbSession.java
diff --git a/sonar-db/src/main/java/org/sonar/db/Dto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/Dto.java
index 8a6d2ff11a8..8a6d2ff11a8 100644
--- a/sonar-db/src/main/java/org/sonar/db/Dto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/Dto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/IsAliveMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/IsAliveMapper.java
index 90ac50ea2fe..90ac50ea2fe 100644
--- a/sonar-db/src/main/java/org/sonar/db/IsAliveMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/IsAliveMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/MyBatis.java b/server/sonar-db-dao/src/main/java/org/sonar/db/MyBatis.java
index 08eee68aafc..08eee68aafc 100644
--- a/sonar-db/src/main/java/org/sonar/db/MyBatis.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/MyBatis.java
diff --git a/sonar-db/src/main/java/org/sonar/db/MyBatisConfBuilder.java b/server/sonar-db-dao/src/main/java/org/sonar/db/MyBatisConfBuilder.java
index 2dd2f2918cf..2dd2f2918cf 100644
--- a/sonar-db/src/main/java/org/sonar/db/MyBatisConfBuilder.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/MyBatisConfBuilder.java
diff --git a/sonar-db/src/main/java/org/sonar/db/SQXMLMapperBuilder.java b/server/sonar-db-dao/src/main/java/org/sonar/db/SQXMLMapperBuilder.java
index 690ba2cfcf4..690ba2cfcf4 100644
--- a/sonar-db/src/main/java/org/sonar/db/SQXMLMapperBuilder.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/SQXMLMapperBuilder.java
diff --git a/sonar-db/src/main/java/org/sonar/db/WildcardPosition.java b/server/sonar-db-dao/src/main/java/org/sonar/db/WildcardPosition.java
index 7269f089ce2..7269f089ce2 100644
--- a/sonar-db/src/main/java/org/sonar/db/WildcardPosition.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/WildcardPosition.java
diff --git a/sonar-db/src/main/java/org/sonar/db/ce/CeActivityDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/ce/CeActivityDao.java
index a0dc3ee387e..a0dc3ee387e 100644
--- a/sonar-db/src/main/java/org/sonar/db/ce/CeActivityDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/ce/CeActivityDao.java
diff --git a/sonar-db/src/main/java/org/sonar/db/ce/CeActivityDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/ce/CeActivityDto.java
index 67dcc2b376c..67dcc2b376c 100644
--- a/sonar-db/src/main/java/org/sonar/db/ce/CeActivityDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/ce/CeActivityDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/ce/CeActivityMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/ce/CeActivityMapper.java
index e8838e782f2..e8838e782f2 100644
--- a/sonar-db/src/main/java/org/sonar/db/ce/CeActivityMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/ce/CeActivityMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/ce/CeQueueDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/ce/CeQueueDao.java
index d494515230e..d494515230e 100644
--- a/sonar-db/src/main/java/org/sonar/db/ce/CeQueueDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/ce/CeQueueDao.java
diff --git a/sonar-db/src/main/java/org/sonar/db/ce/CeQueueDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/ce/CeQueueDto.java
index d39b730e30c..d39b730e30c 100644
--- a/sonar-db/src/main/java/org/sonar/db/ce/CeQueueDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/ce/CeQueueDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/ce/CeQueueMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/ce/CeQueueMapper.java
index e3556a9e05a..e3556a9e05a 100644
--- a/sonar-db/src/main/java/org/sonar/db/ce/CeQueueMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/ce/CeQueueMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/ce/CeScannerContextDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/ce/CeScannerContextDao.java
index 2bdf88965a4..2bdf88965a4 100644
--- a/sonar-db/src/main/java/org/sonar/db/ce/CeScannerContextDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/ce/CeScannerContextDao.java
diff --git a/sonar-db/src/main/java/org/sonar/db/ce/CeScannerContextMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/ce/CeScannerContextMapper.java
index 9d116d17a28..9d116d17a28 100644
--- a/sonar-db/src/main/java/org/sonar/db/ce/CeScannerContextMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/ce/CeScannerContextMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/ce/CeTaskInputDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/ce/CeTaskInputDao.java
index 3593db1e9d7..3593db1e9d7 100644
--- a/sonar-db/src/main/java/org/sonar/db/ce/CeTaskInputDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/ce/CeTaskInputDao.java
diff --git a/sonar-db/src/main/java/org/sonar/db/ce/CeTaskInputMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/ce/CeTaskInputMapper.java
index 80ed6ce39f3..80ed6ce39f3 100644
--- a/sonar-db/src/main/java/org/sonar/db/ce/CeTaskInputMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/ce/CeTaskInputMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/ce/CeTaskQuery.java b/server/sonar-db-dao/src/main/java/org/sonar/db/ce/CeTaskQuery.java
index 3598144db19..3598144db19 100644
--- a/sonar-db/src/main/java/org/sonar/db/ce/CeTaskQuery.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/ce/CeTaskQuery.java
diff --git a/sonar-db/src/main/java/org/sonar/db/ce/CeTaskTypes.java b/server/sonar-db-dao/src/main/java/org/sonar/db/ce/CeTaskTypes.java
index 69fd2afc00d..69fd2afc00d 100644
--- a/sonar-db/src/main/java/org/sonar/db/ce/CeTaskTypes.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/ce/CeTaskTypes.java
diff --git a/sonar-db/src/main/java/org/sonar/db/ce/LogsIteratorInputStream.java b/server/sonar-db-dao/src/main/java/org/sonar/db/ce/LogsIteratorInputStream.java
index 57914414443..57914414443 100644
--- a/sonar-db/src/main/java/org/sonar/db/ce/LogsIteratorInputStream.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/ce/LogsIteratorInputStream.java
diff --git a/sonar-db/src/main/java/org/sonar/db/ce/package-info.java b/server/sonar-db-dao/src/main/java/org/sonar/db/ce/package-info.java
index e92e18cd0a2..e92e18cd0a2 100644
--- a/sonar-db/src/main/java/org/sonar/db/ce/package-info.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/ce/package-info.java
diff --git a/sonar-db/src/main/java/org/sonar/db/component/ComponentDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentDao.java
index 58d9ecea350..c1f85e478de 100644
--- a/sonar-db/src/main/java/org/sonar/db/component/ComponentDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentDao.java
@@ -42,9 +42,9 @@ import static com.google.common.base.Preconditions.checkArgument;
import static java.util.Collections.emptyList;
import static java.util.Objects.requireNonNull;
import static org.apache.commons.lang.StringUtils.isBlank;
-import static org.sonar.db.DatabaseUtils.buildLikeValue;
-import static org.sonar.db.DatabaseUtils.executeLargeInputs;
-import static org.sonar.db.DatabaseUtils.executeLargeUpdates;
+import static org.sonar.db.DaoDatabaseUtils.buildLikeValue;
+import static org.sonar.db.DaoDatabaseUtils.executeLargeInputs;
+import static org.sonar.db.DaoDatabaseUtils.executeLargeUpdates;
import static org.sonar.db.WildcardPosition.BEFORE_AND_AFTER;
public class ComponentDao implements Dao {
diff --git a/sonar-db/src/main/java/org/sonar/db/component/ComponentDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentDto.java
index 959d0a38381..959d0a38381 100644
--- a/sonar-db/src/main/java/org/sonar/db/component/ComponentDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/component/ComponentDtoWithSnapshotId.java b/server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentDtoWithSnapshotId.java
index 64517022943..64517022943 100644
--- a/sonar-db/src/main/java/org/sonar/db/component/ComponentDtoWithSnapshotId.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentDtoWithSnapshotId.java
diff --git a/sonar-db/src/main/java/org/sonar/db/component/ComponentKeyUpdaterDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentKeyUpdaterDao.java
index 5ca05d074cd..5ca05d074cd 100644
--- a/sonar-db/src/main/java/org/sonar/db/component/ComponentKeyUpdaterDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentKeyUpdaterDao.java
diff --git a/sonar-db/src/main/java/org/sonar/db/component/ComponentKeyUpdaterMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentKeyUpdaterMapper.java
index 5f042d12070..5f042d12070 100644
--- a/sonar-db/src/main/java/org/sonar/db/component/ComponentKeyUpdaterMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentKeyUpdaterMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/component/ComponentLinkDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentLinkDao.java
index dbc50a39584..dbc50a39584 100644
--- a/sonar-db/src/main/java/org/sonar/db/component/ComponentLinkDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentLinkDao.java
diff --git a/sonar-db/src/main/java/org/sonar/db/component/ComponentLinkDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentLinkDto.java
index 7ef034ab05d..7ef034ab05d 100644
--- a/sonar-db/src/main/java/org/sonar/db/component/ComponentLinkDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentLinkDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/component/ComponentLinkMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentLinkMapper.java
index f3b2653a660..f3b2653a660 100644
--- a/sonar-db/src/main/java/org/sonar/db/component/ComponentLinkMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentLinkMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/component/ComponentMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentMapper.java
index 1dbcc9bea8e..1dbcc9bea8e 100644
--- a/sonar-db/src/main/java/org/sonar/db/component/ComponentMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/component/ComponentQuery.java b/server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentQuery.java
index 17764ae0834..f5e6df3a26a 100644
--- a/sonar-db/src/main/java/org/sonar/db/component/ComponentQuery.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentQuery.java
@@ -26,7 +26,7 @@ import javax.annotation.Nullable;
import org.sonar.db.WildcardPosition;
import static com.google.common.base.Preconditions.checkArgument;
-import static org.sonar.db.DatabaseUtils.buildLikeValue;
+import static org.sonar.db.DaoDatabaseUtils.buildLikeValue;
public class ComponentQuery {
private final String nameOrKeyQuery;
diff --git a/sonar-db/src/main/java/org/sonar/db/component/ComponentTreeQuery.java b/server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentTreeQuery.java
index 69d02d9eb33..6119f3cb9ae 100644
--- a/sonar-db/src/main/java/org/sonar/db/component/ComponentTreeQuery.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentTreeQuery.java
@@ -28,7 +28,7 @@ import org.sonar.db.WildcardPosition;
import static com.google.common.collect.Lists.newArrayList;
import static java.util.Objects.requireNonNull;
-import static org.sonar.db.DatabaseUtils.buildLikeValue;
+import static org.sonar.db.DaoDatabaseUtils.buildLikeValue;
import static org.sonar.db.WildcardPosition.BEFORE_AND_AFTER;
public class ComponentTreeQuery {
diff --git a/sonar-db/src/main/java/org/sonar/db/component/ComponentUpdateDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentUpdateDto.java
index e2e6aac13ca..e2e6aac13ca 100644
--- a/sonar-db/src/main/java/org/sonar/db/component/ComponentUpdateDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentUpdateDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/component/ComponentValidator.java b/server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentValidator.java
index e5c66883d72..e5c66883d72 100644
--- a/sonar-db/src/main/java/org/sonar/db/component/ComponentValidator.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentValidator.java
diff --git a/sonar-db/src/main/java/org/sonar/db/component/FilePathWithHashDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/component/FilePathWithHashDto.java
index 5893c3e544d..5893c3e544d 100644
--- a/sonar-db/src/main/java/org/sonar/db/component/FilePathWithHashDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/component/FilePathWithHashDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/component/ResourceDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/component/ResourceDao.java
index 70c84928174..70c84928174 100644
--- a/sonar-db/src/main/java/org/sonar/db/component/ResourceDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/component/ResourceDao.java
diff --git a/sonar-db/src/main/java/org/sonar/db/component/ResourceDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/component/ResourceDto.java
index 0fc5e2415b8..0fc5e2415b8 100644
--- a/sonar-db/src/main/java/org/sonar/db/component/ResourceDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/component/ResourceDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/component/ResourceMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/component/ResourceMapper.java
index 06bc63393c9..06bc63393c9 100644
--- a/sonar-db/src/main/java/org/sonar/db/component/ResourceMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/component/ResourceMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/component/SnapshotDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/component/SnapshotDao.java
index 15409db9997..15409db9997 100644
--- a/sonar-db/src/main/java/org/sonar/db/component/SnapshotDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/component/SnapshotDao.java
diff --git a/sonar-db/src/main/java/org/sonar/db/component/SnapshotDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/component/SnapshotDto.java
index e326b4da511..e326b4da511 100644
--- a/sonar-db/src/main/java/org/sonar/db/component/SnapshotDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/component/SnapshotDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/component/SnapshotMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/component/SnapshotMapper.java
index 60f979748d5..60f979748d5 100644
--- a/sonar-db/src/main/java/org/sonar/db/component/SnapshotMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/component/SnapshotMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/component/SnapshotQuery.java b/server/sonar-db-dao/src/main/java/org/sonar/db/component/SnapshotQuery.java
index 6464c6dd120..6464c6dd120 100644
--- a/sonar-db/src/main/java/org/sonar/db/component/SnapshotQuery.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/component/SnapshotQuery.java
diff --git a/sonar-db/src/main/java/org/sonar/db/component/UuidWithProjectUuidDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/component/UuidWithProjectUuidDto.java
index ff6b6e4af39..ff6b6e4af39 100644
--- a/sonar-db/src/main/java/org/sonar/db/component/UuidWithProjectUuidDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/component/UuidWithProjectUuidDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/component/ViewsSnapshotDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/component/ViewsSnapshotDto.java
index 11db59068ef..11db59068ef 100644
--- a/sonar-db/src/main/java/org/sonar/db/component/ViewsSnapshotDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/component/ViewsSnapshotDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/component/package-info.java b/server/sonar-db-dao/src/main/java/org/sonar/db/component/package-info.java
index 41329cf7154..41329cf7154 100644
--- a/sonar-db/src/main/java/org/sonar/db/component/package-info.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/component/package-info.java
diff --git a/sonar-db/src/main/java/org/sonar/db/debt/RequirementMigrationDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/debt/RequirementMigrationDto.java
index 091fa0fc778..091fa0fc778 100644
--- a/sonar-db/src/main/java/org/sonar/db/debt/RequirementMigrationDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/debt/RequirementMigrationDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/debt/package-info.java b/server/sonar-db-dao/src/main/java/org/sonar/db/debt/package-info.java
index 7e9c4a9cb33..7e9c4a9cb33 100644
--- a/sonar-db/src/main/java/org/sonar/db/debt/package-info.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/debt/package-info.java
diff --git a/sonar-db/src/main/java/org/sonar/db/duplication/DuplicationDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/duplication/DuplicationDao.java
index 8883f303e03..8883f303e03 100644
--- a/sonar-db/src/main/java/org/sonar/db/duplication/DuplicationDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/duplication/DuplicationDao.java
diff --git a/sonar-db/src/main/java/org/sonar/db/duplication/DuplicationMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/duplication/DuplicationMapper.java
index 8edec655644..8edec655644 100644
--- a/sonar-db/src/main/java/org/sonar/db/duplication/DuplicationMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/duplication/DuplicationMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/duplication/DuplicationUnitDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/duplication/DuplicationUnitDto.java
index 8754d3540f8..8754d3540f8 100644
--- a/sonar-db/src/main/java/org/sonar/db/duplication/DuplicationUnitDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/duplication/DuplicationUnitDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/duplication/package-info.java b/server/sonar-db-dao/src/main/java/org/sonar/db/duplication/package-info.java
index a04d60231c9..a04d60231c9 100644
--- a/sonar-db/src/main/java/org/sonar/db/duplication/package-info.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/duplication/package-info.java
diff --git a/sonar-db/src/main/java/org/sonar/db/event/EventDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/event/EventDao.java
index c1414d33b01..c1414d33b01 100644
--- a/sonar-db/src/main/java/org/sonar/db/event/EventDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/event/EventDao.java
diff --git a/sonar-db/src/main/java/org/sonar/db/event/EventDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/event/EventDto.java
index 7ca49964351..7ca49964351 100644
--- a/sonar-db/src/main/java/org/sonar/db/event/EventDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/event/EventDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/event/EventMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/event/EventMapper.java
index 121e86a4ae3..121e86a4ae3 100644
--- a/sonar-db/src/main/java/org/sonar/db/event/EventMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/event/EventMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/event/EventValidator.java b/server/sonar-db-dao/src/main/java/org/sonar/db/event/EventValidator.java
index 278ca7e6e62..278ca7e6e62 100644
--- a/sonar-db/src/main/java/org/sonar/db/event/EventValidator.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/event/EventValidator.java
diff --git a/sonar-db/src/main/java/org/sonar/db/event/package-info.java b/server/sonar-db-dao/src/main/java/org/sonar/db/event/package-info.java
index 7b9f716263c..7b9f716263c 100644
--- a/sonar-db/src/main/java/org/sonar/db/event/package-info.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/event/package-info.java
diff --git a/sonar-db/src/main/java/org/sonar/db/issue/IssueChangeDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueChangeDao.java
index 79423e9f79d..79423e9f79d 100644
--- a/sonar-db/src/main/java/org/sonar/db/issue/IssueChangeDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueChangeDao.java
diff --git a/sonar-db/src/main/java/org/sonar/db/issue/IssueChangeDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueChangeDto.java
index 53f2ebda604..53f2ebda604 100644
--- a/sonar-db/src/main/java/org/sonar/db/issue/IssueChangeDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueChangeDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/issue/IssueChangeMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueChangeMapper.java
index 1d6db5b2994..1d6db5b2994 100644
--- a/sonar-db/src/main/java/org/sonar/db/issue/IssueChangeMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueChangeMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/issue/IssueDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueDao.java
index 4555aad7e3e..4555aad7e3e 100644
--- a/sonar-db/src/main/java/org/sonar/db/issue/IssueDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueDao.java
diff --git a/sonar-db/src/main/java/org/sonar/db/issue/IssueDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueDto.java
index 8133ab289e2..8133ab289e2 100644
--- a/sonar-db/src/main/java/org/sonar/db/issue/IssueDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/issue/IssueMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueMapper.java
index 58934e4d50f..58934e4d50f 100644
--- a/sonar-db/src/main/java/org/sonar/db/issue/IssueMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/issue/IssueTesting.java b/server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueTesting.java
index 748d3bb8b02..748d3bb8b02 100644
--- a/sonar-db/src/main/java/org/sonar/db/issue/IssueTesting.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueTesting.java
diff --git a/sonar-db/src/main/java/org/sonar/db/issue/package-info.java b/server/sonar-db-dao/src/main/java/org/sonar/db/issue/package-info.java
index 844358c2030..844358c2030 100644
--- a/sonar-db/src/main/java/org/sonar/db/issue/package-info.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/issue/package-info.java
diff --git a/sonar-db/src/main/java/org/sonar/db/loadedtemplate/LoadedTemplateDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/loadedtemplate/LoadedTemplateDao.java
index d72b5507918..d72b5507918 100644
--- a/sonar-db/src/main/java/org/sonar/db/loadedtemplate/LoadedTemplateDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/loadedtemplate/LoadedTemplateDao.java
diff --git a/sonar-db/src/main/java/org/sonar/db/loadedtemplate/LoadedTemplateDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/loadedtemplate/LoadedTemplateDto.java
index 0fecf4d728e..0fecf4d728e 100644
--- a/sonar-db/src/main/java/org/sonar/db/loadedtemplate/LoadedTemplateDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/loadedtemplate/LoadedTemplateDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/loadedtemplate/LoadedTemplateMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/loadedtemplate/LoadedTemplateMapper.java
index 20b5f278eee..20b5f278eee 100644
--- a/sonar-db/src/main/java/org/sonar/db/loadedtemplate/LoadedTemplateMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/loadedtemplate/LoadedTemplateMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/loadedtemplate/package-info.java b/server/sonar-db-dao/src/main/java/org/sonar/db/loadedtemplate/package-info.java
index 081c236d7a7..081c236d7a7 100644
--- a/sonar-db/src/main/java/org/sonar/db/loadedtemplate/package-info.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/loadedtemplate/package-info.java
diff --git a/sonar-db/src/main/java/org/sonar/db/measure/MeasureDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/measure/MeasureDao.java
index 5f3db408ce3..5f3db408ce3 100644
--- a/sonar-db/src/main/java/org/sonar/db/measure/MeasureDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/measure/MeasureDao.java
diff --git a/sonar-db/src/main/java/org/sonar/db/measure/MeasureDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/measure/MeasureDto.java
index b7e1d4e7310..b7e1d4e7310 100644
--- a/sonar-db/src/main/java/org/sonar/db/measure/MeasureDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/measure/MeasureDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/measure/MeasureMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/measure/MeasureMapper.java
index dfa5ff75613..dfa5ff75613 100644
--- a/sonar-db/src/main/java/org/sonar/db/measure/MeasureMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/measure/MeasureMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/measure/MeasureQuery.java b/server/sonar-db-dao/src/main/java/org/sonar/db/measure/MeasureQuery.java
index 0b2685ebbe5..0b2685ebbe5 100644
--- a/sonar-db/src/main/java/org/sonar/db/measure/MeasureQuery.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/measure/MeasureQuery.java
diff --git a/sonar-db/src/main/java/org/sonar/db/measure/MeasureTreeQuery.java b/server/sonar-db-dao/src/main/java/org/sonar/db/measure/MeasureTreeQuery.java
index 8d4eb1b2b36..04df1a38f17 100644
--- a/sonar-db/src/main/java/org/sonar/db/measure/MeasureTreeQuery.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/measure/MeasureTreeQuery.java
@@ -28,7 +28,7 @@ import org.sonar.db.component.ComponentDto;
import static com.google.common.collect.Lists.newArrayList;
import static java.util.Objects.requireNonNull;
-import static org.sonar.db.DatabaseUtils.buildLikeValue;
+import static org.sonar.db.DaoDatabaseUtils.buildLikeValue;
import static org.sonar.db.WildcardPosition.BEFORE_AND_AFTER;
public class MeasureTreeQuery {
diff --git a/sonar-db/src/main/java/org/sonar/db/measure/PastMeasureDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/measure/PastMeasureDto.java
index 0e5ccfb91aa..0e5ccfb91aa 100644
--- a/sonar-db/src/main/java/org/sonar/db/measure/PastMeasureDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/measure/PastMeasureDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/measure/PastMeasureQuery.java b/server/sonar-db-dao/src/main/java/org/sonar/db/measure/PastMeasureQuery.java
index 1c26ccb28a5..1c26ccb28a5 100644
--- a/sonar-db/src/main/java/org/sonar/db/measure/PastMeasureQuery.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/measure/PastMeasureQuery.java
diff --git a/sonar-db/src/main/java/org/sonar/db/measure/ProjectMeasuresIndexerIterator.java b/server/sonar-db-dao/src/main/java/org/sonar/db/measure/ProjectMeasuresIndexerIterator.java
index f91db430d4b..f91db430d4b 100644
--- a/sonar-db/src/main/java/org/sonar/db/measure/ProjectMeasuresIndexerIterator.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/measure/ProjectMeasuresIndexerIterator.java
diff --git a/sonar-db/src/main/java/org/sonar/db/measure/custom/CustomMeasureDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/measure/custom/CustomMeasureDao.java
index 13832730a89..13832730a89 100644
--- a/sonar-db/src/main/java/org/sonar/db/measure/custom/CustomMeasureDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/measure/custom/CustomMeasureDao.java
diff --git a/sonar-db/src/main/java/org/sonar/db/measure/custom/CustomMeasureDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/measure/custom/CustomMeasureDto.java
index 3aff53354cf..3aff53354cf 100644
--- a/sonar-db/src/main/java/org/sonar/db/measure/custom/CustomMeasureDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/measure/custom/CustomMeasureDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/measure/custom/CustomMeasureMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/measure/custom/CustomMeasureMapper.java
index 86be90423c6..86be90423c6 100644
--- a/sonar-db/src/main/java/org/sonar/db/measure/custom/CustomMeasureMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/measure/custom/CustomMeasureMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/measure/custom/package-info.java b/server/sonar-db-dao/src/main/java/org/sonar/db/measure/custom/package-info.java
index ae3ac0e1d64..ae3ac0e1d64 100644
--- a/sonar-db/src/main/java/org/sonar/db/measure/custom/package-info.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/measure/custom/package-info.java
diff --git a/sonar-db/src/main/java/org/sonar/db/measure/package-info.java b/server/sonar-db-dao/src/main/java/org/sonar/db/measure/package-info.java
index 913f21eec74..913f21eec74 100644
--- a/sonar-db/src/main/java/org/sonar/db/measure/package-info.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/measure/package-info.java
diff --git a/sonar-db/src/main/java/org/sonar/db/metric/MetricDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/metric/MetricDao.java
index 5bb743df095..5bb743df095 100644
--- a/sonar-db/src/main/java/org/sonar/db/metric/MetricDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/metric/MetricDao.java
diff --git a/sonar-db/src/main/java/org/sonar/db/metric/MetricDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/metric/MetricDto.java
index 04f45f93cbf..04f45f93cbf 100644
--- a/sonar-db/src/main/java/org/sonar/db/metric/MetricDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/metric/MetricDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/metric/MetricDtoFunctions.java b/server/sonar-db-dao/src/main/java/org/sonar/db/metric/MetricDtoFunctions.java
index 34bda9c9c1b..34bda9c9c1b 100644
--- a/sonar-db/src/main/java/org/sonar/db/metric/MetricDtoFunctions.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/metric/MetricDtoFunctions.java
diff --git a/sonar-db/src/main/java/org/sonar/db/metric/MetricMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/metric/MetricMapper.java
index 18f6bfcf1d6..18f6bfcf1d6 100644
--- a/sonar-db/src/main/java/org/sonar/db/metric/MetricMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/metric/MetricMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/metric/package-info.java b/server/sonar-db-dao/src/main/java/org/sonar/db/metric/package-info.java
index e3af21d08d3..e3af21d08d3 100644
--- a/sonar-db/src/main/java/org/sonar/db/metric/package-info.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/metric/package-info.java
diff --git a/sonar-db/src/main/java/org/sonar/db/notification/NotificationQueueDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/notification/NotificationQueueDao.java
index be390291444..be390291444 100644
--- a/sonar-db/src/main/java/org/sonar/db/notification/NotificationQueueDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/notification/NotificationQueueDao.java
diff --git a/sonar-db/src/main/java/org/sonar/db/notification/NotificationQueueDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/notification/NotificationQueueDto.java
index ef1e1069c88..ef1e1069c88 100644
--- a/sonar-db/src/main/java/org/sonar/db/notification/NotificationQueueDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/notification/NotificationQueueDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/notification/NotificationQueueMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/notification/NotificationQueueMapper.java
index 867ccdf88a2..867ccdf88a2 100644
--- a/sonar-db/src/main/java/org/sonar/db/notification/NotificationQueueMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/notification/NotificationQueueMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/notification/package-info.java b/server/sonar-db-dao/src/main/java/org/sonar/db/notification/package-info.java
index b2d246490ce..b2d246490ce 100644
--- a/sonar-db/src/main/java/org/sonar/db/notification/package-info.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/notification/package-info.java
diff --git a/sonar-db/src/main/java/org/sonar/db/organization/DefaultTemplates.java b/server/sonar-db-dao/src/main/java/org/sonar/db/organization/DefaultTemplates.java
index 24d2f6cbdee..24d2f6cbdee 100644
--- a/sonar-db/src/main/java/org/sonar/db/organization/DefaultTemplates.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/organization/DefaultTemplates.java
diff --git a/sonar-db/src/main/java/org/sonar/db/organization/OrganizationDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/organization/OrganizationDao.java
index d1ef05bd7e5..d1ef05bd7e5 100644
--- a/sonar-db/src/main/java/org/sonar/db/organization/OrganizationDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/organization/OrganizationDao.java
diff --git a/sonar-db/src/main/java/org/sonar/db/organization/OrganizationDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/organization/OrganizationDto.java
index 7ba488b6c16..7ba488b6c16 100644
--- a/sonar-db/src/main/java/org/sonar/db/organization/OrganizationDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/organization/OrganizationDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/organization/OrganizationMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/organization/OrganizationMapper.java
index f26bfb0a954..f26bfb0a954 100644
--- a/sonar-db/src/main/java/org/sonar/db/organization/OrganizationMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/organization/OrganizationMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/organization/OrganizationQuery.java b/server/sonar-db-dao/src/main/java/org/sonar/db/organization/OrganizationQuery.java
index 794c7ca8fcb..794c7ca8fcb 100644
--- a/sonar-db/src/main/java/org/sonar/db/organization/OrganizationQuery.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/organization/OrganizationQuery.java
diff --git a/sonar-db/src/main/java/org/sonar/db/organization/package-info.java b/server/sonar-db-dao/src/main/java/org/sonar/db/organization/package-info.java
index 932f77f4b20..932f77f4b20 100644
--- a/sonar-db/src/main/java/org/sonar/db/organization/package-info.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/organization/package-info.java
diff --git a/sonar-db/src/main/java/org/sonar/db/permission/AuthorizationDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/AuthorizationDao.java
index 6f843f537ed..6f843f537ed 100644
--- a/sonar-db/src/main/java/org/sonar/db/permission/AuthorizationDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/AuthorizationDao.java
diff --git a/sonar-db/src/main/java/org/sonar/db/permission/AuthorizationMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/AuthorizationMapper.java
index cc5f1f7f1fc..cc5f1f7f1fc 100644
--- a/sonar-db/src/main/java/org/sonar/db/permission/AuthorizationMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/AuthorizationMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/permission/CountPerProjectPermission.java b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/CountPerProjectPermission.java
index ca1bd228b50..ca1bd228b50 100644
--- a/sonar-db/src/main/java/org/sonar/db/permission/CountPerProjectPermission.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/CountPerProjectPermission.java
diff --git a/sonar-db/src/main/java/org/sonar/db/permission/GroupPermissionDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/GroupPermissionDao.java
index c8fe45a4cd3..c8fe45a4cd3 100644
--- a/sonar-db/src/main/java/org/sonar/db/permission/GroupPermissionDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/GroupPermissionDao.java
diff --git a/sonar-db/src/main/java/org/sonar/db/permission/GroupPermissionDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/GroupPermissionDto.java
index 2a1d166b67f..2a1d166b67f 100644
--- a/sonar-db/src/main/java/org/sonar/db/permission/GroupPermissionDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/GroupPermissionDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/permission/GroupPermissionMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/GroupPermissionMapper.java
index 10484b173d9..10484b173d9 100644
--- a/sonar-db/src/main/java/org/sonar/db/permission/GroupPermissionMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/GroupPermissionMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/permission/PermissionQuery.java b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/PermissionQuery.java
index 678ff2da7cd..181eb7a399b 100644
--- a/sonar-db/src/main/java/org/sonar/db/permission/PermissionQuery.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/PermissionQuery.java
@@ -29,7 +29,7 @@ import static com.google.common.base.MoreObjects.firstNonNull;
import static com.google.common.base.Preconditions.checkArgument;
import static org.apache.commons.lang.StringUtils.defaultIfBlank;
import static org.sonar.api.utils.Paging.offset;
-import static org.sonar.db.DatabaseUtils.buildLikeValue;
+import static org.sonar.db.DaoDatabaseUtils.buildLikeValue;
/**
* Query used to get users and groups permissions
diff --git a/sonar-db/src/main/java/org/sonar/db/permission/UserPermissionDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/UserPermissionDao.java
index 6ae036500f2..6ae036500f2 100644
--- a/sonar-db/src/main/java/org/sonar/db/permission/UserPermissionDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/UserPermissionDao.java
diff --git a/sonar-db/src/main/java/org/sonar/db/permission/UserPermissionDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/UserPermissionDto.java
index 6638cd64d16..6638cd64d16 100644
--- a/sonar-db/src/main/java/org/sonar/db/permission/UserPermissionDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/UserPermissionDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/permission/UserPermissionMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/UserPermissionMapper.java
index 56209760616..56209760616 100644
--- a/sonar-db/src/main/java/org/sonar/db/permission/UserPermissionMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/UserPermissionMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/permission/package-info.java b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/package-info.java
index 3f83de1ed59..3f83de1ed59 100644
--- a/sonar-db/src/main/java/org/sonar/db/permission/package-info.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/package-info.java
diff --git a/sonar-db/src/main/java/org/sonar/db/permission/template/CountByTemplateAndPermissionDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/template/CountByTemplateAndPermissionDto.java
index 1f3f1b38249..1f3f1b38249 100644
--- a/sonar-db/src/main/java/org/sonar/db/permission/template/CountByTemplateAndPermissionDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/template/CountByTemplateAndPermissionDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/permission/template/PermissionTemplateCharacteristicDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/template/PermissionTemplateCharacteristicDao.java
index 01738bba6e8..01738bba6e8 100644
--- a/sonar-db/src/main/java/org/sonar/db/permission/template/PermissionTemplateCharacteristicDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/template/PermissionTemplateCharacteristicDao.java
diff --git a/sonar-db/src/main/java/org/sonar/db/permission/template/PermissionTemplateCharacteristicDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/template/PermissionTemplateCharacteristicDto.java
index afbe25a3693..afbe25a3693 100644
--- a/sonar-db/src/main/java/org/sonar/db/permission/template/PermissionTemplateCharacteristicDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/template/PermissionTemplateCharacteristicDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/permission/template/PermissionTemplateCharacteristicMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/template/PermissionTemplateCharacteristicMapper.java
index ed0a8d6688a..ed0a8d6688a 100644
--- a/sonar-db/src/main/java/org/sonar/db/permission/template/PermissionTemplateCharacteristicMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/template/PermissionTemplateCharacteristicMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/permission/template/PermissionTemplateDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/template/PermissionTemplateDao.java
index a2aed9311f4..a2aed9311f4 100644
--- a/sonar-db/src/main/java/org/sonar/db/permission/template/PermissionTemplateDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/template/PermissionTemplateDao.java
diff --git a/sonar-db/src/main/java/org/sonar/db/permission/template/PermissionTemplateDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/template/PermissionTemplateDto.java
index a3b3275c39b..a3b3275c39b 100644
--- a/sonar-db/src/main/java/org/sonar/db/permission/template/PermissionTemplateDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/template/PermissionTemplateDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/permission/template/PermissionTemplateGroupDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/template/PermissionTemplateGroupDto.java
index d37b2a4ebf7..d37b2a4ebf7 100644
--- a/sonar-db/src/main/java/org/sonar/db/permission/template/PermissionTemplateGroupDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/template/PermissionTemplateGroupDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/permission/template/PermissionTemplateMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/template/PermissionTemplateMapper.java
index ddf2c0a4c0d..ddf2c0a4c0d 100644
--- a/sonar-db/src/main/java/org/sonar/db/permission/template/PermissionTemplateMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/template/PermissionTemplateMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/permission/template/PermissionTemplateUserDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/template/PermissionTemplateUserDto.java
index 3db22ae1560..3db22ae1560 100644
--- a/sonar-db/src/main/java/org/sonar/db/permission/template/PermissionTemplateUserDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/template/PermissionTemplateUserDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/permission/template/package-info.java b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/template/package-info.java
index 2bce88123f4..2bce88123f4 100644
--- a/sonar-db/src/main/java/org/sonar/db/permission/template/package-info.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/permission/template/package-info.java
diff --git a/sonar-db/src/main/java/org/sonar/db/property/InternalPropertiesDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/property/InternalPropertiesDao.java
index e9e500bc3e5..e9e500bc3e5 100644
--- a/sonar-db/src/main/java/org/sonar/db/property/InternalPropertiesDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/property/InternalPropertiesDao.java
diff --git a/sonar-db/src/main/java/org/sonar/db/property/InternalPropertiesMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/property/InternalPropertiesMapper.java
index be1e5b122b4..be1e5b122b4 100644
--- a/sonar-db/src/main/java/org/sonar/db/property/InternalPropertiesMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/property/InternalPropertiesMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/property/InternalPropertyDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/property/InternalPropertyDto.java
index 17de71479c8..17de71479c8 100644
--- a/sonar-db/src/main/java/org/sonar/db/property/InternalPropertyDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/property/InternalPropertyDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/property/PropertiesDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/property/PropertiesDao.java
index df0d6a383be..df0d6a383be 100644
--- a/sonar-db/src/main/java/org/sonar/db/property/PropertiesDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/property/PropertiesDao.java
diff --git a/sonar-db/src/main/java/org/sonar/db/property/PropertiesMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/property/PropertiesMapper.java
index dd8f6c562b8..dd8f6c562b8 100644
--- a/sonar-db/src/main/java/org/sonar/db/property/PropertiesMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/property/PropertiesMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/property/PropertyDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/property/PropertyDto.java
index f9cabe4c6e7..f9cabe4c6e7 100644
--- a/sonar-db/src/main/java/org/sonar/db/property/PropertyDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/property/PropertyDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/property/PropertyQuery.java b/server/sonar-db-dao/src/main/java/org/sonar/db/property/PropertyQuery.java
index a89927d8b5c..a89927d8b5c 100644
--- a/sonar-db/src/main/java/org/sonar/db/property/PropertyQuery.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/property/PropertyQuery.java
diff --git a/sonar-db/src/main/java/org/sonar/db/property/PropertyTesting.java b/server/sonar-db-dao/src/main/java/org/sonar/db/property/PropertyTesting.java
index 79d4d6fd7d1..79d4d6fd7d1 100644
--- a/sonar-db/src/main/java/org/sonar/db/property/PropertyTesting.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/property/PropertyTesting.java
diff --git a/sonar-db/src/main/java/org/sonar/db/property/ScrapPropertyDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/property/ScrapPropertyDto.java
index 887de847259..887de847259 100644
--- a/sonar-db/src/main/java/org/sonar/db/property/ScrapPropertyDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/property/ScrapPropertyDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/property/package-info.java b/server/sonar-db-dao/src/main/java/org/sonar/db/property/package-info.java
index c073920afae..c073920afae 100644
--- a/sonar-db/src/main/java/org/sonar/db/property/package-info.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/property/package-info.java
diff --git a/sonar-db/src/main/java/org/sonar/db/purge/IdUuidPair.java b/server/sonar-db-dao/src/main/java/org/sonar/db/purge/IdUuidPair.java
index 29a24908f8d..29a24908f8d 100644
--- a/sonar-db/src/main/java/org/sonar/db/purge/IdUuidPair.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/purge/IdUuidPair.java
diff --git a/sonar-db/src/main/java/org/sonar/db/purge/IdUuidPairs.java b/server/sonar-db-dao/src/main/java/org/sonar/db/purge/IdUuidPairs.java
index 551f93ff126..551f93ff126 100644
--- a/sonar-db/src/main/java/org/sonar/db/purge/IdUuidPairs.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/purge/IdUuidPairs.java
diff --git a/sonar-db/src/main/java/org/sonar/db/purge/PurgeCommands.java b/server/sonar-db-dao/src/main/java/org/sonar/db/purge/PurgeCommands.java
index 86b00635d84..86b00635d84 100644
--- a/sonar-db/src/main/java/org/sonar/db/purge/PurgeCommands.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/purge/PurgeCommands.java
diff --git a/sonar-db/src/main/java/org/sonar/db/purge/PurgeConfiguration.java b/server/sonar-db-dao/src/main/java/org/sonar/db/purge/PurgeConfiguration.java
index cc6fb0dbe18..cc6fb0dbe18 100644
--- a/sonar-db/src/main/java/org/sonar/db/purge/PurgeConfiguration.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/purge/PurgeConfiguration.java
diff --git a/sonar-db/src/main/java/org/sonar/db/purge/PurgeDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/purge/PurgeDao.java
index f8d4d6117ec..f8d4d6117ec 100644
--- a/sonar-db/src/main/java/org/sonar/db/purge/PurgeDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/purge/PurgeDao.java
diff --git a/sonar-db/src/main/java/org/sonar/db/purge/PurgeListener.java b/server/sonar-db-dao/src/main/java/org/sonar/db/purge/PurgeListener.java
index 4d5617fe102..4d5617fe102 100644
--- a/sonar-db/src/main/java/org/sonar/db/purge/PurgeListener.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/purge/PurgeListener.java
diff --git a/sonar-db/src/main/java/org/sonar/db/purge/PurgeMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/purge/PurgeMapper.java
index 71776d55c8d..71776d55c8d 100644
--- a/sonar-db/src/main/java/org/sonar/db/purge/PurgeMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/purge/PurgeMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/purge/PurgeProfiler.java b/server/sonar-db-dao/src/main/java/org/sonar/db/purge/PurgeProfiler.java
index 8c5c0541964..8c5c0541964 100644
--- a/sonar-db/src/main/java/org/sonar/db/purge/PurgeProfiler.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/purge/PurgeProfiler.java
diff --git a/sonar-db/src/main/java/org/sonar/db/purge/PurgeSnapshotQuery.java b/server/sonar-db-dao/src/main/java/org/sonar/db/purge/PurgeSnapshotQuery.java
index 46bfecacbac..46bfecacbac 100644
--- a/sonar-db/src/main/java/org/sonar/db/purge/PurgeSnapshotQuery.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/purge/PurgeSnapshotQuery.java
diff --git a/sonar-db/src/main/java/org/sonar/db/purge/PurgeableAnalysisDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/purge/PurgeableAnalysisDto.java
index 1d91f886174..1d91f886174 100644
--- a/sonar-db/src/main/java/org/sonar/db/purge/PurgeableAnalysisDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/purge/PurgeableAnalysisDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/purge/package-info.java b/server/sonar-db-dao/src/main/java/org/sonar/db/purge/package-info.java
index 3790dc89681..3790dc89681 100644
--- a/sonar-db/src/main/java/org/sonar/db/purge/package-info.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/purge/package-info.java
diff --git a/sonar-db/src/main/java/org/sonar/db/purge/period/DefaultPeriodCleaner.java b/server/sonar-db-dao/src/main/java/org/sonar/db/purge/period/DefaultPeriodCleaner.java
index 97f35d5958e..97f35d5958e 100644
--- a/sonar-db/src/main/java/org/sonar/db/purge/period/DefaultPeriodCleaner.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/purge/period/DefaultPeriodCleaner.java
diff --git a/sonar-db/src/main/java/org/sonar/db/purge/period/DeleteAllFilter.java b/server/sonar-db-dao/src/main/java/org/sonar/db/purge/period/DeleteAllFilter.java
index 8667bb8d3d1..8667bb8d3d1 100644
--- a/sonar-db/src/main/java/org/sonar/db/purge/period/DeleteAllFilter.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/purge/period/DeleteAllFilter.java
diff --git a/sonar-db/src/main/java/org/sonar/db/purge/period/Filter.java b/server/sonar-db-dao/src/main/java/org/sonar/db/purge/period/Filter.java
index f501ade118e..f501ade118e 100644
--- a/sonar-db/src/main/java/org/sonar/db/purge/period/Filter.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/purge/period/Filter.java
diff --git a/sonar-db/src/main/java/org/sonar/db/purge/period/Filters.java b/server/sonar-db-dao/src/main/java/org/sonar/db/purge/period/Filters.java
index fab44eaa2cc..fab44eaa2cc 100644
--- a/sonar-db/src/main/java/org/sonar/db/purge/period/Filters.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/purge/period/Filters.java
diff --git a/sonar-db/src/main/java/org/sonar/db/purge/period/Interval.java b/server/sonar-db-dao/src/main/java/org/sonar/db/purge/period/Interval.java
index fab5a86f90b..fab5a86f90b 100644
--- a/sonar-db/src/main/java/org/sonar/db/purge/period/Interval.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/purge/period/Interval.java
diff --git a/sonar-db/src/main/java/org/sonar/db/purge/period/KeepOneFilter.java b/server/sonar-db-dao/src/main/java/org/sonar/db/purge/period/KeepOneFilter.java
index e67a4c9657a..e67a4c9657a 100644
--- a/sonar-db/src/main/java/org/sonar/db/purge/period/KeepOneFilter.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/purge/period/KeepOneFilter.java
diff --git a/sonar-db/src/main/java/org/sonar/db/purge/period/package-info.java b/server/sonar-db-dao/src/main/java/org/sonar/db/purge/period/package-info.java
index 47e3bd1ca34..47e3bd1ca34 100644
--- a/sonar-db/src/main/java/org/sonar/db/purge/period/package-info.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/purge/period/package-info.java
diff --git a/sonar-db/src/main/java/org/sonar/db/qualitygate/ProjectQgateAssociation.java b/server/sonar-db-dao/src/main/java/org/sonar/db/qualitygate/ProjectQgateAssociation.java
index 9237523a6f7..9237523a6f7 100644
--- a/sonar-db/src/main/java/org/sonar/db/qualitygate/ProjectQgateAssociation.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/qualitygate/ProjectQgateAssociation.java
diff --git a/sonar-db/src/main/java/org/sonar/db/qualitygate/ProjectQgateAssociationDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/qualitygate/ProjectQgateAssociationDao.java
index a45e4ebba52..a45e4ebba52 100644
--- a/sonar-db/src/main/java/org/sonar/db/qualitygate/ProjectQgateAssociationDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/qualitygate/ProjectQgateAssociationDao.java
diff --git a/sonar-db/src/main/java/org/sonar/db/qualitygate/ProjectQgateAssociationDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/qualitygate/ProjectQgateAssociationDto.java
index e016353090c..e016353090c 100644
--- a/sonar-db/src/main/java/org/sonar/db/qualitygate/ProjectQgateAssociationDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/qualitygate/ProjectQgateAssociationDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/qualitygate/ProjectQgateAssociationMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/qualitygate/ProjectQgateAssociationMapper.java
index 3abffca0e40..3abffca0e40 100644
--- a/sonar-db/src/main/java/org/sonar/db/qualitygate/ProjectQgateAssociationMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/qualitygate/ProjectQgateAssociationMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/qualitygate/ProjectQgateAssociationQuery.java b/server/sonar-db-dao/src/main/java/org/sonar/db/qualitygate/ProjectQgateAssociationQuery.java
index d60d7bb9a11..0aa8ef35026 100644
--- a/sonar-db/src/main/java/org/sonar/db/qualitygate/ProjectQgateAssociationQuery.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/qualitygate/ProjectQgateAssociationQuery.java
@@ -26,7 +26,7 @@ import java.util.Set;
import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
import org.apache.commons.lang.StringUtils;
-import org.sonar.db.DatabaseUtils;
+import org.sonar.db.DaoDatabaseUtils;
import org.sonar.db.WildcardPosition;
public class ProjectQgateAssociationQuery {
@@ -60,7 +60,7 @@ public class ProjectQgateAssociationQuery {
if (this.projectSearch == null) {
this.projectSearchUpperLikeSql = null;
} else {
- this.projectSearchUpperLikeSql = DatabaseUtils.buildLikeValue(projectSearch.toUpperCase(Locale.ENGLISH), WildcardPosition.BEFORE_AND_AFTER);
+ this.projectSearchUpperLikeSql = DaoDatabaseUtils.buildLikeValue(projectSearch.toUpperCase(Locale.ENGLISH), WildcardPosition.BEFORE_AND_AFTER);
}
this.pageSize = builder.pageSize;
diff --git a/sonar-db/src/main/java/org/sonar/db/qualitygate/QualityGateConditionDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/qualitygate/QualityGateConditionDao.java
index 249d726cc92..249d726cc92 100644
--- a/sonar-db/src/main/java/org/sonar/db/qualitygate/QualityGateConditionDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/qualitygate/QualityGateConditionDao.java
diff --git a/sonar-db/src/main/java/org/sonar/db/qualitygate/QualityGateConditionDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/qualitygate/QualityGateConditionDto.java
index d3d0bbe5bac..d3d0bbe5bac 100644
--- a/sonar-db/src/main/java/org/sonar/db/qualitygate/QualityGateConditionDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/qualitygate/QualityGateConditionDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/qualitygate/QualityGateConditionMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/qualitygate/QualityGateConditionMapper.java
index 2a11deb70a1..2a11deb70a1 100644
--- a/sonar-db/src/main/java/org/sonar/db/qualitygate/QualityGateConditionMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/qualitygate/QualityGateConditionMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/qualitygate/QualityGateDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/qualitygate/QualityGateDao.java
index a7d0a409b88..a7d0a409b88 100644
--- a/sonar-db/src/main/java/org/sonar/db/qualitygate/QualityGateDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/qualitygate/QualityGateDao.java
diff --git a/sonar-db/src/main/java/org/sonar/db/qualitygate/QualityGateDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/qualitygate/QualityGateDto.java
index 98832bbfaae..98832bbfaae 100644
--- a/sonar-db/src/main/java/org/sonar/db/qualitygate/QualityGateDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/qualitygate/QualityGateDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/qualitygate/QualityGateMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/qualitygate/QualityGateMapper.java
index 77548197d02..77548197d02 100644
--- a/sonar-db/src/main/java/org/sonar/db/qualitygate/QualityGateMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/qualitygate/QualityGateMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/qualitygate/package-info.java b/server/sonar-db-dao/src/main/java/org/sonar/db/qualitygate/package-info.java
index dccff66979b..dccff66979b 100644
--- a/sonar-db/src/main/java/org/sonar/db/qualitygate/package-info.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/qualitygate/package-info.java
diff --git a/sonar-db/src/main/java/org/sonar/db/qualityprofile/ActiveRuleDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/ActiveRuleDao.java
index 903221521ce..903221521ce 100644
--- a/sonar-db/src/main/java/org/sonar/db/qualityprofile/ActiveRuleDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/ActiveRuleDao.java
diff --git a/sonar-db/src/main/java/org/sonar/db/qualityprofile/ActiveRuleDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/ActiveRuleDto.java
index c52a599a84d..c52a599a84d 100644
--- a/sonar-db/src/main/java/org/sonar/db/qualityprofile/ActiveRuleDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/ActiveRuleDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/qualityprofile/ActiveRuleKey.java b/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/ActiveRuleKey.java
index 299493bd9f6..299493bd9f6 100644
--- a/sonar-db/src/main/java/org/sonar/db/qualityprofile/ActiveRuleKey.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/ActiveRuleKey.java
diff --git a/sonar-db/src/main/java/org/sonar/db/qualityprofile/ActiveRuleMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/ActiveRuleMapper.java
index b094385df2e..b094385df2e 100644
--- a/sonar-db/src/main/java/org/sonar/db/qualityprofile/ActiveRuleMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/ActiveRuleMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/qualityprofile/ActiveRuleParamDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/ActiveRuleParamDto.java
index 06eca371834..06eca371834 100644
--- a/sonar-db/src/main/java/org/sonar/db/qualityprofile/ActiveRuleParamDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/ActiveRuleParamDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/qualityprofile/ProjectQprofileAssociationDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/ProjectQprofileAssociationDto.java
index a4c0281b035..a4c0281b035 100644
--- a/sonar-db/src/main/java/org/sonar/db/qualityprofile/ProjectQprofileAssociationDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/ProjectQprofileAssociationDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/qualityprofile/QProfileChangeDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/QProfileChangeDao.java
index ca6febec239..ca6febec239 100644
--- a/sonar-db/src/main/java/org/sonar/db/qualityprofile/QProfileChangeDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/QProfileChangeDao.java
diff --git a/sonar-db/src/main/java/org/sonar/db/qualityprofile/QProfileChangeDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/QProfileChangeDto.java
index 82a1e5142a2..82a1e5142a2 100644
--- a/sonar-db/src/main/java/org/sonar/db/qualityprofile/QProfileChangeDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/QProfileChangeDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/qualityprofile/QProfileChangeMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/QProfileChangeMapper.java
index 0022c01b1de..0022c01b1de 100644
--- a/sonar-db/src/main/java/org/sonar/db/qualityprofile/QProfileChangeMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/QProfileChangeMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/qualityprofile/QProfileChangeQuery.java b/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/QProfileChangeQuery.java
index 8bbcbd88584..8bbcbd88584 100644
--- a/sonar-db/src/main/java/org/sonar/db/qualityprofile/QProfileChangeQuery.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/QProfileChangeQuery.java
diff --git a/sonar-db/src/main/java/org/sonar/db/qualityprofile/QualityProfileDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/QualityProfileDao.java
index d7fa7d4755f..d7fa7d4755f 100644
--- a/sonar-db/src/main/java/org/sonar/db/qualityprofile/QualityProfileDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/QualityProfileDao.java
diff --git a/sonar-db/src/main/java/org/sonar/db/qualityprofile/QualityProfileDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/QualityProfileDto.java
index c8abfaa9290..c8abfaa9290 100644
--- a/sonar-db/src/main/java/org/sonar/db/qualityprofile/QualityProfileDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/QualityProfileDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/qualityprofile/QualityProfileMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/QualityProfileMapper.java
index a44f43ce468..a44f43ce468 100644
--- a/sonar-db/src/main/java/org/sonar/db/qualityprofile/QualityProfileMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/QualityProfileMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/qualityprofile/QualityProfileProjectCount.java b/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/QualityProfileProjectCount.java
index 9a42926b335..9a42926b335 100644
--- a/sonar-db/src/main/java/org/sonar/db/qualityprofile/QualityProfileProjectCount.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/QualityProfileProjectCount.java
diff --git a/sonar-db/src/main/java/org/sonar/db/qualityprofile/package-info.java b/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/package-info.java
index f9761c6cacd..f9761c6cacd 100644
--- a/sonar-db/src/main/java/org/sonar/db/qualityprofile/package-info.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/package-info.java
diff --git a/sonar-db/src/main/java/org/sonar/db/rule/RuleDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/rule/RuleDao.java
index 53e3c95e857..53e3c95e857 100644
--- a/sonar-db/src/main/java/org/sonar/db/rule/RuleDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/rule/RuleDao.java
diff --git a/sonar-db/src/main/java/org/sonar/db/rule/RuleDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/rule/RuleDto.java
index 2cb5c355549..2cb5c355549 100644
--- a/sonar-db/src/main/java/org/sonar/db/rule/RuleDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/rule/RuleDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/rule/RuleMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/rule/RuleMapper.java
index 3d768933203..3d768933203 100644
--- a/sonar-db/src/main/java/org/sonar/db/rule/RuleMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/rule/RuleMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/rule/RuleParamDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/rule/RuleParamDto.java
index 867a810b0a7..867a810b0a7 100644
--- a/sonar-db/src/main/java/org/sonar/db/rule/RuleParamDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/rule/RuleParamDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/rule/RuleRepositoryDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/rule/RuleRepositoryDao.java
index e2f5903551e..e2f5903551e 100644
--- a/sonar-db/src/main/java/org/sonar/db/rule/RuleRepositoryDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/rule/RuleRepositoryDao.java
diff --git a/sonar-db/src/main/java/org/sonar/db/rule/RuleRepositoryDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/rule/RuleRepositoryDto.java
index 8180c24dcaf..8180c24dcaf 100644
--- a/sonar-db/src/main/java/org/sonar/db/rule/RuleRepositoryDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/rule/RuleRepositoryDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/rule/RuleRepositoryMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/rule/RuleRepositoryMapper.java
index 3651ceb54a7..3651ceb54a7 100644
--- a/sonar-db/src/main/java/org/sonar/db/rule/RuleRepositoryMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/rule/RuleRepositoryMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/rule/SeverityUtil.java b/server/sonar-db-dao/src/main/java/org/sonar/db/rule/SeverityUtil.java
index c5ad4b7317a..c5ad4b7317a 100644
--- a/sonar-db/src/main/java/org/sonar/db/rule/SeverityUtil.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/rule/SeverityUtil.java
diff --git a/sonar-db/src/main/java/org/sonar/db/rule/package-info.java b/server/sonar-db-dao/src/main/java/org/sonar/db/rule/package-info.java
index b9d1b93d622..b9d1b93d622 100644
--- a/sonar-db/src/main/java/org/sonar/db/rule/package-info.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/rule/package-info.java
diff --git a/sonar-db/src/main/java/org/sonar/db/schemamigration/SchemaMigrationDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/schemamigration/SchemaMigrationDao.java
index bebddad8f9e..bebddad8f9e 100644
--- a/sonar-db/src/main/java/org/sonar/db/schemamigration/SchemaMigrationDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/schemamigration/SchemaMigrationDao.java
diff --git a/sonar-db/src/main/java/org/sonar/db/schemamigration/SchemaMigrationDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/schemamigration/SchemaMigrationDto.java
index 345c1117661..345c1117661 100644
--- a/sonar-db/src/main/java/org/sonar/db/schemamigration/SchemaMigrationDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/schemamigration/SchemaMigrationDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/schemamigration/SchemaMigrationMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/schemamigration/SchemaMigrationMapper.java
index 4da1e09cdd9..4da1e09cdd9 100644
--- a/sonar-db/src/main/java/org/sonar/db/schemamigration/SchemaMigrationMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/schemamigration/SchemaMigrationMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/schemamigration/package-info.java b/server/sonar-db-dao/src/main/java/org/sonar/db/schemamigration/package-info.java
index 646c3ea3913..646c3ea3913 100644
--- a/sonar-db/src/main/java/org/sonar/db/schemamigration/package-info.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/schemamigration/package-info.java
diff --git a/sonar-db/src/main/java/org/sonar/db/source/FileSourceDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/source/FileSourceDao.java
index 98754f4df26..98754f4df26 100644
--- a/sonar-db/src/main/java/org/sonar/db/source/FileSourceDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/source/FileSourceDao.java
diff --git a/sonar-db/src/main/java/org/sonar/db/source/FileSourceDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/source/FileSourceDto.java
index 2218054b971..2218054b971 100644
--- a/sonar-db/src/main/java/org/sonar/db/source/FileSourceDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/source/FileSourceDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/source/FileSourceMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/source/FileSourceMapper.java
index 3b633dd2fa5..3b633dd2fa5 100644
--- a/sonar-db/src/main/java/org/sonar/db/source/FileSourceMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/source/FileSourceMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/source/package-info.java b/server/sonar-db-dao/src/main/java/org/sonar/db/source/package-info.java
index dbf389c86dd..dbf389c86dd 100644
--- a/sonar-db/src/main/java/org/sonar/db/source/package-info.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/source/package-info.java
diff --git a/sonar-db/src/main/java/org/sonar/db/user/AuthorDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/user/AuthorDao.java
index 862bcf4d9ee..862bcf4d9ee 100644
--- a/sonar-db/src/main/java/org/sonar/db/user/AuthorDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/user/AuthorDao.java
diff --git a/sonar-db/src/main/java/org/sonar/db/user/AuthorDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/user/AuthorDto.java
index 00b93c40a64..00b93c40a64 100644
--- a/sonar-db/src/main/java/org/sonar/db/user/AuthorDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/user/AuthorDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/user/AuthorMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/user/AuthorMapper.java
index 63321fc7687..63321fc7687 100644
--- a/sonar-db/src/main/java/org/sonar/db/user/AuthorMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/user/AuthorMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/user/GroupDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/user/GroupDao.java
index 22fb347ada5..e9156a1c09a 100644
--- a/sonar-db/src/main/java/org/sonar/db/user/GroupDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/user/GroupDao.java
@@ -30,8 +30,8 @@ import org.apache.commons.lang.StringUtils;
import org.apache.ibatis.session.RowBounds;
import org.sonar.api.utils.System2;
import org.sonar.db.Dao;
-import org.sonar.db.DatabaseUtils;
import org.sonar.db.DbSession;
+import org.sonar.db.DaoDatabaseUtils;
import org.sonar.db.WildcardPosition;
import static org.sonar.db.DatabaseUtils.executeLargeInputs;
@@ -108,7 +108,7 @@ public class GroupDao implements Dao {
}
String upperCasedNameQuery = StringUtils.upperCase(query, Locale.ENGLISH);
- return DatabaseUtils.buildLikeValue(upperCasedNameQuery, WildcardPosition.BEFORE_AND_AFTER);
+ return DaoDatabaseUtils.buildLikeValue(upperCasedNameQuery, WildcardPosition.BEFORE_AND_AFTER);
}
public List<GroupDto> selectByOrganizationUuid(DbSession dbSession, String organizationUuid) {
diff --git a/sonar-db/src/main/java/org/sonar/db/user/GroupDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/user/GroupDto.java
index 8156414f47a..8156414f47a 100644
--- a/sonar-db/src/main/java/org/sonar/db/user/GroupDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/user/GroupDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/user/GroupMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/user/GroupMapper.java
index 3f70d26a190..3f70d26a190 100644
--- a/sonar-db/src/main/java/org/sonar/db/user/GroupMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/user/GroupMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/user/GroupMembershipDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/user/GroupMembershipDao.java
index bde120c6167..bde120c6167 100644
--- a/sonar-db/src/main/java/org/sonar/db/user/GroupMembershipDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/user/GroupMembershipDao.java
diff --git a/sonar-db/src/main/java/org/sonar/db/user/GroupMembershipDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/user/GroupMembershipDto.java
index 1307352fd60..1307352fd60 100644
--- a/sonar-db/src/main/java/org/sonar/db/user/GroupMembershipDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/user/GroupMembershipDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/user/GroupMembershipMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/user/GroupMembershipMapper.java
index 6bf021b158e..6bf021b158e 100644
--- a/sonar-db/src/main/java/org/sonar/db/user/GroupMembershipMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/user/GroupMembershipMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/user/GroupMembershipQuery.java b/server/sonar-db-dao/src/main/java/org/sonar/db/user/GroupMembershipQuery.java
index 5876cd07082..5876cd07082 100644
--- a/sonar-db/src/main/java/org/sonar/db/user/GroupMembershipQuery.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/user/GroupMembershipQuery.java
diff --git a/sonar-db/src/main/java/org/sonar/db/user/GroupUserCount.java b/server/sonar-db-dao/src/main/java/org/sonar/db/user/GroupUserCount.java
index 8aac6b7a878..8aac6b7a878 100644
--- a/sonar-db/src/main/java/org/sonar/db/user/GroupUserCount.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/user/GroupUserCount.java
diff --git a/sonar-db/src/main/java/org/sonar/db/user/LoginGroup.java b/server/sonar-db-dao/src/main/java/org/sonar/db/user/LoginGroup.java
index 0a2be3b7ce3..0a2be3b7ce3 100644
--- a/sonar-db/src/main/java/org/sonar/db/user/LoginGroup.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/user/LoginGroup.java
diff --git a/sonar-db/src/main/java/org/sonar/db/user/RoleDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/user/RoleDao.java
index 66e14f432a1..66e14f432a1 100644
--- a/sonar-db/src/main/java/org/sonar/db/user/RoleDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/user/RoleDao.java
diff --git a/sonar-db/src/main/java/org/sonar/db/user/RoleMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/user/RoleMapper.java
index 6e9e45a4b03..6e9e45a4b03 100644
--- a/sonar-db/src/main/java/org/sonar/db/user/RoleMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/user/RoleMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/user/UserDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/user/UserDao.java
index 754cb376ef5..754cb376ef5 100644
--- a/sonar-db/src/main/java/org/sonar/db/user/UserDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/user/UserDao.java
diff --git a/sonar-db/src/main/java/org/sonar/db/user/UserDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/user/UserDto.java
index 7f41ce65250..7f41ce65250 100644
--- a/sonar-db/src/main/java/org/sonar/db/user/UserDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/user/UserDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/user/UserGroupDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/user/UserGroupDao.java
index 1e53f6a312e..1e53f6a312e 100644
--- a/sonar-db/src/main/java/org/sonar/db/user/UserGroupDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/user/UserGroupDao.java
diff --git a/sonar-db/src/main/java/org/sonar/db/user/UserGroupDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/user/UserGroupDto.java
index 8e8443bf830..8e8443bf830 100644
--- a/sonar-db/src/main/java/org/sonar/db/user/UserGroupDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/user/UserGroupDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/user/UserGroupMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/user/UserGroupMapper.java
index ce0d053d701..ce0d053d701 100644
--- a/sonar-db/src/main/java/org/sonar/db/user/UserGroupMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/user/UserGroupMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/user/UserMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/user/UserMapper.java
index eac60d442ea..eac60d442ea 100644
--- a/sonar-db/src/main/java/org/sonar/db/user/UserMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/user/UserMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/user/UserMembershipDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/user/UserMembershipDto.java
index a8b5dd6be1d..a8b5dd6be1d 100644
--- a/sonar-db/src/main/java/org/sonar/db/user/UserMembershipDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/user/UserMembershipDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/user/UserMembershipQuery.java b/server/sonar-db-dao/src/main/java/org/sonar/db/user/UserMembershipQuery.java
index e93513c5191..67958591a48 100644
--- a/sonar-db/src/main/java/org/sonar/db/user/UserMembershipQuery.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/user/UserMembershipQuery.java
@@ -29,7 +29,7 @@ import org.apache.commons.lang.StringUtils;
import static com.google.common.base.MoreObjects.firstNonNull;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
-import static org.sonar.db.DatabaseUtils.buildLikeValue;
+import static org.sonar.db.DaoDatabaseUtils.buildLikeValue;
import static org.sonar.db.WildcardPosition.BEFORE_AND_AFTER;
public class UserMembershipQuery {
diff --git a/sonar-db/src/main/java/org/sonar/db/user/UserTokenCount.java b/server/sonar-db-dao/src/main/java/org/sonar/db/user/UserTokenCount.java
index 027661218c1..027661218c1 100644
--- a/sonar-db/src/main/java/org/sonar/db/user/UserTokenCount.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/user/UserTokenCount.java
diff --git a/sonar-db/src/main/java/org/sonar/db/user/UserTokenDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/user/UserTokenDao.java
index f7210d9a1fd..f7210d9a1fd 100644
--- a/sonar-db/src/main/java/org/sonar/db/user/UserTokenDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/user/UserTokenDao.java
diff --git a/sonar-db/src/main/java/org/sonar/db/user/UserTokenDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/user/UserTokenDto.java
index e2b859725f2..e2b859725f2 100644
--- a/sonar-db/src/main/java/org/sonar/db/user/UserTokenDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/user/UserTokenDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/user/UserTokenMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/user/UserTokenMapper.java
index 9a777fd139e..9a777fd139e 100644
--- a/sonar-db/src/main/java/org/sonar/db/user/UserTokenMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/user/UserTokenMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/user/UserTokenValidator.java b/server/sonar-db-dao/src/main/java/org/sonar/db/user/UserTokenValidator.java
index be4a82a32a9..be4a82a32a9 100644
--- a/sonar-db/src/main/java/org/sonar/db/user/UserTokenValidator.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/user/UserTokenValidator.java
diff --git a/sonar-db/src/main/java/org/sonar/db/user/package-info.java b/server/sonar-db-dao/src/main/java/org/sonar/db/user/package-info.java
index 9affdd060c5..9affdd060c5 100644
--- a/sonar-db/src/main/java/org/sonar/db/user/package-info.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/user/package-info.java
diff --git a/sonar-db/src/main/java/org/sonar/db/webhook/WebhookDeliveryDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/webhook/WebhookDeliveryDao.java
index 1ce48f8df3e..1ce48f8df3e 100644
--- a/sonar-db/src/main/java/org/sonar/db/webhook/WebhookDeliveryDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/webhook/WebhookDeliveryDao.java
diff --git a/sonar-db/src/main/java/org/sonar/db/webhook/WebhookDeliveryDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/webhook/WebhookDeliveryDto.java
index 5fbedbff388..5fbedbff388 100644
--- a/sonar-db/src/main/java/org/sonar/db/webhook/WebhookDeliveryDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/webhook/WebhookDeliveryDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/webhook/WebhookDeliveryLiteDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/webhook/WebhookDeliveryLiteDto.java
index 22a5aa03cd5..22a5aa03cd5 100644
--- a/sonar-db/src/main/java/org/sonar/db/webhook/WebhookDeliveryLiteDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/webhook/WebhookDeliveryLiteDto.java
diff --git a/sonar-db/src/main/java/org/sonar/db/webhook/WebhookDeliveryMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/webhook/WebhookDeliveryMapper.java
index 1b13b0d4591..1b13b0d4591 100644
--- a/sonar-db/src/main/java/org/sonar/db/webhook/WebhookDeliveryMapper.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/webhook/WebhookDeliveryMapper.java
diff --git a/sonar-db/src/main/java/org/sonar/db/webhook/package-info.java b/server/sonar-db-dao/src/main/java/org/sonar/db/webhook/package-info.java
index ccc107e118e..ccc107e118e 100644
--- a/sonar-db/src/main/java/org/sonar/db/webhook/package-info.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/webhook/package-info.java
diff --git a/sonar-db/src/main/protobuf/db-commons.proto b/server/sonar-db-dao/src/main/protobuf/db-commons.proto
index d5a3a3befc6..d5a3a3befc6 100644
--- a/sonar-db/src/main/protobuf/db-commons.proto
+++ b/server/sonar-db-dao/src/main/protobuf/db-commons.proto
diff --git a/sonar-db/src/main/protobuf/db-file-sources.proto b/server/sonar-db-dao/src/main/protobuf/db-file-sources.proto
index f62226f1578..f62226f1578 100644
--- a/sonar-db/src/main/protobuf/db-file-sources.proto
+++ b/server/sonar-db-dao/src/main/protobuf/db-file-sources.proto
diff --git a/sonar-db/src/main/protobuf/db-issues.proto b/server/sonar-db-dao/src/main/protobuf/db-issues.proto
index c57edc7b0e7..c57edc7b0e7 100644
--- a/sonar-db/src/main/protobuf/db-issues.proto
+++ b/server/sonar-db-dao/src/main/protobuf/db-issues.proto
diff --git a/sonar-db/src/main/resources/org/sonar/db/IsAliveMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/IsAliveMapper.xml
index c26b5961f8a..c26b5961f8a 100644
--- a/sonar-db/src/main/resources/org/sonar/db/IsAliveMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/IsAliveMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/ce/CeActivityMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/ce/CeActivityMapper.xml
index bac934d732f..bac934d732f 100644
--- a/sonar-db/src/main/resources/org/sonar/db/ce/CeActivityMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/ce/CeActivityMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/ce/CeQueueMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/ce/CeQueueMapper.xml
index ebd64ab82ea..ebd64ab82ea 100644
--- a/sonar-db/src/main/resources/org/sonar/db/ce/CeQueueMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/ce/CeQueueMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/ce/CeScannerContextMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/ce/CeScannerContextMapper.xml
index f7f3ff50e94..f7f3ff50e94 100644
--- a/sonar-db/src/main/resources/org/sonar/db/ce/CeScannerContextMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/ce/CeScannerContextMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/ce/CeTaskInputMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/ce/CeTaskInputMapper.xml
index 141055f933c..141055f933c 100644
--- a/sonar-db/src/main/resources/org/sonar/db/ce/CeTaskInputMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/ce/CeTaskInputMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/component/ComponentKeyUpdaterMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/component/ComponentKeyUpdaterMapper.xml
index 4514ad12014..4514ad12014 100644
--- a/sonar-db/src/main/resources/org/sonar/db/component/ComponentKeyUpdaterMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/component/ComponentKeyUpdaterMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/component/ComponentLinkMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/component/ComponentLinkMapper.xml
index 1b9ba17cba6..1b9ba17cba6 100644
--- a/sonar-db/src/main/resources/org/sonar/db/component/ComponentLinkMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/component/ComponentLinkMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/component/ComponentMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/component/ComponentMapper.xml
index 3f3f8bb34f6..3f3f8bb34f6 100644
--- a/sonar-db/src/main/resources/org/sonar/db/component/ComponentMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/component/ComponentMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/component/ResourceMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/component/ResourceMapper.xml
index b736637bd9f..b736637bd9f 100644
--- a/sonar-db/src/main/resources/org/sonar/db/component/ResourceMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/component/ResourceMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/component/SnapshotMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/component/SnapshotMapper.xml
index 4e00d6ac39c..4e00d6ac39c 100644
--- a/sonar-db/src/main/resources/org/sonar/db/component/SnapshotMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/component/SnapshotMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/duplication/DuplicationMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/duplication/DuplicationMapper.xml
index 6249a27e77f..6249a27e77f 100644
--- a/sonar-db/src/main/resources/org/sonar/db/duplication/DuplicationMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/duplication/DuplicationMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/event/EventMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/event/EventMapper.xml
index 236fd25ae4a..236fd25ae4a 100644
--- a/sonar-db/src/main/resources/org/sonar/db/event/EventMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/event/EventMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/issue/IssueChangeMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/issue/IssueChangeMapper.xml
index 04a9104f5f0..04a9104f5f0 100644
--- a/sonar-db/src/main/resources/org/sonar/db/issue/IssueChangeMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/issue/IssueChangeMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/issue/IssueMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/issue/IssueMapper.xml
index c1d551b8e26..c1d551b8e26 100644
--- a/sonar-db/src/main/resources/org/sonar/db/issue/IssueMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/issue/IssueMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/loadedtemplate/LoadedTemplateMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/loadedtemplate/LoadedTemplateMapper.xml
index 09ba1c86d4c..09ba1c86d4c 100644
--- a/sonar-db/src/main/resources/org/sonar/db/loadedtemplate/LoadedTemplateMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/loadedtemplate/LoadedTemplateMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/measure/MeasureMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/measure/MeasureMapper.xml
index 7db0a207c83..7db0a207c83 100644
--- a/sonar-db/src/main/resources/org/sonar/db/measure/MeasureMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/measure/MeasureMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/measure/custom/CustomMeasureMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/measure/custom/CustomMeasureMapper.xml
index 69cc9001983..69cc9001983 100644
--- a/sonar-db/src/main/resources/org/sonar/db/measure/custom/CustomMeasureMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/measure/custom/CustomMeasureMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/metric/MetricMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/metric/MetricMapper.xml
index cbc008ad818..cbc008ad818 100644
--- a/sonar-db/src/main/resources/org/sonar/db/metric/MetricMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/metric/MetricMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/notification/NotificationQueueMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/notification/NotificationQueueMapper.xml
index 79c79dcdafb..79c79dcdafb 100644
--- a/sonar-db/src/main/resources/org/sonar/db/notification/NotificationQueueMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/notification/NotificationQueueMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/organization/OrganizationMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/organization/OrganizationMapper.xml
index bd8039014c3..bd8039014c3 100644
--- a/sonar-db/src/main/resources/org/sonar/db/organization/OrganizationMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/organization/OrganizationMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/permission/AuthorizationMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/permission/AuthorizationMapper.xml
index 8df1106fb02..8df1106fb02 100644
--- a/sonar-db/src/main/resources/org/sonar/db/permission/AuthorizationMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/permission/AuthorizationMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/permission/GroupPermissionMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/permission/GroupPermissionMapper.xml
index 9d90ac5213f..9d90ac5213f 100644
--- a/sonar-db/src/main/resources/org/sonar/db/permission/GroupPermissionMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/permission/GroupPermissionMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/permission/UserPermissionMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/permission/UserPermissionMapper.xml
index 18091c27aa0..18091c27aa0 100644
--- a/sonar-db/src/main/resources/org/sonar/db/permission/UserPermissionMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/permission/UserPermissionMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/permission/template/PermissionTemplateCharacteristicMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/permission/template/PermissionTemplateCharacteristicMapper.xml
index c065eeb92bd..c065eeb92bd 100644
--- a/sonar-db/src/main/resources/org/sonar/db/permission/template/PermissionTemplateCharacteristicMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/permission/template/PermissionTemplateCharacteristicMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/permission/template/PermissionTemplateMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/permission/template/PermissionTemplateMapper.xml
index 9220cd6befd..9220cd6befd 100644
--- a/sonar-db/src/main/resources/org/sonar/db/permission/template/PermissionTemplateMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/permission/template/PermissionTemplateMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/property/InternalPropertiesMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/property/InternalPropertiesMapper.xml
index 2431e1b5514..2431e1b5514 100644
--- a/sonar-db/src/main/resources/org/sonar/db/property/InternalPropertiesMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/property/InternalPropertiesMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/property/PropertiesMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/property/PropertiesMapper.xml
index 8a8a9359975..8a8a9359975 100644
--- a/sonar-db/src/main/resources/org/sonar/db/property/PropertiesMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/property/PropertiesMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/purge/PurgeMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/purge/PurgeMapper.xml
index 8f70bf90514..8f70bf90514 100644
--- a/sonar-db/src/main/resources/org/sonar/db/purge/PurgeMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/purge/PurgeMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/qualitygate/ProjectQgateAssociationMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/qualitygate/ProjectQgateAssociationMapper.xml
index 1254dda2303..1254dda2303 100644
--- a/sonar-db/src/main/resources/org/sonar/db/qualitygate/ProjectQgateAssociationMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/qualitygate/ProjectQgateAssociationMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/qualitygate/QualityGateConditionMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/qualitygate/QualityGateConditionMapper.xml
index 0923db5ae60..0923db5ae60 100644
--- a/sonar-db/src/main/resources/org/sonar/db/qualitygate/QualityGateConditionMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/qualitygate/QualityGateConditionMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/qualitygate/QualityGateMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/qualitygate/QualityGateMapper.xml
index 64d2e58efb4..64d2e58efb4 100644
--- a/sonar-db/src/main/resources/org/sonar/db/qualitygate/QualityGateMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/qualitygate/QualityGateMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/qualityprofile/ActiveRuleMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/qualityprofile/ActiveRuleMapper.xml
index 4cdadf4f3d5..4cdadf4f3d5 100644
--- a/sonar-db/src/main/resources/org/sonar/db/qualityprofile/ActiveRuleMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/qualityprofile/ActiveRuleMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/qualityprofile/QProfileChangeMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/qualityprofile/QProfileChangeMapper.xml
index 7b9c275a44d..7b9c275a44d 100644
--- a/sonar-db/src/main/resources/org/sonar/db/qualityprofile/QProfileChangeMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/qualityprofile/QProfileChangeMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/qualityprofile/QualityProfileMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/qualityprofile/QualityProfileMapper.xml
index ff59efdc417..ff59efdc417 100644
--- a/sonar-db/src/main/resources/org/sonar/db/qualityprofile/QualityProfileMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/qualityprofile/QualityProfileMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/rule/RuleMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/rule/RuleMapper.xml
index ea1a061b8c3..ea1a061b8c3 100644
--- a/sonar-db/src/main/resources/org/sonar/db/rule/RuleMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/rule/RuleMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/rule/RuleRepositoryMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/rule/RuleRepositoryMapper.xml
index ab85f1002c9..ab85f1002c9 100644
--- a/sonar-db/src/main/resources/org/sonar/db/rule/RuleRepositoryMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/rule/RuleRepositoryMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/schemamigration/SchemaMigrationMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/schemamigration/SchemaMigrationMapper.xml
index efe2333954b..efe2333954b 100644
--- a/sonar-db/src/main/resources/org/sonar/db/schemamigration/SchemaMigrationMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/schemamigration/SchemaMigrationMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/source/FileSourceMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/source/FileSourceMapper.xml
index aae3d21df1d..aae3d21df1d 100644
--- a/sonar-db/src/main/resources/org/sonar/db/source/FileSourceMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/source/FileSourceMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/user/AuthorMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/user/AuthorMapper.xml
index 39e13226f0f..39e13226f0f 100644
--- a/sonar-db/src/main/resources/org/sonar/db/user/AuthorMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/user/AuthorMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/user/GroupMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/user/GroupMapper.xml
index 89fcbc40313..89fcbc40313 100644
--- a/sonar-db/src/main/resources/org/sonar/db/user/GroupMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/user/GroupMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/user/GroupMembershipMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/user/GroupMembershipMapper.xml
index 7eb8c835346..7eb8c835346 100644
--- a/sonar-db/src/main/resources/org/sonar/db/user/GroupMembershipMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/user/GroupMembershipMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/user/RoleMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/user/RoleMapper.xml
index 545d512be75..545d512be75 100644
--- a/sonar-db/src/main/resources/org/sonar/db/user/RoleMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/user/RoleMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/user/UserGroupMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/user/UserGroupMapper.xml
index 4ff5a60ffa3..4ff5a60ffa3 100644
--- a/sonar-db/src/main/resources/org/sonar/db/user/UserGroupMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/user/UserGroupMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/user/UserMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/user/UserMapper.xml
index 3989967c5fd..3989967c5fd 100644
--- a/sonar-db/src/main/resources/org/sonar/db/user/UserMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/user/UserMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/user/UserTokenMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/user/UserTokenMapper.xml
index 81e30144887..81e30144887 100644
--- a/sonar-db/src/main/resources/org/sonar/db/user/UserTokenMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/user/UserTokenMapper.xml
diff --git a/sonar-db/src/main/resources/org/sonar/db/webhook/WebhookDeliveryMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/webhook/WebhookDeliveryMapper.xml
index dc178b7d4d1..dc178b7d4d1 100644
--- a/sonar-db/src/main/resources/org/sonar/db/webhook/WebhookDeliveryMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/webhook/WebhookDeliveryMapper.xml
diff --git a/sonar-db/src/test/java/org/sonar/core/permission/ProjectPermissionsTest.java b/server/sonar-db-dao/src/test/java/org/sonar/core/permission/ProjectPermissionsTest.java
index eda239947ee..eda239947ee 100644
--- a/sonar-db/src/test/java/org/sonar/core/permission/ProjectPermissionsTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/core/permission/ProjectPermissionsTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/BatchSessionTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/BatchSessionTest.java
index 2f0d2e33e50..2f0d2e33e50 100644
--- a/sonar-db/src/test/java/org/sonar/db/BatchSessionTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/BatchSessionTest.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/DaoDatabaseUtilsTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/DaoDatabaseUtilsTest.java
new file mode 100644
index 00000000000..42ad27990ba
--- /dev/null
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/DaoDatabaseUtilsTest.java
@@ -0,0 +1,43 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.sonar.db;
+
+import org.junit.Test;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.sonar.db.DaoDatabaseUtils.buildLikeValue;
+import static org.sonar.db.WildcardPosition.AFTER;
+import static org.sonar.db.WildcardPosition.BEFORE;
+import static org.sonar.db.WildcardPosition.BEFORE_AND_AFTER;
+
+public class DaoDatabaseUtilsTest {
+
+ @Test
+ public void buildLikeValue_with_special_characters() {
+ String escapedValue = "like-\\/_/%//-value";
+ String wildcard = "%";
+
+ assertThat(buildLikeValue("like-\\_%/-value", BEFORE)).isEqualTo(wildcard + escapedValue);
+ assertThat(buildLikeValue("like-\\_%/-value", AFTER)).isEqualTo(escapedValue + wildcard);
+ assertThat(buildLikeValue("like-\\_%/-value", BEFORE_AND_AFTER)).isEqualTo(wildcard + escapedValue + wildcard);
+ }
+
+
+}
diff --git a/sonar-db/src/test/java/org/sonar/db/DaoModuleTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/DaoModuleTest.java
index 914622cfd1e..914622cfd1e 100644
--- a/sonar-db/src/test/java/org/sonar/db/DaoModuleTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/DaoModuleTest.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/DbTester.java b/server/sonar-db-dao/src/test/java/org/sonar/db/DbTester.java
new file mode 100644
index 00000000000..0742b39543e
--- /dev/null
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/DbTester.java
@@ -0,0 +1,299 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.sonar.db;
+
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Nullable;
+import org.apache.commons.lang.StringUtils;
+import org.picocontainer.containers.TransientPicoContainer;
+import org.sonar.api.utils.System2;
+import org.sonar.core.util.SequenceUuidFactory;
+import org.sonar.db.component.ComponentDbTester;
+import org.sonar.db.event.EventDbTester;
+import org.sonar.db.favorite.FavoriteDbTester;
+import org.sonar.db.issue.IssueDbTester;
+import org.sonar.db.notification.NotificationDbTester;
+import org.sonar.db.organization.OrganizationDbTester;
+import org.sonar.db.organization.OrganizationDto;
+import org.sonar.db.organization.OrganizationTesting;
+import org.sonar.db.permission.template.PermissionTemplateDbTester;
+import org.sonar.db.property.PropertyDbTester;
+import org.sonar.db.qualitygate.QualityGateDbTester;
+import org.sonar.db.qualityprofile.QualityProfileDbTester;
+import org.sonar.db.rule.RuleDbTester;
+import org.sonar.db.user.RootFlagAssertions;
+import org.sonar.db.user.UserDbTester;
+
+import static com.google.common.base.Preconditions.checkState;
+import static org.apache.commons.lang.RandomStringUtils.randomAlphanumeric;
+
+/**
+ * This class should be called using @Rule.
+ * Data is truncated between each tests. The schema is created between each test.
+ */
+public class DbTester extends AbstractDbTester<TestDb> {
+
+ private final System2 system2;
+ private DbClient client;
+ private DbSession session = null;
+ private boolean disableDefaultOrganization = false;
+ private boolean started = false;
+ private String defaultOrganizationUuid = randomAlphanumeric(40);
+ private OrganizationDto defaultOrganization;
+
+ private final UserDbTester userTester;
+ private final ComponentDbTester componentTester;
+ private final FavoriteDbTester favoriteTester;
+ private final EventDbTester eventTester;
+ private final OrganizationDbTester organizationTester;
+ private final PermissionTemplateDbTester permissionTemplateTester;
+ private final PropertyDbTester propertyTester;
+ private final QualityGateDbTester qualityGateDbTester;
+ private final IssueDbTester issueDbTester;
+ private final RuleDbTester ruleDbTester;
+ private final NotificationDbTester notificationDbTester;
+ private final RootFlagAssertions rootFlagAssertions;
+ private final QualityProfileDbTester qualityProfileDbTester;
+
+ public DbTester(System2 system2, @Nullable String schemaPath) {
+ super(TestDb.create(schemaPath));
+ this.system2 = system2;
+
+ initDbClient();
+ this.userTester = new UserDbTester(this);
+ this.componentTester = new ComponentDbTester(this);
+ this.favoriteTester = new FavoriteDbTester(this);
+ this.eventTester = new EventDbTester(this);
+ this.organizationTester = new OrganizationDbTester(this);
+ this.permissionTemplateTester = new PermissionTemplateDbTester(this);
+ this.propertyTester = new PropertyDbTester(this);
+ this.qualityGateDbTester = new QualityGateDbTester(this);
+ this.issueDbTester = new IssueDbTester(this);
+ this.ruleDbTester = new RuleDbTester(this);
+ this.notificationDbTester = new NotificationDbTester(this);
+ this.rootFlagAssertions = new RootFlagAssertions(this);
+ this.qualityProfileDbTester = new QualityProfileDbTester(this);
+ }
+
+ public static DbTester create() {
+ return new DbTester(System2.INSTANCE, null);
+ }
+
+ public static DbTester create(System2 system2) {
+ return new DbTester(system2, null);
+ }
+
+ public static DbTester createForSchema(System2 system2, Class testClass, String filename) {
+ String path = StringUtils.replaceChars(testClass.getCanonicalName(), '.', '/');
+ String schemaPath = path + "/" + filename;
+ return new DbTester(system2, schemaPath).setDisableDefaultOrganization(true);
+ }
+
+ private void initDbClient() {
+ TransientPicoContainer ioc = new TransientPicoContainer();
+ ioc.addComponent(db.getMyBatis());
+ ioc.addComponent(system2);
+ ioc.addComponent(new SequenceUuidFactory());
+ for (Class daoClass : DaoModule.classes()) {
+ ioc.addComponent(daoClass);
+ }
+ List<Dao> daos = ioc.getComponents(Dao.class);
+ client = new DbClient(db.getDatabase(), db.getMyBatis(), daos.toArray(new Dao[daos.size()]));
+ }
+
+ public DbTester setDisableDefaultOrganization(boolean b) {
+ checkState(!started, "DbTester is already started");
+ this.disableDefaultOrganization = b;
+ return this;
+ }
+
+ public DbTester setDefaultOrganizationUuid(String uuid) {
+ checkState(!started, "DbTester is already started");
+ this.defaultOrganizationUuid = uuid;
+ return this;
+ }
+
+ public DbTester enableOrganizations() {
+ properties().insertInternal("organization.enabled", "true");
+ return this;
+ }
+
+ @Override
+ protected void before() throws Throwable {
+ db.start();
+ db.truncateTables();
+ initDbClient();
+ if (!disableDefaultOrganization) {
+ insertDefaultOrganization();
+ }
+ started = true;
+ }
+
+ private void insertDefaultOrganization() {
+ defaultOrganization = OrganizationTesting.newOrganizationDto().setUuid(defaultOrganizationUuid);
+ try (DbSession dbSession = db.getMyBatis().openSession(false)) {
+ client.organizationDao().insert(dbSession, defaultOrganization);
+ client.internalPropertiesDao().save(dbSession, "organization.default", defaultOrganization.getUuid());
+ dbSession.commit();
+ }
+ }
+
+ public OrganizationDto getDefaultOrganization() {
+ checkState(defaultOrganization != null, "Default organization has not been created");
+ return defaultOrganization;
+ }
+
+ public UserDbTester users() {
+ return userTester;
+ }
+
+ public ComponentDbTester components() {
+ return componentTester;
+ }
+
+ public FavoriteDbTester favorites() {
+ return favoriteTester;
+ }
+
+ public EventDbTester events() {
+ return eventTester;
+ }
+
+ public OrganizationDbTester organizations() {
+ return organizationTester;
+ }
+
+ public PermissionTemplateDbTester permissionTemplates() {
+ return permissionTemplateTester;
+ }
+
+ public PropertyDbTester properties() {
+ return propertyTester;
+ }
+
+ public QualityGateDbTester qualityGates() {
+ return qualityGateDbTester;
+ }
+
+ public RootFlagAssertions rootFlag() {
+ return rootFlagAssertions;
+ }
+
+ public IssueDbTester issues() {
+ return issueDbTester;
+ }
+
+ public RuleDbTester rules() {
+ return ruleDbTester;
+ }
+
+ public NotificationDbTester notifications() {
+ return notificationDbTester;
+ }
+
+ public QualityProfileDbTester qualityProfiles() {
+ return qualityProfileDbTester;
+ }
+
+ @Override
+ protected void after() {
+ if (session != null) {
+ MyBatis.closeQuietly(session);
+ }
+ db.stop();
+ started = false;
+ }
+
+ public DbSession getSession() {
+ if (session == null) {
+ session = db.getMyBatis().openSession(false);
+ }
+ return session;
+ }
+
+ public void commit() {
+ getSession().commit();
+ }
+
+ public DbClient getDbClient() {
+ return client;
+ }
+
+ public int countRowsOfTable(DbSession dbSession, String tableName) {
+ return super.countRowsOfTable(tableName, new DbSessionConnectionSupplier(dbSession));
+ }
+
+ public int countSql(DbSession dbSession, String sql) {
+ return super.countSql(sql, new DbSessionConnectionSupplier(dbSession));
+ }
+
+ public List<Map<String, Object>> select(DbSession dbSession, String selectSql) {
+ return super.select(selectSql, new DbSessionConnectionSupplier(dbSession));
+ }
+
+ public Map<String, Object> selectFirst(DbSession dbSession, String selectSql) {
+ return super.selectFirst(selectSql, new DbSessionConnectionSupplier(dbSession));
+ }
+
+ @Deprecated
+ public MyBatis myBatis() {
+ return db.getMyBatis();
+ }
+
+ @Deprecated
+ public Connection openConnection() throws SQLException {
+ return getConnection();
+ }
+
+ private Connection getConnection() throws SQLException {
+ return db.getDatabase().getDataSource().getConnection();
+ }
+
+ @Deprecated
+ public Database database() {
+ return db.getDatabase();
+ }
+
+ public DatabaseCommands getCommands() {
+ return db.getCommands();
+ }
+
+ private static class DbSessionConnectionSupplier implements ConnectionSupplier {
+ private final DbSession dbSession;
+
+ public DbSessionConnectionSupplier(DbSession dbSession) {
+ this.dbSession = dbSession;
+ }
+
+ @Override
+ public Connection get() throws SQLException {
+ return dbSession.getConnection();
+ }
+
+ @Override
+ public void close() {
+ // closing dbSession is not our responsability
+ }
+ }
+
+}
diff --git a/sonar-db/src/test/java/org/sonar/db/IsAliveMapperTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/IsAliveMapperTest.java
index a1bbf54f2f1..a1bbf54f2f1 100644
--- a/sonar-db/src/test/java/org/sonar/db/IsAliveMapperTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/IsAliveMapperTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/MyBatisTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/MyBatisTest.java
index 75e9101a5e3..75e9101a5e3 100644
--- a/sonar-db/src/test/java/org/sonar/db/MyBatisTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/MyBatisTest.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/TestDb.java b/server/sonar-db-dao/src/test/java/org/sonar/db/TestDb.java
new file mode 100644
index 00000000000..3f2290e9551
--- /dev/null
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/TestDb.java
@@ -0,0 +1,53 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.sonar.db;
+
+import javax.annotation.Nullable;
+
+class TestDb extends CoreTestDb {
+
+ private static TestDb SINGLETON;
+
+ private MyBatis myBatis;
+
+ private TestDb(@Nullable String schemaPath) {
+ super(schemaPath);
+ }
+
+ static TestDb create(@Nullable String schemaPath) {
+ if (schemaPath == null) {
+ if (SINGLETON == null) {
+ SINGLETON = new TestDb(null);
+ }
+ return SINGLETON;
+ }
+ return new TestDb(schemaPath);
+ }
+
+ @Override
+ protected void extendStart(Database db) {
+ myBatis = new MyBatis(db);
+ myBatis.start();
+ }
+
+ MyBatis getMyBatis() {
+ return myBatis;
+ }
+}
diff --git a/sonar-db/src/test/java/org/sonar/db/ce/CeActivityDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/ce/CeActivityDaoTest.java
index 142344fbf12..142344fbf12 100644
--- a/sonar-db/src/test/java/org/sonar/db/ce/CeActivityDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/ce/CeActivityDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/ce/CeQueueDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/ce/CeQueueDaoTest.java
index 42fddaa6e27..42fddaa6e27 100644
--- a/sonar-db/src/test/java/org/sonar/db/ce/CeQueueDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/ce/CeQueueDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/ce/CeQueueTesting.java b/server/sonar-db-dao/src/test/java/org/sonar/db/ce/CeQueueTesting.java
index 27f837b9440..27f837b9440 100644
--- a/sonar-db/src/test/java/org/sonar/db/ce/CeQueueTesting.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/ce/CeQueueTesting.java
diff --git a/sonar-db/src/test/java/org/sonar/db/ce/CeScannerContextDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/ce/CeScannerContextDaoTest.java
index be6a8305dbc..be6a8305dbc 100644
--- a/sonar-db/src/test/java/org/sonar/db/ce/CeScannerContextDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/ce/CeScannerContextDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/ce/CeTaskInputDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/ce/CeTaskInputDaoTest.java
index 0553b42c9f1..0553b42c9f1 100644
--- a/sonar-db/src/test/java/org/sonar/db/ce/CeTaskInputDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/ce/CeTaskInputDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/ce/CeTaskQueryTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/ce/CeTaskQueryTest.java
index 3cdf2cdae74..3cdf2cdae74 100644
--- a/sonar-db/src/test/java/org/sonar/db/ce/CeTaskQueryTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/ce/CeTaskQueryTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/ce/LogsIteratorInputStreamTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/ce/LogsIteratorInputStreamTest.java
index d650584d546..d650584d546 100644
--- a/sonar-db/src/test/java/org/sonar/db/ce/LogsIteratorInputStreamTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/ce/LogsIteratorInputStreamTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/component/ComponentDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/component/ComponentDaoTest.java
index 5e88b5687d1..5e88b5687d1 100644
--- a/sonar-db/src/test/java/org/sonar/db/component/ComponentDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/component/ComponentDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/component/ComponentDaoWithDuplicatedKeysTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/component/ComponentDaoWithDuplicatedKeysTest.java
index cfe41abee06..cfe41abee06 100644
--- a/sonar-db/src/test/java/org/sonar/db/component/ComponentDaoWithDuplicatedKeysTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/component/ComponentDaoWithDuplicatedKeysTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/component/ComponentDbTester.java b/server/sonar-db-dao/src/test/java/org/sonar/db/component/ComponentDbTester.java
index a743e92c4bb..a743e92c4bb 100644
--- a/sonar-db/src/test/java/org/sonar/db/component/ComponentDbTester.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/component/ComponentDbTester.java
diff --git a/sonar-db/src/test/java/org/sonar/db/component/ComponentDtoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/component/ComponentDtoTest.java
index eb2d9264e85..eb2d9264e85 100644
--- a/sonar-db/src/test/java/org/sonar/db/component/ComponentDtoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/component/ComponentDtoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/component/ComponentKeyUpdaterDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/component/ComponentKeyUpdaterDaoTest.java
index 9ff86e83aef..9ff86e83aef 100644
--- a/sonar-db/src/test/java/org/sonar/db/component/ComponentKeyUpdaterDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/component/ComponentKeyUpdaterDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/component/ComponentLinkDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/component/ComponentLinkDaoTest.java
index 53fcb216462..53fcb216462 100644
--- a/sonar-db/src/test/java/org/sonar/db/component/ComponentLinkDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/component/ComponentLinkDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/component/ComponentLinkDtoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/component/ComponentLinkDtoTest.java
index 3d68d352ef6..3d68d352ef6 100644
--- a/sonar-db/src/test/java/org/sonar/db/component/ComponentLinkDtoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/component/ComponentLinkDtoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/component/ComponentLinkTesting.java b/server/sonar-db-dao/src/test/java/org/sonar/db/component/ComponentLinkTesting.java
index 0e3b880829a..0e3b880829a 100644
--- a/sonar-db/src/test/java/org/sonar/db/component/ComponentLinkTesting.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/component/ComponentLinkTesting.java
diff --git a/sonar-db/src/test/java/org/sonar/db/component/ComponentQueryTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/component/ComponentQueryTest.java
index 277cfcc8622..277cfcc8622 100644
--- a/sonar-db/src/test/java/org/sonar/db/component/ComponentQueryTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/component/ComponentQueryTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/component/ComponentTesting.java b/server/sonar-db-dao/src/test/java/org/sonar/db/component/ComponentTesting.java
index 0f7b8b901a6..0f7b8b901a6 100644
--- a/sonar-db/src/test/java/org/sonar/db/component/ComponentTesting.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/component/ComponentTesting.java
diff --git a/sonar-db/src/test/java/org/sonar/db/component/ComponentTreeQueryTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/component/ComponentTreeQueryTest.java
index a60a8a68559..a60a8a68559 100644
--- a/sonar-db/src/test/java/org/sonar/db/component/ComponentTreeQueryTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/component/ComponentTreeQueryTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/component/ComponentValidatorTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/component/ComponentValidatorTest.java
index 045646de62a..045646de62a 100644
--- a/sonar-db/src/test/java/org/sonar/db/component/ComponentValidatorTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/component/ComponentValidatorTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/component/ResourceDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/component/ResourceDaoTest.java
index aa2a4b72132..aa2a4b72132 100644
--- a/sonar-db/src/test/java/org/sonar/db/component/ResourceDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/component/ResourceDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/component/ResourceTypesRule.java b/server/sonar-db-dao/src/test/java/org/sonar/db/component/ResourceTypesRule.java
index 48799b3b949..48799b3b949 100644
--- a/sonar-db/src/test/java/org/sonar/db/component/ResourceTypesRule.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/component/ResourceTypesRule.java
diff --git a/sonar-db/src/test/java/org/sonar/db/component/SnapshotDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/component/SnapshotDaoTest.java
index d0d50ce382d..d0d50ce382d 100644
--- a/sonar-db/src/test/java/org/sonar/db/component/SnapshotDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/component/SnapshotDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/component/SnapshotDtoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/component/SnapshotDtoTest.java
index 4b8dd3e26af..4b8dd3e26af 100644
--- a/sonar-db/src/test/java/org/sonar/db/component/SnapshotDtoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/component/SnapshotDtoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/component/SnapshotQueryTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/component/SnapshotQueryTest.java
index 1f1bc8a1589..1f1bc8a1589 100644
--- a/sonar-db/src/test/java/org/sonar/db/component/SnapshotQueryTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/component/SnapshotQueryTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/component/SnapshotTesting.java b/server/sonar-db-dao/src/test/java/org/sonar/db/component/SnapshotTesting.java
index ef7e811b8d7..ef7e811b8d7 100644
--- a/sonar-db/src/test/java/org/sonar/db/component/SnapshotTesting.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/component/SnapshotTesting.java
diff --git a/sonar-db/src/test/java/org/sonar/db/duplication/DuplicationDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/duplication/DuplicationDaoTest.java
index 0c7ba44000c..0c7ba44000c 100644
--- a/sonar-db/src/test/java/org/sonar/db/duplication/DuplicationDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/duplication/DuplicationDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/event/EventDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/event/EventDaoTest.java
index ade29186355..ade29186355 100644
--- a/sonar-db/src/test/java/org/sonar/db/event/EventDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/event/EventDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/event/EventDbTester.java b/server/sonar-db-dao/src/test/java/org/sonar/db/event/EventDbTester.java
index a124731f36e..a124731f36e 100644
--- a/sonar-db/src/test/java/org/sonar/db/event/EventDbTester.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/event/EventDbTester.java
diff --git a/sonar-db/src/test/java/org/sonar/db/event/EventDtoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/event/EventDtoTest.java
index 7396a677d3d..7396a677d3d 100644
--- a/sonar-db/src/test/java/org/sonar/db/event/EventDtoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/event/EventDtoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/event/EventTesting.java b/server/sonar-db-dao/src/test/java/org/sonar/db/event/EventTesting.java
index 42a4d779b74..42a4d779b74 100644
--- a/sonar-db/src/test/java/org/sonar/db/event/EventTesting.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/event/EventTesting.java
diff --git a/sonar-db/src/test/java/org/sonar/db/event/EventValidatorTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/event/EventValidatorTest.java
index 35da47c1faa..35da47c1faa 100644
--- a/sonar-db/src/test/java/org/sonar/db/event/EventValidatorTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/event/EventValidatorTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/favorite/FavoriteDbTester.java b/server/sonar-db-dao/src/test/java/org/sonar/db/favorite/FavoriteDbTester.java
index 20c59786b65..20c59786b65 100644
--- a/sonar-db/src/test/java/org/sonar/db/favorite/FavoriteDbTester.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/favorite/FavoriteDbTester.java
diff --git a/sonar-db/src/test/java/org/sonar/db/issue/IssueChangeDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/issue/IssueChangeDaoTest.java
index c72675ed45f..c72675ed45f 100644
--- a/sonar-db/src/test/java/org/sonar/db/issue/IssueChangeDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/issue/IssueChangeDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/issue/IssueChangeDtoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/issue/IssueChangeDtoTest.java
index bda52ad0132..bda52ad0132 100644
--- a/sonar-db/src/test/java/org/sonar/db/issue/IssueChangeDtoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/issue/IssueChangeDtoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/issue/IssueChangeMapperTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/issue/IssueChangeMapperTest.java
index cb2d6b907dd..cb2d6b907dd 100644
--- a/sonar-db/src/test/java/org/sonar/db/issue/IssueChangeMapperTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/issue/IssueChangeMapperTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/issue/IssueDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/issue/IssueDaoTest.java
index 50be396202d..50be396202d 100644
--- a/sonar-db/src/test/java/org/sonar/db/issue/IssueDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/issue/IssueDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/issue/IssueDbTester.java b/server/sonar-db-dao/src/test/java/org/sonar/db/issue/IssueDbTester.java
index a21cb1b04dc..a21cb1b04dc 100644
--- a/sonar-db/src/test/java/org/sonar/db/issue/IssueDbTester.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/issue/IssueDbTester.java
diff --git a/sonar-db/src/test/java/org/sonar/db/issue/IssueDtoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/issue/IssueDtoTest.java
index 94f7bed0d5b..94f7bed0d5b 100644
--- a/sonar-db/src/test/java/org/sonar/db/issue/IssueDtoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/issue/IssueDtoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/issue/IssueMapperTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/issue/IssueMapperTest.java
index 325b027e716..325b027e716 100644
--- a/sonar-db/src/test/java/org/sonar/db/issue/IssueMapperTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/issue/IssueMapperTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/loadedtemplate/LoadedTemplateDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/loadedtemplate/LoadedTemplateDaoTest.java
index 2a51769a217..2a51769a217 100644
--- a/sonar-db/src/test/java/org/sonar/db/loadedtemplate/LoadedTemplateDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/loadedtemplate/LoadedTemplateDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/measure/MeasureDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/measure/MeasureDaoTest.java
index 26930dcc6f9..26930dcc6f9 100644
--- a/sonar-db/src/test/java/org/sonar/db/measure/MeasureDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/measure/MeasureDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/measure/MeasureDtoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/measure/MeasureDtoTest.java
index f1e91fb346f..f1e91fb346f 100644
--- a/sonar-db/src/test/java/org/sonar/db/measure/MeasureDtoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/measure/MeasureDtoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/measure/MeasureQueryTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/measure/MeasureQueryTest.java
index 5fe083e92f6..5fe083e92f6 100644
--- a/sonar-db/src/test/java/org/sonar/db/measure/MeasureQueryTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/measure/MeasureQueryTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/measure/MeasureTesting.java b/server/sonar-db-dao/src/test/java/org/sonar/db/measure/MeasureTesting.java
index 39e7671a281..39e7671a281 100644
--- a/sonar-db/src/test/java/org/sonar/db/measure/MeasureTesting.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/measure/MeasureTesting.java
diff --git a/sonar-db/src/test/java/org/sonar/db/measure/MeasureTreeQueryTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/measure/MeasureTreeQueryTest.java
index 1c33f86531f..1c33f86531f 100644
--- a/sonar-db/src/test/java/org/sonar/db/measure/MeasureTreeQueryTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/measure/MeasureTreeQueryTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/measure/PastMeasureDtoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/measure/PastMeasureDtoTest.java
index 07a630ad5f7..07a630ad5f7 100644
--- a/sonar-db/src/test/java/org/sonar/db/measure/PastMeasureDtoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/measure/PastMeasureDtoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/measure/ProjectMeasuresIndexerIteratorTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/measure/ProjectMeasuresIndexerIteratorTest.java
index 4361880cdc3..4361880cdc3 100644
--- a/sonar-db/src/test/java/org/sonar/db/measure/ProjectMeasuresIndexerIteratorTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/measure/ProjectMeasuresIndexerIteratorTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/measure/custom/CustomMeasureDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/measure/custom/CustomMeasureDaoTest.java
index 7c62baf240a..7c62baf240a 100644
--- a/sonar-db/src/test/java/org/sonar/db/measure/custom/CustomMeasureDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/measure/custom/CustomMeasureDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/measure/custom/CustomMeasureTesting.java b/server/sonar-db-dao/src/test/java/org/sonar/db/measure/custom/CustomMeasureTesting.java
index 00b0aff5ca4..00b0aff5ca4 100644
--- a/sonar-db/src/test/java/org/sonar/db/measure/custom/CustomMeasureTesting.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/measure/custom/CustomMeasureTesting.java
diff --git a/sonar-db/src/test/java/org/sonar/db/metric/MetricDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/metric/MetricDaoTest.java
index 9c9a7c8ba66..9c9a7c8ba66 100644
--- a/sonar-db/src/test/java/org/sonar/db/metric/MetricDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/metric/MetricDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/metric/MetricDtoFunctionsTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/metric/MetricDtoFunctionsTest.java
index 4a7bb754a04..4a7bb754a04 100644
--- a/sonar-db/src/test/java/org/sonar/db/metric/MetricDtoFunctionsTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/metric/MetricDtoFunctionsTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/metric/MetricDtoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/metric/MetricDtoTest.java
index 99a6bc5e518..99a6bc5e518 100644
--- a/sonar-db/src/test/java/org/sonar/db/metric/MetricDtoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/metric/MetricDtoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/metric/MetricTesting.java b/server/sonar-db-dao/src/test/java/org/sonar/db/metric/MetricTesting.java
index 0d4cf0f4ea5..0d4cf0f4ea5 100644
--- a/sonar-db/src/test/java/org/sonar/db/metric/MetricTesting.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/metric/MetricTesting.java
diff --git a/sonar-db/src/test/java/org/sonar/db/notification/NotificationDbTester.java b/server/sonar-db-dao/src/test/java/org/sonar/db/notification/NotificationDbTester.java
index 2df3453d9b8..2df3453d9b8 100644
--- a/sonar-db/src/test/java/org/sonar/db/notification/NotificationDbTester.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/notification/NotificationDbTester.java
diff --git a/sonar-db/src/test/java/org/sonar/db/notification/NotificationQueueDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/notification/NotificationQueueDaoTest.java
index 82584441c0b..82584441c0b 100644
--- a/sonar-db/src/test/java/org/sonar/db/notification/NotificationQueueDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/notification/NotificationQueueDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/organization/DefaultTemplatesTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/organization/DefaultTemplatesTest.java
index 368cac32b67..368cac32b67 100644
--- a/sonar-db/src/test/java/org/sonar/db/organization/DefaultTemplatesTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/organization/DefaultTemplatesTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/organization/OrganizationDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/organization/OrganizationDaoTest.java
index 1c1fe9287cf..1c1fe9287cf 100644
--- a/sonar-db/src/test/java/org/sonar/db/organization/OrganizationDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/organization/OrganizationDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/organization/OrganizationDbTester.java b/server/sonar-db-dao/src/test/java/org/sonar/db/organization/OrganizationDbTester.java
index 821bc5bfa7b..821bc5bfa7b 100644
--- a/sonar-db/src/test/java/org/sonar/db/organization/OrganizationDbTester.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/organization/OrganizationDbTester.java
diff --git a/sonar-db/src/test/java/org/sonar/db/organization/OrganizationTesting.java b/server/sonar-db-dao/src/test/java/org/sonar/db/organization/OrganizationTesting.java
index 703b5ae10cd..703b5ae10cd 100644
--- a/sonar-db/src/test/java/org/sonar/db/organization/OrganizationTesting.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/organization/OrganizationTesting.java
diff --git a/sonar-db/src/test/java/org/sonar/db/permission/AuthorizationDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/permission/AuthorizationDaoTest.java
index 07fbd3988dd..07fbd3988dd 100644
--- a/sonar-db/src/test/java/org/sonar/db/permission/AuthorizationDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/permission/AuthorizationDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/permission/GroupPermissionDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/permission/GroupPermissionDaoTest.java
index bb609fa0092..bb609fa0092 100644
--- a/sonar-db/src/test/java/org/sonar/db/permission/GroupPermissionDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/permission/GroupPermissionDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/permission/UserPermissionDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/permission/UserPermissionDaoTest.java
index 528cd03b971..528cd03b971 100644
--- a/sonar-db/src/test/java/org/sonar/db/permission/UserPermissionDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/permission/UserPermissionDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/permission/template/GroupWithPermissionTemplateDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/permission/template/GroupWithPermissionTemplateDaoTest.java
index 3c821f3c8d7..3c821f3c8d7 100644
--- a/sonar-db/src/test/java/org/sonar/db/permission/template/GroupWithPermissionTemplateDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/permission/template/GroupWithPermissionTemplateDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/permission/template/PermissionTemplateCharacteristicDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/permission/template/PermissionTemplateCharacteristicDaoTest.java
index 4f8a7a740eb..4f8a7a740eb 100644
--- a/sonar-db/src/test/java/org/sonar/db/permission/template/PermissionTemplateCharacteristicDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/permission/template/PermissionTemplateCharacteristicDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/permission/template/PermissionTemplateCharacteristicDtoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/permission/template/PermissionTemplateCharacteristicDtoTest.java
index 5e9a2aafe6b..5e9a2aafe6b 100644
--- a/sonar-db/src/test/java/org/sonar/db/permission/template/PermissionTemplateCharacteristicDtoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/permission/template/PermissionTemplateCharacteristicDtoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/permission/template/PermissionTemplateDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/permission/template/PermissionTemplateDaoTest.java
index b656c8371c2..b656c8371c2 100644
--- a/sonar-db/src/test/java/org/sonar/db/permission/template/PermissionTemplateDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/permission/template/PermissionTemplateDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/permission/template/PermissionTemplateDbTester.java b/server/sonar-db-dao/src/test/java/org/sonar/db/permission/template/PermissionTemplateDbTester.java
index aa4f22b07b6..aa4f22b07b6 100644
--- a/sonar-db/src/test/java/org/sonar/db/permission/template/PermissionTemplateDbTester.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/permission/template/PermissionTemplateDbTester.java
diff --git a/sonar-db/src/test/java/org/sonar/db/permission/template/PermissionTemplateTesting.java b/server/sonar-db-dao/src/test/java/org/sonar/db/permission/template/PermissionTemplateTesting.java
index 4fd4d60acf9..4fd4d60acf9 100644
--- a/sonar-db/src/test/java/org/sonar/db/permission/template/PermissionTemplateTesting.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/permission/template/PermissionTemplateTesting.java
diff --git a/sonar-db/src/test/java/org/sonar/db/permission/template/UserWithPermissionTemplateDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/permission/template/UserWithPermissionTemplateDaoTest.java
index 8f5097ef255..8f5097ef255 100644
--- a/sonar-db/src/test/java/org/sonar/db/permission/template/UserWithPermissionTemplateDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/permission/template/UserWithPermissionTemplateDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/property/InternalPropertiesDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/property/InternalPropertiesDaoTest.java
index 53e74704c57..53e74704c57 100644
--- a/sonar-db/src/test/java/org/sonar/db/property/InternalPropertiesDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/property/InternalPropertiesDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/property/PropertiesDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/property/PropertiesDaoTest.java
index 00c8552b381..00c8552b381 100644
--- a/sonar-db/src/test/java/org/sonar/db/property/PropertiesDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/property/PropertiesDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/property/PropertiesRow.java b/server/sonar-db-dao/src/test/java/org/sonar/db/property/PropertiesRow.java
index 51ee161eddc..51ee161eddc 100644
--- a/sonar-db/src/test/java/org/sonar/db/property/PropertiesRow.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/property/PropertiesRow.java
diff --git a/sonar-db/src/test/java/org/sonar/db/property/PropertiesRowAssert.java b/server/sonar-db-dao/src/test/java/org/sonar/db/property/PropertiesRowAssert.java
index 048d6d52252..048d6d52252 100644
--- a/sonar-db/src/test/java/org/sonar/db/property/PropertiesRowAssert.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/property/PropertiesRowAssert.java
diff --git a/sonar-db/src/test/java/org/sonar/db/property/PropertyDbTester.java b/server/sonar-db-dao/src/test/java/org/sonar/db/property/PropertyDbTester.java
index b2bb7b7c5a4..b2bb7b7c5a4 100644
--- a/sonar-db/src/test/java/org/sonar/db/property/PropertyDbTester.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/property/PropertyDbTester.java
diff --git a/sonar-db/src/test/java/org/sonar/db/property/PropertyDtoAssert.java b/server/sonar-db-dao/src/test/java/org/sonar/db/property/PropertyDtoAssert.java
index c16b86c0bed..c16b86c0bed 100644
--- a/sonar-db/src/test/java/org/sonar/db/property/PropertyDtoAssert.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/property/PropertyDtoAssert.java
diff --git a/sonar-db/src/test/java/org/sonar/db/property/PropertyDtoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/property/PropertyDtoTest.java
index 892f1a7b5bc..892f1a7b5bc 100644
--- a/sonar-db/src/test/java/org/sonar/db/property/PropertyDtoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/property/PropertyDtoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/purge/DbCleanerTestUtils.java b/server/sonar-db-dao/src/test/java/org/sonar/db/purge/DbCleanerTestUtils.java
index 8d7f6a452f8..8d7f6a452f8 100644
--- a/sonar-db/src/test/java/org/sonar/db/purge/DbCleanerTestUtils.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/purge/DbCleanerTestUtils.java
diff --git a/sonar-db/src/test/java/org/sonar/db/purge/IdUuidPairsTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/purge/IdUuidPairsTest.java
index 6fd9a364866..6fd9a364866 100644
--- a/sonar-db/src/test/java/org/sonar/db/purge/IdUuidPairsTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/purge/IdUuidPairsTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/purge/PurgeCommandsTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/purge/PurgeCommandsTest.java
index 82db2b299a5..82db2b299a5 100644
--- a/sonar-db/src/test/java/org/sonar/db/purge/PurgeCommandsTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/purge/PurgeCommandsTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/purge/PurgeConfigurationTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/purge/PurgeConfigurationTest.java
index 3afa0d3300a..3afa0d3300a 100644
--- a/sonar-db/src/test/java/org/sonar/db/purge/PurgeConfigurationTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/purge/PurgeConfigurationTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/purge/PurgeDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/purge/PurgeDaoTest.java
index 8296b7020a2..8296b7020a2 100644
--- a/sonar-db/src/test/java/org/sonar/db/purge/PurgeDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/purge/PurgeDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/purge/PurgeProfilerTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/purge/PurgeProfilerTest.java
index 7cd80e478f6..7cd80e478f6 100644
--- a/sonar-db/src/test/java/org/sonar/db/purge/PurgeProfilerTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/purge/PurgeProfilerTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/purge/PurgeableAnalysisDtoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/purge/PurgeableAnalysisDtoTest.java
index eb4a558fb17..eb4a558fb17 100644
--- a/sonar-db/src/test/java/org/sonar/db/purge/PurgeableAnalysisDtoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/purge/PurgeableAnalysisDtoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/purge/period/DefaultPeriodCleanerTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/purge/period/DefaultPeriodCleanerTest.java
index 0e11e370613..0e11e370613 100644
--- a/sonar-db/src/test/java/org/sonar/db/purge/period/DefaultPeriodCleanerTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/purge/period/DefaultPeriodCleanerTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/purge/period/DeleteAllFilterTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/purge/period/DeleteAllFilterTest.java
index 856e3a5a1f1..856e3a5a1f1 100644
--- a/sonar-db/src/test/java/org/sonar/db/purge/period/DeleteAllFilterTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/purge/period/DeleteAllFilterTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/purge/period/IntervalTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/purge/period/IntervalTest.java
index 2f2bdf6d33d..2f2bdf6d33d 100644
--- a/sonar-db/src/test/java/org/sonar/db/purge/period/IntervalTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/purge/period/IntervalTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/purge/period/KeepOneFilterTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/purge/period/KeepOneFilterTest.java
index 4148912718b..4148912718b 100644
--- a/sonar-db/src/test/java/org/sonar/db/purge/period/KeepOneFilterTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/purge/period/KeepOneFilterTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/qualitygate/ProjectQgateAssociationDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/qualitygate/ProjectQgateAssociationDaoTest.java
index 5cd69a23317..5cd69a23317 100644
--- a/sonar-db/src/test/java/org/sonar/db/qualitygate/ProjectQgateAssociationDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/qualitygate/ProjectQgateAssociationDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/qualitygate/ProjectQgateAssociationDtoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/qualitygate/ProjectQgateAssociationDtoTest.java
index 7b0e62261a7..7b0e62261a7 100644
--- a/sonar-db/src/test/java/org/sonar/db/qualitygate/ProjectQgateAssociationDtoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/qualitygate/ProjectQgateAssociationDtoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/qualitygate/ProjectQgateAssociationQueryTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/qualitygate/ProjectQgateAssociationQueryTest.java
index 0b6eca27135..0b6eca27135 100644
--- a/sonar-db/src/test/java/org/sonar/db/qualitygate/ProjectQgateAssociationQueryTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/qualitygate/ProjectQgateAssociationQueryTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/qualitygate/QualityGateConditionDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/qualitygate/QualityGateConditionDaoTest.java
index e6e7ddaf9bd..e6e7ddaf9bd 100644
--- a/sonar-db/src/test/java/org/sonar/db/qualitygate/QualityGateConditionDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/qualitygate/QualityGateConditionDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/qualitygate/QualityGateConditionDtoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/qualitygate/QualityGateConditionDtoTest.java
index 6fdf7f92b4e..6fdf7f92b4e 100644
--- a/sonar-db/src/test/java/org/sonar/db/qualitygate/QualityGateConditionDtoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/qualitygate/QualityGateConditionDtoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/qualitygate/QualityGateDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/qualitygate/QualityGateDaoTest.java
index 919a34c7042..919a34c7042 100644
--- a/sonar-db/src/test/java/org/sonar/db/qualitygate/QualityGateDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/qualitygate/QualityGateDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/qualitygate/QualityGateDbTester.java b/server/sonar-db-dao/src/test/java/org/sonar/db/qualitygate/QualityGateDbTester.java
index 8a663338b38..8a663338b38 100644
--- a/sonar-db/src/test/java/org/sonar/db/qualitygate/QualityGateDbTester.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/qualitygate/QualityGateDbTester.java
diff --git a/sonar-db/src/test/java/org/sonar/db/qualityprofile/ActiveRuleDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/ActiveRuleDaoTest.java
index 981bc293f6b..981bc293f6b 100644
--- a/sonar-db/src/test/java/org/sonar/db/qualityprofile/ActiveRuleDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/ActiveRuleDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/qualityprofile/ActiveRuleKeyTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/ActiveRuleKeyTest.java
index c04055e0107..c04055e0107 100644
--- a/sonar-db/src/test/java/org/sonar/db/qualityprofile/ActiveRuleKeyTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/ActiveRuleKeyTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/qualityprofile/ActiveRuleParamDtoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/ActiveRuleParamDtoTest.java
index d477fed8cad..d477fed8cad 100644
--- a/sonar-db/src/test/java/org/sonar/db/qualityprofile/ActiveRuleParamDtoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/ActiveRuleParamDtoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/qualityprofile/QProfileChangeDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/QProfileChangeDaoTest.java
index 337b6d49826..337b6d49826 100644
--- a/sonar-db/src/test/java/org/sonar/db/qualityprofile/QProfileChangeDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/QProfileChangeDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/qualityprofile/QProfileChangeDtoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/QProfileChangeDtoTest.java
index 82c7e671232..82c7e671232 100644
--- a/sonar-db/src/test/java/org/sonar/db/qualityprofile/QProfileChangeDtoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/QProfileChangeDtoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/qualityprofile/QualityProfileDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/QualityProfileDaoTest.java
index 32113be4dce..32113be4dce 100644
--- a/sonar-db/src/test/java/org/sonar/db/qualityprofile/QualityProfileDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/QualityProfileDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/qualityprofile/QualityProfileDbTester.java b/server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/QualityProfileDbTester.java
index 4d5eeea021f..4d5eeea021f 100644
--- a/sonar-db/src/test/java/org/sonar/db/qualityprofile/QualityProfileDbTester.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/QualityProfileDbTester.java
diff --git a/sonar-db/src/test/java/org/sonar/db/qualityprofile/QualityProfileTesting.java b/server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/QualityProfileTesting.java
index 208f4a70226..208f4a70226 100644
--- a/sonar-db/src/test/java/org/sonar/db/qualityprofile/QualityProfileTesting.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/QualityProfileTesting.java
diff --git a/sonar-db/src/test/java/org/sonar/db/rule/RuleDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/rule/RuleDaoTest.java
index bf5aa357384..bf5aa357384 100644
--- a/sonar-db/src/test/java/org/sonar/db/rule/RuleDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/rule/RuleDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/rule/RuleDbTester.java b/server/sonar-db-dao/src/test/java/org/sonar/db/rule/RuleDbTester.java
index 4dae1edd2db..4dae1edd2db 100644
--- a/sonar-db/src/test/java/org/sonar/db/rule/RuleDbTester.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/rule/RuleDbTester.java
diff --git a/sonar-db/src/test/java/org/sonar/db/rule/RuleDtoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/rule/RuleDtoTest.java
index b98b8c48a1e..b98b8c48a1e 100644
--- a/sonar-db/src/test/java/org/sonar/db/rule/RuleDtoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/rule/RuleDtoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/rule/RuleRepositoryDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/rule/RuleRepositoryDaoTest.java
index f6a9e2b8bf7..f6a9e2b8bf7 100644
--- a/sonar-db/src/test/java/org/sonar/db/rule/RuleRepositoryDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/rule/RuleRepositoryDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/rule/RuleTesting.java b/server/sonar-db-dao/src/test/java/org/sonar/db/rule/RuleTesting.java
index e1dd28654d8..e1dd28654d8 100644
--- a/sonar-db/src/test/java/org/sonar/db/rule/RuleTesting.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/rule/RuleTesting.java
diff --git a/sonar-db/src/test/java/org/sonar/db/schemamigration/SchemaMigrationDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/schemamigration/SchemaMigrationDaoTest.java
index 0d51747886c..0d51747886c 100644
--- a/sonar-db/src/test/java/org/sonar/db/schemamigration/SchemaMigrationDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/schemamigration/SchemaMigrationDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/source/FileSourceDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/source/FileSourceDaoTest.java
index 62934d1f55b..62934d1f55b 100644
--- a/sonar-db/src/test/java/org/sonar/db/source/FileSourceDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/source/FileSourceDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/source/FileSourceDtoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/source/FileSourceDtoTest.java
index 261590ea688..261590ea688 100644
--- a/sonar-db/src/test/java/org/sonar/db/source/FileSourceDtoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/source/FileSourceDtoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/user/AuthorDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/user/AuthorDaoTest.java
index 553ce7ca7fe..553ce7ca7fe 100644
--- a/sonar-db/src/test/java/org/sonar/db/user/AuthorDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/user/AuthorDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/user/GroupDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/user/GroupDaoTest.java
index 869ef70dc13..869ef70dc13 100644
--- a/sonar-db/src/test/java/org/sonar/db/user/GroupDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/user/GroupDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/user/GroupMembershipDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/user/GroupMembershipDaoTest.java
index b9f89695ffb..b9f89695ffb 100644
--- a/sonar-db/src/test/java/org/sonar/db/user/GroupMembershipDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/user/GroupMembershipDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/user/GroupMembershipQueryTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/user/GroupMembershipQueryTest.java
index d9e0f5db6a3..d9e0f5db6a3 100644
--- a/sonar-db/src/test/java/org/sonar/db/user/GroupMembershipQueryTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/user/GroupMembershipQueryTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/user/GroupTesting.java b/server/sonar-db-dao/src/test/java/org/sonar/db/user/GroupTesting.java
index 50af08373f3..50af08373f3 100644
--- a/sonar-db/src/test/java/org/sonar/db/user/GroupTesting.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/user/GroupTesting.java
diff --git a/sonar-db/src/test/java/org/sonar/db/user/RoleDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/user/RoleDaoTest.java
index 580b26956aa..580b26956aa 100644
--- a/sonar-db/src/test/java/org/sonar/db/user/RoleDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/user/RoleDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/user/RootFlagAssertions.java b/server/sonar-db-dao/src/test/java/org/sonar/db/user/RootFlagAssertions.java
index 42c78876717..42c78876717 100644
--- a/sonar-db/src/test/java/org/sonar/db/user/RootFlagAssertions.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/user/RootFlagAssertions.java
diff --git a/sonar-db/src/test/java/org/sonar/db/user/UserDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/user/UserDaoTest.java
index c1a8623223c..c1a8623223c 100644
--- a/sonar-db/src/test/java/org/sonar/db/user/UserDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/user/UserDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/user/UserDbTester.java b/server/sonar-db-dao/src/test/java/org/sonar/db/user/UserDbTester.java
index 4a2c2c48fa9..4a2c2c48fa9 100644
--- a/sonar-db/src/test/java/org/sonar/db/user/UserDbTester.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/user/UserDbTester.java
diff --git a/sonar-db/src/test/java/org/sonar/db/user/UserDtoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/user/UserDtoTest.java
index 5747d4a0726..5747d4a0726 100644
--- a/sonar-db/src/test/java/org/sonar/db/user/UserDtoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/user/UserDtoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/user/UserGroupDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/user/UserGroupDaoTest.java
index ca36ee4e574..ca36ee4e574 100644
--- a/sonar-db/src/test/java/org/sonar/db/user/UserGroupDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/user/UserGroupDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/user/UserTesting.java b/server/sonar-db-dao/src/test/java/org/sonar/db/user/UserTesting.java
index 682699ad4d9..682699ad4d9 100644
--- a/sonar-db/src/test/java/org/sonar/db/user/UserTesting.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/user/UserTesting.java
diff --git a/sonar-db/src/test/java/org/sonar/db/user/UserTokenDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/user/UserTokenDaoTest.java
index 6e6c2e3f3be..6e6c2e3f3be 100644
--- a/sonar-db/src/test/java/org/sonar/db/user/UserTokenDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/user/UserTokenDaoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/user/UserTokenDtoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/user/UserTokenDtoTest.java
index ab3dfd93799..ab3dfd93799 100644
--- a/sonar-db/src/test/java/org/sonar/db/user/UserTokenDtoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/user/UserTokenDtoTest.java
diff --git a/sonar-db/src/test/java/org/sonar/db/user/UserTokenTesting.java b/server/sonar-db-dao/src/test/java/org/sonar/db/user/UserTokenTesting.java
index 7f9a9092f76..7f9a9092f76 100644
--- a/sonar-db/src/test/java/org/sonar/db/user/UserTokenTesting.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/user/UserTokenTesting.java
diff --git a/sonar-db/src/test/java/org/sonar/db/webhook/WebhookDbTesting.java b/server/sonar-db-dao/src/test/java/org/sonar/db/webhook/WebhookDbTesting.java
index 4a698207ce3..4a698207ce3 100644
--- a/sonar-db/src/test/java/org/sonar/db/webhook/WebhookDbTesting.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/webhook/WebhookDbTesting.java
diff --git a/sonar-db/src/test/java/org/sonar/db/webhook/WebhookDeliveryDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/webhook/WebhookDeliveryDaoTest.java
index a6f8c8fe30f..a6f8c8fe30f 100644
--- a/sonar-db/src/test/java/org/sonar/db/webhook/WebhookDeliveryDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/webhook/WebhookDeliveryDaoTest.java
diff --git a/sonar-db/src/test/resources/org/sonar/core/qualitymodel/DefaultModelFinderTest/shared.xml b/server/sonar-db-dao/src/test/resources/org/sonar/core/qualitymodel/DefaultModelFinderTest/shared.xml
index 6e9cab1c815..6e9cab1c815 100644
--- a/sonar-db/src/test/resources/org/sonar/core/qualitymodel/DefaultModelFinderTest/shared.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/core/qualitymodel/DefaultModelFinderTest/shared.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/delete-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentDaoTest/delete-result.xml
index 011fa17ec22..011fa17ec22 100644
--- a/sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/delete-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentDaoTest/delete-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/delete.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentDaoTest/delete.xml
index 9b7272d6d8c..9b7272d6d8c 100644
--- a/sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/delete.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentDaoTest/delete.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/empty.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentDaoTest/empty.xml
index 871dedcb5e9..871dedcb5e9 100644
--- a/sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/empty.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentDaoTest/empty.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/insert-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentDaoTest/insert-result.xml
index 85e0a295d99..85e0a295d99 100644
--- a/sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/insert-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentDaoTest/insert-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/insert_disabled_component-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentDaoTest/insert_disabled_component-result.xml
index e938c80ac16..e938c80ac16 100644
--- a/sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/insert_disabled_component-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentDaoTest/insert_disabled_component-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/multi-modules.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentDaoTest/multi-modules.xml
index c0c504e1790..c0c504e1790 100644
--- a/sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/multi-modules.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentDaoTest/multi-modules.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/selectForIndexing.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentDaoTest/selectForIndexing.xml
index 596dd4eec2f..596dd4eec2f 100644
--- a/sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/selectForIndexing.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentDaoTest/selectForIndexing.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/select_module_files_tree.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentDaoTest/select_module_files_tree.xml
index 29ae2643397..29ae2643397 100644
--- a/sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/select_module_files_tree.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentDaoTest/select_module_files_tree.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/select_provisioned_projects.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentDaoTest/select_provisioned_projects.xml
index fec30da0d4c..fec30da0d4c 100644
--- a/sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/select_provisioned_projects.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentDaoTest/select_provisioned_projects.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/shared.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentDaoTest/shared.xml
index 9456f3b138b..9456f3b138b 100644
--- a/sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/shared.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentDaoTest/shared.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/shared_views.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentDaoTest/shared_views.xml
index 9c86662fbfa..9c86662fbfa 100644
--- a/sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/shared_views.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentDaoTest/shared_views.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/update-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentDaoTest/update-result.xml
index a714d3dfc3f..a714d3dfc3f 100644
--- a/sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/update-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentDaoTest/update-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/update.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentDaoTest/update.xml
index 9aaa040f73b..9aaa040f73b 100644
--- a/sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/update.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentDaoTest/update.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoWithDuplicatedKeysTest/schema.sql b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentDaoWithDuplicatedKeysTest/schema.sql
index f1420ae723a..f1420ae723a 100644
--- a/sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoWithDuplicatedKeysTest/schema.sql
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentDaoWithDuplicatedKeysTest/schema.sql
diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ComponentKeyUpdaterDaoTest/shared.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentKeyUpdaterDaoTest/shared.xml
index 10784d93cc5..10784d93cc5 100644
--- a/sonar-db/src/test/resources/org/sonar/db/component/ComponentKeyUpdaterDaoTest/shared.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentKeyUpdaterDaoTest/shared.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ComponentKeyUpdaterDaoTest/shouldBulkUpdateKey-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentKeyUpdaterDaoTest/shouldBulkUpdateKey-result.xml
index 7abbcfc4c3a..7abbcfc4c3a 100644
--- a/sonar-db/src/test/resources/org/sonar/db/component/ComponentKeyUpdaterDaoTest/shouldBulkUpdateKey-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentKeyUpdaterDaoTest/shouldBulkUpdateKey-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ComponentKeyUpdaterDaoTest/shouldBulkUpdateKeyOnOnlyOneSubmodule-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentKeyUpdaterDaoTest/shouldBulkUpdateKeyOnOnlyOneSubmodule-result.xml
index 8eed6e70baa..8eed6e70baa 100644
--- a/sonar-db/src/test/resources/org/sonar/db/component/ComponentKeyUpdaterDaoTest/shouldBulkUpdateKeyOnOnlyOneSubmodule-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentKeyUpdaterDaoTest/shouldBulkUpdateKeyOnOnlyOneSubmodule-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ComponentKeyUpdaterDaoTest/shouldNotUpdateAllSubmodules-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentKeyUpdaterDaoTest/shouldNotUpdateAllSubmodules-result.xml
index fd717059b49..fd717059b49 100644
--- a/sonar-db/src/test/resources/org/sonar/db/component/ComponentKeyUpdaterDaoTest/shouldNotUpdateAllSubmodules-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentKeyUpdaterDaoTest/shouldNotUpdateAllSubmodules-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ComponentKeyUpdaterDaoTest/shouldNotUpdateAllSubmodules.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentKeyUpdaterDaoTest/shouldNotUpdateAllSubmodules.xml
index ca546580800..ca546580800 100644
--- a/sonar-db/src/test/resources/org/sonar/db/component/ComponentKeyUpdaterDaoTest/shouldNotUpdateAllSubmodules.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentKeyUpdaterDaoTest/shouldNotUpdateAllSubmodules.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ComponentKeyUpdaterDaoTest/shouldUpdateKey-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentKeyUpdaterDaoTest/shouldUpdateKey-result.xml
index 2a39e7a002d..2a39e7a002d 100644
--- a/sonar-db/src/test/resources/org/sonar/db/component/ComponentKeyUpdaterDaoTest/shouldUpdateKey-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentKeyUpdaterDaoTest/shouldUpdateKey-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ComponentLinkDaoTest/delete.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentLinkDaoTest/delete.xml
index 8b89e7223ec..8b89e7223ec 100644
--- a/sonar-db/src/test/resources/org/sonar/db/component/ComponentLinkDaoTest/delete.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentLinkDaoTest/delete.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ComponentLinkDaoTest/empty.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentLinkDaoTest/empty.xml
index 871dedcb5e9..871dedcb5e9 100644
--- a/sonar-db/src/test/resources/org/sonar/db/component/ComponentLinkDaoTest/empty.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentLinkDaoTest/empty.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ComponentLinkDaoTest/insert-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentLinkDaoTest/insert-result.xml
index 8b89e7223ec..8b89e7223ec 100644
--- a/sonar-db/src/test/resources/org/sonar/db/component/ComponentLinkDaoTest/insert-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentLinkDaoTest/insert-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ComponentLinkDaoTest/shared.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentLinkDaoTest/shared.xml
index 33e9449d1dd..33e9449d1dd 100644
--- a/sonar-db/src/test/resources/org/sonar/db/component/ComponentLinkDaoTest/shared.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentLinkDaoTest/shared.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ComponentLinkDaoTest/update-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentLinkDaoTest/update-result.xml
index 8b89e7223ec..8b89e7223ec 100644
--- a/sonar-db/src/test/resources/org/sonar/db/component/ComponentLinkDaoTest/update-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentLinkDaoTest/update-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ComponentLinkDaoTest/update.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentLinkDaoTest/update.xml
index 6b80fc9d01c..6b80fc9d01c 100644
--- a/sonar-db/src/test/resources/org/sonar/db/component/ComponentLinkDaoTest/update.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ComponentLinkDaoTest/update.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ResourceDaoTest/update_authorization_date-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ResourceDaoTest/update_authorization_date-result.xml
index c2025d9f8bf..c2025d9f8bf 100644
--- a/sonar-db/src/test/resources/org/sonar/db/component/ResourceDaoTest/update_authorization_date-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ResourceDaoTest/update_authorization_date-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ResourceDaoTest/update_authorization_date.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ResourceDaoTest/update_authorization_date.xml
index ddc021ff656..ddc021ff656 100644
--- a/sonar-db/src/test/resources/org/sonar/db/component/ResourceDaoTest/update_authorization_date.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/ResourceDaoTest/update_authorization_date.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/component/SnapshotDaoTest/select_previous_version_snapshots.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/SnapshotDaoTest/select_previous_version_snapshots.xml
index 16a491eea53..16a491eea53 100644
--- a/sonar-db/src/test/resources/org/sonar/db/component/SnapshotDaoTest/select_previous_version_snapshots.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/SnapshotDaoTest/select_previous_version_snapshots.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/component/SnapshotDaoTest/select_snapshots_by_query.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/SnapshotDaoTest/select_snapshots_by_query.xml
index 69fe143fbfe..69fe143fbfe 100644
--- a/sonar-db/src/test/resources/org/sonar/db/component/SnapshotDaoTest/select_snapshots_by_query.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/SnapshotDaoTest/select_snapshots_by_query.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/component/SnapshotDaoTest/snapshots.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/SnapshotDaoTest/snapshots.xml
index 6bd2dd4ad0d..6bd2dd4ad0d 100644
--- a/sonar-db/src/test/resources/org/sonar/db/component/SnapshotDaoTest/snapshots.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/component/SnapshotDaoTest/snapshots.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/duplication/DuplicationDaoTest/insert-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/duplication/DuplicationDaoTest/insert-result.xml
index e2ac1e3b93c..e2ac1e3b93c 100644
--- a/sonar-db/src/test/resources/org/sonar/db/duplication/DuplicationDaoTest/insert-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/duplication/DuplicationDaoTest/insert-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/duplication/DuplicationDaoTest/insert.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/duplication/DuplicationDaoTest/insert.xml
index a4074f2e1dc..a4074f2e1dc 100644
--- a/sonar-db/src/test/resources/org/sonar/db/duplication/DuplicationDaoTest/insert.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/duplication/DuplicationDaoTest/insert.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/duplication/DuplicationDaoTest/select_candidates.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/duplication/DuplicationDaoTest/select_candidates.xml
index ebbfc3482fd..ebbfc3482fd 100644
--- a/sonar-db/src/test/resources/org/sonar/db/duplication/DuplicationDaoTest/select_candidates.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/duplication/DuplicationDaoTest/select_candidates.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/event/EventDaoTest/delete.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/event/EventDaoTest/delete.xml
index 072ba02691d..072ba02691d 100644
--- a/sonar-db/src/test/resources/org/sonar/db/event/EventDaoTest/delete.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/event/EventDaoTest/delete.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/event/EventDaoTest/empty.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/event/EventDaoTest/empty.xml
index 871dedcb5e9..871dedcb5e9 100644
--- a/sonar-db/src/test/resources/org/sonar/db/event/EventDaoTest/empty.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/event/EventDaoTest/empty.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/event/EventDaoTest/insert-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/event/EventDaoTest/insert-result.xml
index 9a9dc7862b3..9a9dc7862b3 100644
--- a/sonar-db/src/test/resources/org/sonar/db/event/EventDaoTest/insert-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/event/EventDaoTest/insert-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/event/EventDaoTest/shared.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/event/EventDaoTest/shared.xml
index 36c8b037b89..36c8b037b89 100644
--- a/sonar-db/src/test/resources/org/sonar/db/event/EventDaoTest/shared.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/event/EventDaoTest/shared.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/delete-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/delete-result.xml
index be1549d36f1..be1549d36f1 100644
--- a/sonar-db/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/delete-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/delete-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/delete.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/delete.xml
index 3277acb54ca..3277acb54ca 100644
--- a/sonar-db/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/delete.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/delete.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/empty.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/empty.xml
index 871dedcb5e9..871dedcb5e9 100644
--- a/sonar-db/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/empty.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/empty.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/insert-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/insert-result.xml
index 06468bff8a8..06468bff8a8 100644
--- a/sonar-db/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/insert-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/insert-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/selectChangelogOfNonClosedIssuesByComponent.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/selectChangelogOfNonClosedIssuesByComponent.xml
index efb08c7ae4f..efb08c7ae4f 100644
--- a/sonar-db/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/selectChangelogOfNonClosedIssuesByComponent.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/selectChangelogOfNonClosedIssuesByComponent.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/shared.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/shared.xml
index 0b181deb146..0b181deb146 100644
--- a/sonar-db/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/shared.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/shared.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/update-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/update-result.xml
index a1c436a6622..a1c436a6622 100644
--- a/sonar-db/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/update-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/update-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/update.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/update.xml
index 641f333faa3..641f333faa3 100644
--- a/sonar-db/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/update.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueChangeDaoTest/update.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/issue/IssueChangeMapperTest/insert_comment-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueChangeMapperTest/insert_comment-result.xml
index ed763c2952a..ed763c2952a 100644
--- a/sonar-db/src/test/resources/org/sonar/db/issue/IssueChangeMapperTest/insert_comment-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueChangeMapperTest/insert_comment-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/issue/IssueChangeMapperTest/insert_diff-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueChangeMapperTest/insert_diff-result.xml
index bbc0741292f..bbc0741292f 100644
--- a/sonar-db/src/test/resources/org/sonar/db/issue/IssueChangeMapperTest/insert_diff-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueChangeMapperTest/insert_diff-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/issue/IssueDaoTest/shared.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueDaoTest/shared.xml
index 7ecb9987931..7ecb9987931 100644
--- a/sonar-db/src/test/resources/org/sonar/db/issue/IssueDaoTest/shared.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueDaoTest/shared.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/issue/IssueDaoTest/should_select_issue_and_component_ids.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueDaoTest/should_select_issue_and_component_ids.xml
index a86bf7a776a..a86bf7a776a 100644
--- a/sonar-db/src/test/resources/org/sonar/db/issue/IssueDaoTest/should_select_issue_and_component_ids.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueDaoTest/should_select_issue_and_component_ids.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/issue/IssueDaoTest/should_select_non_closed_issues_by_module.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueDaoTest/should_select_non_closed_issues_by_module.xml
index 946a67dd5be..946a67dd5be 100644
--- a/sonar-db/src/test/resources/org/sonar/db/issue/IssueDaoTest/should_select_non_closed_issues_by_module.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueDaoTest/should_select_non_closed_issues_by_module.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/issue/IssueDaoTest/should_select_non_closed_issues_by_module_on_removed_project.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueDaoTest/should_select_non_closed_issues_by_module_on_removed_project.xml
index 8993c05ac53..8993c05ac53 100644
--- a/sonar-db/src/test/resources/org/sonar/db/issue/IssueDaoTest/should_select_non_closed_issues_by_module_on_removed_project.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueDaoTest/should_select_non_closed_issues_by_module_on_removed_project.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/issue/IssueStatsDaoTest/should_select_assignees.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueStatsDaoTest/should_select_assignees.xml
index 80787f7a14b..80787f7a14b 100644
--- a/sonar-db/src/test/resources/org/sonar/db/issue/IssueStatsDaoTest/should_select_assignees.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/issue/IssueStatsDaoTest/should_select_assignees.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/loadedtemplate/LoadedTemplateDaoTest/shouldCountByTypeAndKey.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/loadedtemplate/LoadedTemplateDaoTest/shouldCountByTypeAndKey.xml
index f4b6b01f4ab..f4b6b01f4ab 100644
--- a/sonar-db/src/test/resources/org/sonar/db/loadedtemplate/LoadedTemplateDaoTest/shouldCountByTypeAndKey.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/loadedtemplate/LoadedTemplateDaoTest/shouldCountByTypeAndKey.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/loadedtemplate/LoadedTemplateDaoTest/shouldInsert-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/loadedtemplate/LoadedTemplateDaoTest/shouldInsert-result.xml
index 6881dd82799..6881dd82799 100644
--- a/sonar-db/src/test/resources/org/sonar/db/loadedtemplate/LoadedTemplateDaoTest/shouldInsert-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/loadedtemplate/LoadedTemplateDaoTest/shouldInsert-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/loadedtemplate/LoadedTemplateDaoTest/shouldInsert.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/loadedtemplate/LoadedTemplateDaoTest/shouldInsert.xml
index 871dedcb5e9..871dedcb5e9 100644
--- a/sonar-db/src/test/resources/org/sonar/db/loadedtemplate/LoadedTemplateDaoTest/shouldInsert.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/loadedtemplate/LoadedTemplateDaoTest/shouldInsert.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/measure/MeasureDaoTest/empty.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/measure/MeasureDaoTest/empty.xml
index dda18829567..dda18829567 100644
--- a/sonar-db/src/test/resources/org/sonar/db/measure/MeasureDaoTest/empty.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/measure/MeasureDaoTest/empty.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/measure/MeasureDaoTest/insert-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/measure/MeasureDaoTest/insert-result.xml
index 7d63f40cee4..7d63f40cee4 100644
--- a/sonar-db/src/test/resources/org/sonar/db/measure/MeasureDaoTest/insert-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/measure/MeasureDaoTest/insert-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/measure/MeasureDaoTest/past_measures.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/measure/MeasureDaoTest/past_measures.xml
index f1640d1d48e..f1640d1d48e 100644
--- a/sonar-db/src/test/resources/org/sonar/db/measure/MeasureDaoTest/past_measures.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/measure/MeasureDaoTest/past_measures.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/measure/MeasureDaoTest/past_measures_with_person_id.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/measure/MeasureDaoTest/past_measures_with_person_id.xml
index d1886556bef..d1886556bef 100644
--- a/sonar-db/src/test/resources/org/sonar/db/measure/MeasureDaoTest/past_measures_with_person_id.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/measure/MeasureDaoTest/past_measures_with_person_id.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/measure/MeasureDaoTest/select_by_snapshot_and_metric_keys.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/measure/MeasureDaoTest/select_by_snapshot_and_metric_keys.xml
index 2c00644180f..2c00644180f 100644
--- a/sonar-db/src/test/resources/org/sonar/db/measure/MeasureDaoTest/select_by_snapshot_and_metric_keys.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/measure/MeasureDaoTest/select_by_snapshot_and_metric_keys.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/measure/MeasureDaoTest/shared.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/measure/MeasureDaoTest/shared.xml
index 3ef039a19d8..3ef039a19d8 100644
--- a/sonar-db/src/test/resources/org/sonar/db/measure/MeasureDaoTest/shared.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/measure/MeasureDaoTest/shared.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/measure/MeasureDaoTest/with_some_measures_for_developer.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/measure/MeasureDaoTest/with_some_measures_for_developer.xml
index 67736536768..67736536768 100644
--- a/sonar-db/src/test/resources/org/sonar/db/measure/MeasureDaoTest/with_some_measures_for_developer.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/measure/MeasureDaoTest/with_some_measures_for_developer.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/measure/custom/CustomMeasureDaoTest/select_by_metric_key_and_text_value.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/measure/custom/CustomMeasureDaoTest/select_by_metric_key_and_text_value.xml
index ff00f759c69..ff00f759c69 100644
--- a/sonar-db/src/test/resources/org/sonar/db/measure/custom/CustomMeasureDaoTest/select_by_metric_key_and_text_value.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/measure/custom/CustomMeasureDaoTest/select_by_metric_key_and_text_value.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/metric/MetricDaoTest/manual_metric.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/metric/MetricDaoTest/manual_metric.xml
index 325a5a71661..325a5a71661 100644
--- a/sonar-db/src/test/resources/org/sonar/db/metric/MetricDaoTest/manual_metric.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/metric/MetricDaoTest/manual_metric.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/metric/MetricDaoTest/shared.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/metric/MetricDaoTest/shared.xml
index 1a43f8ed39e..1a43f8ed39e 100644
--- a/sonar-db/src/test/resources/org/sonar/db/metric/MetricDaoTest/shared.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/metric/MetricDaoTest/shared.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/notification/NotificationQueueDaoTest/should_delete_notification-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/notification/NotificationQueueDaoTest/should_delete_notification-result.xml
index 81662a5913d..81662a5913d 100644
--- a/sonar-db/src/test/resources/org/sonar/db/notification/NotificationQueueDaoTest/should_delete_notification-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/notification/NotificationQueueDaoTest/should_delete_notification-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/notification/NotificationQueueDaoTest/should_delete_notification.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/notification/NotificationQueueDaoTest/should_delete_notification.xml
index 6611a054610..6611a054610 100644
--- a/sonar-db/src/test/resources/org/sonar/db/notification/NotificationQueueDaoTest/should_delete_notification.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/notification/NotificationQueueDaoTest/should_delete_notification.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/notification/NotificationQueueDaoTest/should_findOldest.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/notification/NotificationQueueDaoTest/should_findOldest.xml
index 6611a054610..6611a054610 100644
--- a/sonar-db/src/test/resources/org/sonar/db/notification/NotificationQueueDaoTest/should_findOldest.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/notification/NotificationQueueDaoTest/should_findOldest.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/notification/NotificationQueueDaoTest/should_insert_new_notification_queue-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/notification/NotificationQueueDaoTest/should_insert_new_notification_queue-result.xml
index 7afce2d8263..7afce2d8263 100644
--- a/sonar-db/src/test/resources/org/sonar/db/notification/NotificationQueueDaoTest/should_insert_new_notification_queue-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/notification/NotificationQueueDaoTest/should_insert_new_notification_queue-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/anonymous_should_be_authorized.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/anonymous_should_be_authorized.xml
index a06cc07314c..a06cc07314c 100644
--- a/sonar-db/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/anonymous_should_be_authorized.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/anonymous_should_be_authorized.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/group_should_be_authorized.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/group_should_be_authorized.xml
index e106b84c5bd..e106b84c5bd 100644
--- a/sonar-db/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/group_should_be_authorized.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/group_should_be_authorized.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/keep_authorized_project_ids_for_anonymous.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/keep_authorized_project_ids_for_anonymous.xml
index 15490848b37..15490848b37 100644
--- a/sonar-db/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/keep_authorized_project_ids_for_anonymous.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/keep_authorized_project_ids_for_anonymous.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/keep_authorized_project_ids_for_group.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/keep_authorized_project_ids_for_group.xml
index fcebe81297b..fcebe81297b 100644
--- a/sonar-db/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/keep_authorized_project_ids_for_group.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/keep_authorized_project_ids_for_group.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/keep_authorized_project_ids_for_user.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/keep_authorized_project_ids_for_user.xml
index 4063a186b29..4063a186b29 100644
--- a/sonar-db/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/keep_authorized_project_ids_for_user.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/keep_authorized_project_ids_for_user.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/keep_authorized_users_for_role_and_project_for_anonymous.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/keep_authorized_users_for_role_and_project_for_anonymous.xml
index 6bf48995401..6bf48995401 100644
--- a/sonar-db/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/keep_authorized_users_for_role_and_project_for_anonymous.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/keep_authorized_users_for_role_and_project_for_anonymous.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/keep_authorized_users_for_role_and_project_for_group.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/keep_authorized_users_for_role_and_project_for_group.xml
index 6983aebaf87..6983aebaf87 100644
--- a/sonar-db/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/keep_authorized_users_for_role_and_project_for_group.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/keep_authorized_users_for_role_and_project_for_group.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/keep_authorized_users_for_role_and_project_for_user.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/keep_authorized_users_for_role_and_project_for_user.xml
index 6475b6ce25f..6475b6ce25f 100644
--- a/sonar-db/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/keep_authorized_users_for_role_and_project_for_user.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/keep_authorized_users_for_role_and_project_for_user.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/should_return_root_project_keys_for_anonymous.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/should_return_root_project_keys_for_anonymous.xml
index f883b12fdba..f883b12fdba 100644
--- a/sonar-db/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/should_return_root_project_keys_for_anonymous.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/should_return_root_project_keys_for_anonymous.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/should_return_root_project_keys_for_group.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/should_return_root_project_keys_for_group.xml
index 865ef000262..865ef000262 100644
--- a/sonar-db/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/should_return_root_project_keys_for_group.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/should_return_root_project_keys_for_group.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/should_return_root_project_keys_for_user.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/should_return_root_project_keys_for_user.xml
index ebeb0828cf8..ebeb0828cf8 100644
--- a/sonar-db/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/should_return_root_project_keys_for_user.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/should_return_root_project_keys_for_user.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/user_should_be_authorized.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/user_should_be_authorized.xml
index aac77f3ec7f..aac77f3ec7f 100644
--- a/sonar-db/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/user_should_be_authorized.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/AuthorizationDaoTest/user_should_be_authorized.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/addGroupPermissionToTemplate-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/addGroupPermissionToTemplate-result.xml
index 723b752a4ea..723b752a4ea 100644
--- a/sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/addGroupPermissionToTemplate-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/addGroupPermissionToTemplate-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/addGroupPermissionToTemplate.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/addGroupPermissionToTemplate.xml
index 80598facfd8..80598facfd8 100644
--- a/sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/addGroupPermissionToTemplate.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/addGroupPermissionToTemplate.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/addNullGroupPermissionToTemplate-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/addNullGroupPermissionToTemplate-result.xml
index 0d079b41562..0d079b41562 100644
--- a/sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/addNullGroupPermissionToTemplate-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/addNullGroupPermissionToTemplate-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/addNullGroupPermissionToTemplate.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/addNullGroupPermissionToTemplate.xml
index 80598facfd8..80598facfd8 100644
--- a/sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/addNullGroupPermissionToTemplate.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/addNullGroupPermissionToTemplate.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/addUserPermissionToTemplate-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/addUserPermissionToTemplate-result.xml
index 8872e5085c7..8872e5085c7 100644
--- a/sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/addUserPermissionToTemplate-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/addUserPermissionToTemplate-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/addUserPermissionToTemplate.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/addUserPermissionToTemplate.xml
index 80598facfd8..80598facfd8 100644
--- a/sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/addUserPermissionToTemplate.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/addUserPermissionToTemplate.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/createPermissionTemplate-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/createPermissionTemplate-result.xml
index dd74c4392d5..dd74c4392d5 100644
--- a/sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/createPermissionTemplate-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/createPermissionTemplate-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/createPermissionTemplate.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/createPermissionTemplate.xml
index 5ed00ba028b..5ed00ba028b 100644
--- a/sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/createPermissionTemplate.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/createPermissionTemplate.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/deletePermissionTemplate-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/deletePermissionTemplate-result.xml
index 1d571ad9b89..1d571ad9b89 100644
--- a/sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/deletePermissionTemplate-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/deletePermissionTemplate-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/deletePermissionTemplate.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/deletePermissionTemplate.xml
index 275ba620952..275ba620952 100644
--- a/sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/deletePermissionTemplate.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/deletePermissionTemplate.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/removeUserPermissionFromTemplate-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/removeUserPermissionFromTemplate-result.xml
index 364f9814318..364f9814318 100644
--- a/sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/removeUserPermissionFromTemplate-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/removeUserPermissionFromTemplate-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/removeUserPermissionFromTemplate.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/removeUserPermissionFromTemplate.xml
index 1f3581fd45a..1f3581fd45a 100644
--- a/sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/removeUserPermissionFromTemplate.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/removeUserPermissionFromTemplate.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/remove_by_group-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/remove_by_group-result.xml
index 09f019b2851..09f019b2851 100644
--- a/sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/remove_by_group-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/remove_by_group-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/remove_by_group.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/remove_by_group.xml
index 5c30479a98d..5c30479a98d 100644
--- a/sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/remove_by_group.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/remove_by_group.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/selectAllPermissionTemplates.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/selectAllPermissionTemplates.xml
index e86a593e447..e86a593e447 100644
--- a/sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/selectAllPermissionTemplates.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/selectAllPermissionTemplates.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/selectEmptyPermissionTemplate.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/selectEmptyPermissionTemplate.xml
index daecd0c42eb..daecd0c42eb 100644
--- a/sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/selectEmptyPermissionTemplate.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/selectEmptyPermissionTemplate.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/selectPermissionTemplate.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/selectPermissionTemplate.xml
index ad39eaf134b..ad39eaf134b 100644
--- a/sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/selectPermissionTemplate.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/selectPermissionTemplate.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/updatePermissionTemplate-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/updatePermissionTemplate-result.xml
index a544f302569..a544f302569 100644
--- a/sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/updatePermissionTemplate-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/updatePermissionTemplate-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/updatePermissionTemplate.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/updatePermissionTemplate.xml
index 50174155593..50174155593 100644
--- a/sonar-db/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/updatePermissionTemplate.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/PermissionTemplateDaoTest/updatePermissionTemplate.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/permission/template/UserWithPermissionTemplateDaoTest/select_only_enable_users.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/UserWithPermissionTemplateDaoTest/select_only_enable_users.xml
index 07574c24e02..07574c24e02 100644
--- a/sonar-db/src/test/resources/org/sonar/db/permission/template/UserWithPermissionTemplateDaoTest/select_only_enable_users.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/UserWithPermissionTemplateDaoTest/select_only_enable_users.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/permission/template/UserWithPermissionTemplateDaoTest/users_with_permissions.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/UserWithPermissionTemplateDaoTest/users_with_permissions.xml
index 528d308bd52..528d308bd52 100644
--- a/sonar-db/src/test/resources/org/sonar/db/permission/template/UserWithPermissionTemplateDaoTest/users_with_permissions.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/UserWithPermissionTemplateDaoTest/users_with_permissions.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/permission/template/UserWithPermissionTemplateDaoTest/users_with_permissions_should_be_sorted_by_user_name.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/UserWithPermissionTemplateDaoTest/users_with_permissions_should_be_sorted_by_user_name.xml
index ba020005237..ba020005237 100644
--- a/sonar-db/src/test/resources/org/sonar/db/permission/template/UserWithPermissionTemplateDaoTest/users_with_permissions_should_be_sorted_by_user_name.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/permission/template/UserWithPermissionTemplateDaoTest/users_with_permissions_should_be_sorted_by_user_name.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/property/PropertiesDaoTest/select_module_properties_tree.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/property/PropertiesDaoTest/select_module_properties_tree.xml
index 5a54e126313..5a54e126313 100644
--- a/sonar-db/src/test/resources/org/sonar/db/property/PropertiesDaoTest/select_module_properties_tree.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/property/PropertiesDaoTest/select_module_properties_tree.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldDeleteResource.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldDeleteResource.xml
index 3d6194b56b7..3d6194b56b7 100644
--- a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldDeleteResource.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldDeleteResource.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldDeleteSnapshot-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldDeleteSnapshot-result.xml
index b40e87b9ebd..b40e87b9ebd 100644
--- a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldDeleteSnapshot-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldDeleteSnapshot-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldDeleteSnapshot.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldDeleteSnapshot.xml
index 1bfbfa5b4c1..1bfbfa5b4c1 100644
--- a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldDeleteSnapshot.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldDeleteSnapshot.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldDeleteWastedMeasuresWhenPurgingAnalysis-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldDeleteWastedMeasuresWhenPurgingAnalysis-result.xml
index b2b6d9f4667..b2b6d9f4667 100644
--- a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldDeleteWastedMeasuresWhenPurgingAnalysis-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldDeleteWastedMeasuresWhenPurgingAnalysis-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldDeleteWastedMeasuresWhenPurgingAnalysis.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldDeleteWastedMeasuresWhenPurgingAnalysis.xml
index 2c0a7c2df25..2c0a7c2df25 100644
--- a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldDeleteWastedMeasuresWhenPurgingAnalysis.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldDeleteWastedMeasuresWhenPurgingAnalysis.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldPurgeAnalysis-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldPurgeAnalysis-result.xml
index 6cb45a58538..6cb45a58538 100644
--- a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldPurgeAnalysis-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldPurgeAnalysis-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldPurgeAnalysis.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldPurgeAnalysis.xml
index d086021a151..d086021a151 100644
--- a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldPurgeAnalysis.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldPurgeAnalysis.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/close_issues_clean_index_and_files_sources_of_specified_components-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/close_issues_clean_index_and_files_sources_of_specified_components-result.xml
index c215f710ae8..c215f710ae8 100644
--- a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/close_issues_clean_index_and_files_sources_of_specified_components-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/close_issues_clean_index_and_files_sources_of_specified_components-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/close_issues_clean_index_and_files_sources_of_specified_components.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/close_issues_clean_index_and_files_sources_of_specified_components.xml
index 067b6bc475e..067b6bc475e 100644
--- a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/close_issues_clean_index_and_files_sources_of_specified_components.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/close_issues_clean_index_and_files_sources_of_specified_components.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/delete_project_in_ce_activity_when_deleting_project.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/delete_project_in_ce_activity_when_deleting_project.xml
index c3aaaf41967..c3aaaf41967 100644
--- a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/delete_project_in_ce_activity_when_deleting_project.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/delete_project_in_ce_activity_when_deleting_project.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteAbortedBuilds-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteAbortedBuilds-result.xml
index 9e44a2747a0..9e44a2747a0 100644
--- a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteAbortedBuilds-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteAbortedBuilds-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteAbortedBuilds.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteAbortedBuilds.xml
index 25b0bc85f72..25b0bc85f72 100644
--- a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteAbortedBuilds.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteAbortedBuilds.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteAnalyses-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteAnalyses-result.xml
index 878595a3c80..878595a3c80 100644
--- a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteAnalyses-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteAnalyses-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteAnalyses.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteAnalyses.xml
index d4cdd256532..d4cdd256532 100644
--- a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteAnalyses.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteAnalyses.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteHistoricalDataOfDirectoriesAndFiles-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteHistoricalDataOfDirectoriesAndFiles-result.xml
index 50363033280..50363033280 100644
--- a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteHistoricalDataOfDirectoriesAndFiles-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteHistoricalDataOfDirectoriesAndFiles-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteHistoricalDataOfDirectoriesAndFiles.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteHistoricalDataOfDirectoriesAndFiles.xml
index c16f17c37fb..c16f17c37fb 100644
--- a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteHistoricalDataOfDirectoriesAndFiles.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteHistoricalDataOfDirectoriesAndFiles.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteProject.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteProject.xml
index a9aa7de8859..a9aa7de8859 100644
--- a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteProject.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteProject.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldPurgeProject-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldPurgeProject-result.xml
index da4577aa3ea..da4577aa3ea 100644
--- a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldPurgeProject-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldPurgeProject-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldPurgeProject.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldPurgeProject.xml
index bacd6410fdd..bacd6410fdd 100644
--- a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldPurgeProject.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldPurgeProject.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldSelectPurgeableAnalysis.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldSelectPurgeableAnalysis.xml
index 19482e742cb..19482e742cb 100644
--- a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldSelectPurgeableAnalysis.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldSelectPurgeableAnalysis.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/should_delete_all_closed_issues-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/should_delete_all_closed_issues-result.xml
index 0134fc7d46a..0134fc7d46a 100644
--- a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/should_delete_all_closed_issues-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/should_delete_all_closed_issues-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/should_delete_all_closed_issues.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/should_delete_all_closed_issues.xml
index 103f0b8adcd..103f0b8adcd 100644
--- a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/should_delete_all_closed_issues.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/should_delete_all_closed_issues.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/should_delete_old_closed_issues-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/should_delete_old_closed_issues-result.xml
index ebd202e3d58..ebd202e3d58 100644
--- a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/should_delete_old_closed_issues-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/should_delete_old_closed_issues-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/should_delete_old_closed_issues.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/should_delete_old_closed_issues.xml
index 17c663de33f..17c663de33f 100644
--- a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/should_delete_old_closed_issues.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/should_delete_old_closed_issues.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/view_sub_view_and_tech_project.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/view_sub_view_and_tech_project.xml
index cfbf18b903a..cfbf18b903a 100644
--- a/sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/view_sub_view_and_tech_project.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/purge/PurgeDaoTest/view_sub_view_and_tech_project.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/qualitygate/ProjectQgateAssociationDaoTest/shared.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/qualitygate/ProjectQgateAssociationDaoTest/shared.xml
index 13ca29d2acc..13ca29d2acc 100644
--- a/sonar-db/src/test/resources/org/sonar/db/qualitygate/ProjectQgateAssociationDaoTest/shared.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/qualitygate/ProjectQgateAssociationDaoTest/shared.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/qualitygate/QualityGateConditionDaoTest/delete-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/qualitygate/QualityGateConditionDaoTest/delete-result.xml
index 62f82411cd7..62f82411cd7 100644
--- a/sonar-db/src/test/resources/org/sonar/db/qualitygate/QualityGateConditionDaoTest/delete-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/qualitygate/QualityGateConditionDaoTest/delete-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/qualitygate/QualityGateConditionDaoTest/insert-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/qualitygate/QualityGateConditionDaoTest/insert-result.xml
index 20aa1a86ee7..20aa1a86ee7 100644
--- a/sonar-db/src/test/resources/org/sonar/db/qualitygate/QualityGateConditionDaoTest/insert-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/qualitygate/QualityGateConditionDaoTest/insert-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/qualitygate/QualityGateConditionDaoTest/insert.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/qualitygate/QualityGateConditionDaoTest/insert.xml
index 871dedcb5e9..871dedcb5e9 100644
--- a/sonar-db/src/test/resources/org/sonar/db/qualitygate/QualityGateConditionDaoTest/insert.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/qualitygate/QualityGateConditionDaoTest/insert.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/qualitygate/QualityGateConditionDaoTest/selectForQualityGate.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/qualitygate/QualityGateConditionDaoTest/selectForQualityGate.xml
index 82faf6d5f15..82faf6d5f15 100644
--- a/sonar-db/src/test/resources/org/sonar/db/qualitygate/QualityGateConditionDaoTest/selectForQualityGate.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/qualitygate/QualityGateConditionDaoTest/selectForQualityGate.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/qualitygate/QualityGateConditionDaoTest/shouldCleanConditions-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/qualitygate/QualityGateConditionDaoTest/shouldCleanConditions-result.xml
index 220010e9ac3..220010e9ac3 100644
--- a/sonar-db/src/test/resources/org/sonar/db/qualitygate/QualityGateConditionDaoTest/shouldCleanConditions-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/qualitygate/QualityGateConditionDaoTest/shouldCleanConditions-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/qualitygate/QualityGateConditionDaoTest/shouldCleanConditions.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/qualitygate/QualityGateConditionDaoTest/shouldCleanConditions.xml
index 7ac79bfc6c9..7ac79bfc6c9 100644
--- a/sonar-db/src/test/resources/org/sonar/db/qualitygate/QualityGateConditionDaoTest/shouldCleanConditions.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/qualitygate/QualityGateConditionDaoTest/shouldCleanConditions.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/qualitygate/QualityGateConditionDaoTest/update-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/qualitygate/QualityGateConditionDaoTest/update-result.xml
index 1364e7c51e9..1364e7c51e9 100644
--- a/sonar-db/src/test/resources/org/sonar/db/qualitygate/QualityGateConditionDaoTest/update-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/qualitygate/QualityGateConditionDaoTest/update-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/qualitygate/QualityGateDaoTest/delete-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/qualitygate/QualityGateDaoTest/delete-result.xml
index 3c0ddc793c1..3c0ddc793c1 100644
--- a/sonar-db/src/test/resources/org/sonar/db/qualitygate/QualityGateDaoTest/delete-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/qualitygate/QualityGateDaoTest/delete-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/qualitygate/QualityGateDaoTest/insert-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/qualitygate/QualityGateDaoTest/insert-result.xml
index 00881f2945b..00881f2945b 100644
--- a/sonar-db/src/test/resources/org/sonar/db/qualitygate/QualityGateDaoTest/insert-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/qualitygate/QualityGateDaoTest/insert-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/qualitygate/QualityGateDaoTest/insert.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/qualitygate/QualityGateDaoTest/insert.xml
index 871dedcb5e9..871dedcb5e9 100644
--- a/sonar-db/src/test/resources/org/sonar/db/qualitygate/QualityGateDaoTest/insert.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/qualitygate/QualityGateDaoTest/insert.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/qualitygate/QualityGateDaoTest/selectAll.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/qualitygate/QualityGateDaoTest/selectAll.xml
index 6eb3e577e4e..6eb3e577e4e 100644
--- a/sonar-db/src/test/resources/org/sonar/db/qualitygate/QualityGateDaoTest/selectAll.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/qualitygate/QualityGateDaoTest/selectAll.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/qualitygate/QualityGateDaoTest/update-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/qualitygate/QualityGateDaoTest/update-result.xml
index 4f80f313eae..4f80f313eae 100644
--- a/sonar-db/src/test/resources/org/sonar/db/qualitygate/QualityGateDaoTest/update-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/qualitygate/QualityGateDaoTest/update-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/delete-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/delete-result.xml
index b2344538ad3..b2344538ad3 100644
--- a/sonar-db/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/delete-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/delete-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/inheritance.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/inheritance.xml
index 4768bc64707..4768bc64707 100644
--- a/sonar-db/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/inheritance.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/inheritance.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/insert-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/insert-result.xml
index e8c8c219220..e8c8c219220 100644
--- a/sonar-db/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/insert-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/insert-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/projects.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/projects.xml
index 7c458bef8ae..7c458bef8ae 100644
--- a/sonar-db/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/projects.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/projects.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/select_all_is_sorted_by_profile_name.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/select_all_is_sorted_by_profile_name.xml
index 94e35a7f936..94e35a7f936 100644
--- a/sonar-db/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/select_all_is_sorted_by_profile_name.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/select_all_is_sorted_by_profile_name.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/select_by_language.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/select_by_language.xml
index 05dbd930efd..05dbd930efd 100644
--- a/sonar-db/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/select_by_language.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/select_by_language.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/shared.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/shared.xml
index 5736ef59bd4..5736ef59bd4 100644
--- a/sonar-db/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/shared.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/shared.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/update-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/update-result.xml
index d7cb1a3a3a6..d7cb1a3a3a6 100644
--- a/sonar-db/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/update-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/qualityprofile/QualityProfileDaoTest/update-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/rule/RuleDaoTest/insert_parameter-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/rule/RuleDaoTest/insert_parameter-result.xml
index 09c5a0403c7..09c5a0403c7 100644
--- a/sonar-db/src/test/resources/org/sonar/db/rule/RuleDaoTest/insert_parameter-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/rule/RuleDaoTest/insert_parameter-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/rule/RuleDaoTest/insert_parameter.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/rule/RuleDaoTest/insert_parameter.xml
index 82a2fb6c472..82a2fb6c472 100644
--- a/sonar-db/src/test/resources/org/sonar/db/rule/RuleDaoTest/insert_parameter.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/rule/RuleDaoTest/insert_parameter.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/rule/RuleDaoTest/selectEnabled.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/rule/RuleDaoTest/selectEnabled.xml
index e17e6ca13db..e17e6ca13db 100644
--- a/sonar-db/src/test/resources/org/sonar/db/rule/RuleDaoTest/selectEnabled.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/rule/RuleDaoTest/selectEnabled.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/rule/RuleDaoTest/selectNonManual.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/rule/RuleDaoTest/selectNonManual.xml
index f4c6a9bc32f..f4c6a9bc32f 100644
--- a/sonar-db/src/test/resources/org/sonar/db/rule/RuleDaoTest/selectNonManual.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/rule/RuleDaoTest/selectNonManual.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/rule/RuleDaoTest/select_parameters_by_rule_key.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/rule/RuleDaoTest/select_parameters_by_rule_key.xml
index 65d9b4e5a45..65d9b4e5a45 100644
--- a/sonar-db/src/test/resources/org/sonar/db/rule/RuleDaoTest/select_parameters_by_rule_key.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/rule/RuleDaoTest/select_parameters_by_rule_key.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/rule/RuleDaoTest/shared.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/rule/RuleDaoTest/shared.xml
index c4d8d267be2..c4d8d267be2 100644
--- a/sonar-db/src/test/resources/org/sonar/db/rule/RuleDaoTest/shared.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/rule/RuleDaoTest/shared.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/rule/RuleDaoTest/update.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/rule/RuleDaoTest/update.xml
index c75cc533f11..c75cc533f11 100644
--- a/sonar-db/src/test/resources/org/sonar/db/rule/RuleDaoTest/update.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/rule/RuleDaoTest/update.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/rule/RuleDaoTest/update_parameter-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/rule/RuleDaoTest/update_parameter-result.xml
index 3907b7d23c6..3907b7d23c6 100644
--- a/sonar-db/src/test/resources/org/sonar/db/rule/RuleDaoTest/update_parameter-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/rule/RuleDaoTest/update_parameter-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/rule/RuleDaoTest/update_parameter.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/rule/RuleDaoTest/update_parameter.xml
index 2eb61cc7029..2eb61cc7029 100644
--- a/sonar-db/src/test/resources/org/sonar/db/rule/RuleDaoTest/update_parameter.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/rule/RuleDaoTest/update_parameter.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/source/FileSourceDaoTest/insert-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/source/FileSourceDaoTest/insert-result.xml
index 95f9882e86f..95f9882e86f 100644
--- a/sonar-db/src/test/resources/org/sonar/db/source/FileSourceDaoTest/insert-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/source/FileSourceDaoTest/insert-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/source/FileSourceDaoTest/no_line_hashes_when_only_test_data.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/source/FileSourceDaoTest/no_line_hashes_when_only_test_data.xml
index 010394a156e..010394a156e 100644
--- a/sonar-db/src/test/resources/org/sonar/db/source/FileSourceDaoTest/no_line_hashes_when_only_test_data.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/source/FileSourceDaoTest/no_line_hashes_when_only_test_data.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/source/FileSourceDaoTest/shared.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/source/FileSourceDaoTest/shared.xml
index f7374caf041..f7374caf041 100644
--- a/sonar-db/src/test/resources/org/sonar/db/source/FileSourceDaoTest/shared.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/source/FileSourceDaoTest/shared.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/source/FileSourceDaoTest/update-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/source/FileSourceDaoTest/update-result.xml
index 1bcf34dac4e..1bcf34dac4e 100644
--- a/sonar-db/src/test/resources/org/sonar/db/source/FileSourceDaoTest/update-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/source/FileSourceDaoTest/update-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/user/AuthorDaoTest/add_missing_module_uuid_path-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/AuthorDaoTest/add_missing_module_uuid_path-result.xml
index fb7d71381e9..fb7d71381e9 100644
--- a/sonar-db/src/test/resources/org/sonar/db/user/AuthorDaoTest/add_missing_module_uuid_path-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/AuthorDaoTest/add_missing_module_uuid_path-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/user/AuthorDaoTest/add_missing_module_uuid_path.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/AuthorDaoTest/add_missing_module_uuid_path.xml
index fb0854fccbe..fb0854fccbe 100644
--- a/sonar-db/src/test/resources/org/sonar/db/user/AuthorDaoTest/add_missing_module_uuid_path.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/AuthorDaoTest/add_missing_module_uuid_path.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/user/AuthorDaoTest/countDeveloperLogins.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/AuthorDaoTest/countDeveloperLogins.xml
index 42776255866..42776255866 100644
--- a/sonar-db/src/test/resources/org/sonar/db/user/AuthorDaoTest/countDeveloperLogins.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/AuthorDaoTest/countDeveloperLogins.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldInsertAuthor-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldInsertAuthor-result.xml
index 40e855c7588..40e855c7588 100644
--- a/sonar-db/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldInsertAuthor-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldInsertAuthor-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldInsertAuthor.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldInsertAuthor.xml
index fb0854fccbe..fb0854fccbe 100644
--- a/sonar-db/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldInsertAuthor.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldInsertAuthor.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldInsertAuthorAndDeveloper-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldInsertAuthorAndDeveloper-result.xml
index 70b0c58d48b..70b0c58d48b 100644
--- a/sonar-db/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldInsertAuthorAndDeveloper-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldInsertAuthorAndDeveloper-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldInsertAuthorAndDeveloper.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldInsertAuthorAndDeveloper.xml
index fb0854fccbe..fb0854fccbe 100644
--- a/sonar-db/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldInsertAuthorAndDeveloper.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldInsertAuthorAndDeveloper.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldPreventAuthorsAndDevelopersDuplication-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldPreventAuthorsAndDevelopersDuplication-result.xml
index dfd6673d49f..dfd6673d49f 100644
--- a/sonar-db/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldPreventAuthorsAndDevelopersDuplication-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldPreventAuthorsAndDevelopersDuplication-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldPreventAuthorsAndDevelopersDuplication.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldPreventAuthorsAndDevelopersDuplication.xml
index dfd6673d49f..dfd6673d49f 100644
--- a/sonar-db/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldPreventAuthorsAndDevelopersDuplication.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldPreventAuthorsAndDevelopersDuplication.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldPreventAuthorsDuplication-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldPreventAuthorsDuplication-result.xml
index 8203f8edbc2..8203f8edbc2 100644
--- a/sonar-db/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldPreventAuthorsDuplication-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldPreventAuthorsDuplication-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldPreventAuthorsDuplication.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldPreventAuthorsDuplication.xml
index 8203f8edbc2..8203f8edbc2 100644
--- a/sonar-db/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldPreventAuthorsDuplication.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldPreventAuthorsDuplication.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldSelectByLogin.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldSelectByLogin.xml
index 40e855c7588..40e855c7588 100644
--- a/sonar-db/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldSelectByLogin.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/AuthorDaoTest/shouldSelectByLogin.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/user/GroupDaoTest/find_by_user_login.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/GroupDaoTest/find_by_user_login.xml
index ac73aa52865..ac73aa52865 100644
--- a/sonar-db/src/test/resources/org/sonar/db/user/GroupDaoTest/find_by_user_login.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/GroupDaoTest/find_by_user_login.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/user/GroupDaoTest/select_by_query.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/GroupDaoTest/select_by_query.xml
index dfd5c76a545..dfd5c76a545 100644
--- a/sonar-db/src/test/resources/org/sonar/db/user/GroupDaoTest/select_by_query.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/GroupDaoTest/select_by_query.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/user/GroupMembershipDaoTest/select_user_group.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/GroupMembershipDaoTest/select_user_group.xml
index a1aa720d1f4..a1aa720d1f4 100644
--- a/sonar-db/src/test/resources/org/sonar/db/user/GroupMembershipDaoTest/select_user_group.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/GroupMembershipDaoTest/select_user_group.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/user/GroupMembershipDaoTest/shared.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/GroupMembershipDaoTest/shared.xml
index 425e2ed57c3..425e2ed57c3 100644
--- a/sonar-db/src/test/resources/org/sonar/db/user/GroupMembershipDaoTest/shared.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/GroupMembershipDaoTest/shared.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/user/GroupMembershipDaoTest/shared_plus_empty_group.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/GroupMembershipDaoTest/shared_plus_empty_group.xml
index a475bba797f..a475bba797f 100644
--- a/sonar-db/src/test/resources/org/sonar/db/user/GroupMembershipDaoTest/shared_plus_empty_group.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/GroupMembershipDaoTest/shared_plus_empty_group.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/user/GroupMembershipDaoTest/should_be_sorted_by_group_name.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/GroupMembershipDaoTest/should_be_sorted_by_group_name.xml
index 2dfe5eada94..2dfe5eada94 100644
--- a/sonar-db/src/test/resources/org/sonar/db/user/GroupMembershipDaoTest/should_be_sorted_by_group_name.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/GroupMembershipDaoTest/should_be_sorted_by_group_name.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/user/RoleDaoTest/deleteGroupPermissionsByGroupId-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/RoleDaoTest/deleteGroupPermissionsByGroupId-result.xml
index 84044ff3812..84044ff3812 100644
--- a/sonar-db/src/test/resources/org/sonar/db/user/RoleDaoTest/deleteGroupPermissionsByGroupId-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/RoleDaoTest/deleteGroupPermissionsByGroupId-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/user/RoleDaoTest/deleteGroupPermissionsByGroupId.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/RoleDaoTest/deleteGroupPermissionsByGroupId.xml
index 245efc76429..245efc76429 100644
--- a/sonar-db/src/test/resources/org/sonar/db/user/RoleDaoTest/deleteGroupPermissionsByGroupId.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/RoleDaoTest/deleteGroupPermissionsByGroupId.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/user/UserDaoTest/exists_by_email.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserDaoTest/exists_by_email.xml
index 63dd4a57e8d..63dd4a57e8d 100644
--- a/sonar-db/src/test/resources/org/sonar/db/user/UserDaoTest/exists_by_email.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserDaoTest/exists_by_email.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/user/UserDaoTest/insert-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserDaoTest/insert-result.xml
index a15c10259bc..a15c10259bc 100644
--- a/sonar-db/src/test/resources/org/sonar/db/user/UserDaoTest/insert-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserDaoTest/insert-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/user/UserDaoTest/selectActiveUserByLogin.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserDaoTest/selectActiveUserByLogin.xml
index aa0b64fadf2..aa0b64fadf2 100644
--- a/sonar-db/src/test/resources/org/sonar/db/user/UserDaoTest/selectActiveUserByLogin.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserDaoTest/selectActiveUserByLogin.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/user/UserDaoTest/selectGroupByName.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserDaoTest/selectGroupByName.xml
index a7c55777b0b..a7c55777b0b 100644
--- a/sonar-db/src/test/resources/org/sonar/db/user/UserDaoTest/selectGroupByName.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserDaoTest/selectGroupByName.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/user/UserDaoTest/selectUsersByIds.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserDaoTest/selectUsersByIds.xml
index 65e155941df..65e155941df 100644
--- a/sonar-db/src/test/resources/org/sonar/db/user/UserDaoTest/selectUsersByIds.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserDaoTest/selectUsersByIds.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/user/UserDaoTest/selectUsersByLogins.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserDaoTest/selectUsersByLogins.xml
index 65e155941df..65e155941df 100644
--- a/sonar-db/src/test/resources/org/sonar/db/user/UserDaoTest/selectUsersByLogins.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserDaoTest/selectUsersByLogins.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/user/UserDaoTest/selectUsersByQuery.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserDaoTest/selectUsersByQuery.xml
index 8f6bacd7c43..8f6bacd7c43 100644
--- a/sonar-db/src/test/resources/org/sonar/db/user/UserDaoTest/selectUsersByQuery.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserDaoTest/selectUsersByQuery.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/user/UserDaoTest/selectUsersByText.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserDaoTest/selectUsersByText.xml
index 89b1302e298..89b1302e298 100644
--- a/sonar-db/src/test/resources/org/sonar/db/user/UserDaoTest/selectUsersByText.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserDaoTest/selectUsersByText.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/user/UserDaoTest/select_by_login.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserDaoTest/select_by_login.xml
index d07ecce8728..d07ecce8728 100644
--- a/sonar-db/src/test/resources/org/sonar/db/user/UserDaoTest/select_by_login.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserDaoTest/select_by_login.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/user/UserDaoTest/select_nullable_by_scm_account.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserDaoTest/select_nullable_by_scm_account.xml
index 3ded656c9f4..3ded656c9f4 100644
--- a/sonar-db/src/test/resources/org/sonar/db/user/UserDaoTest/select_nullable_by_scm_account.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserDaoTest/select_nullable_by_scm_account.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/user/UserDaoTest/select_nullable_by_scm_account_return_many_results_when_same_email_is_used_by_many_users.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserDaoTest/select_nullable_by_scm_account_return_many_results_when_same_email_is_used_by_many_users.xml
index 63dd4a57e8d..63dd4a57e8d 100644
--- a/sonar-db/src/test/resources/org/sonar/db/user/UserDaoTest/select_nullable_by_scm_account_return_many_results_when_same_email_is_used_by_many_users.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserDaoTest/select_nullable_by_scm_account_return_many_results_when_same_email_is_used_by_many_users.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/user/UserDaoTest/update_user.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserDaoTest/update_user.xml
index a15c10259bc..a15c10259bc 100644
--- a/sonar-db/src/test/resources/org/sonar/db/user/UserDaoTest/update_user.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserDaoTest/update_user.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/user/UserGroupDaoTest/delete_members_by_group_id-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserGroupDaoTest/delete_members_by_group_id-result.xml
index edac414e636..edac414e636 100644
--- a/sonar-db/src/test/resources/org/sonar/db/user/UserGroupDaoTest/delete_members_by_group_id-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserGroupDaoTest/delete_members_by_group_id-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/user/UserGroupDaoTest/delete_members_by_group_id.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserGroupDaoTest/delete_members_by_group_id.xml
index 2430e53dd8e..2430e53dd8e 100644
--- a/sonar-db/src/test/resources/org/sonar/db/user/UserGroupDaoTest/delete_members_by_group_id.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserGroupDaoTest/delete_members_by_group_id.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/user/UserGroupDaoTest/insert-result.xml b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserGroupDaoTest/insert-result.xml
index 2e5bb1ada57..2e5bb1ada57 100644
--- a/sonar-db/src/test/resources/org/sonar/db/user/UserGroupDaoTest/insert-result.xml
+++ b/server/sonar-db-dao/src/test/resources/org/sonar/db/user/UserGroupDaoTest/insert-result.xml
diff --git a/server/sonar-db-migration/pom.xml b/server/sonar-db-migration/pom.xml
index d0e39a588cd..14d0b4f4c78 100644
--- a/server/sonar-db-migration/pom.xml
+++ b/server/sonar-db-migration/pom.xml
@@ -20,7 +20,7 @@
</dependency>
<dependency>
<groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-db</artifactId>
+ <artifactId>sonar-db-core</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
@@ -36,7 +36,7 @@
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
- <artifactId>sonar-db</artifactId>
+ <artifactId>sonar-db-core</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
diff --git a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/history/MigrationHistoryImpl.java b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/history/MigrationHistoryImpl.java
index 405024c50ac..f36134be0d7 100644
--- a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/history/MigrationHistoryImpl.java
+++ b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/history/MigrationHistoryImpl.java
@@ -21,28 +21,33 @@ package org.sonar.server.platform.db.migration.history;
import com.google.common.base.Throwables;
import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
import java.sql.SQLException;
-import java.util.Collections;
+import java.sql.Statement;
+import java.util.ArrayList;
+import java.util.Comparator;
import java.util.List;
import java.util.Optional;
+import org.sonar.db.Database;
import org.sonar.db.DatabaseUtils;
-import org.sonar.db.DbClient;
-import org.sonar.db.DbSession;
-import org.sonar.db.schemamigration.SchemaMigrationMapper;
import org.sonar.server.platform.db.migration.step.RegisteredMigrationStep;
import static com.google.common.base.Preconditions.checkState;
+import static org.sonar.core.util.stream.Collectors.toList;
public class MigrationHistoryImpl implements MigrationHistory {
- private final DbClient dbClient;
+ private static final String SCHEMA_MIGRATIONS_TABLE = "schema_migrations";
- public MigrationHistoryImpl(DbClient dbClient) {
- this.dbClient = dbClient;
+ private final Database database;
+
+ public MigrationHistoryImpl(Database database) {
+ this.database = database;
}
@Override
public void start() {
- try (Connection connection = dbClient.getDatabase().getDataSource().getConnection()) {
+ try (Connection connection = database.getDataSource().getConnection()) {
checkState(DatabaseUtils.tableExists(MigrationHistoryTable.NAME, connection), "Migration history table is missing");
} catch (SQLException e) {
Throwables.propagate(e);
@@ -56,26 +61,44 @@ public class MigrationHistoryImpl implements MigrationHistory {
@Override
public Optional<Long> getLastMigrationNumber() {
- try (DbSession dbSession = dbClient.openSession(false)) {
- List<Integer> versions = getMapper(dbSession).selectVersions();
+ try (Connection connection = database.getDataSource().getConnection()) {
+ List<Long> versions = selectVersions(connection);
if (!versions.isEmpty()) {
- Collections.sort(versions);
- return Optional.of(versions.get(versions.size() - 1).longValue());
+ return Optional.of(versions.get(versions.size() - 1));
}
return Optional.empty();
+ } catch (SQLException e) {
+ throw new IllegalStateException("Failed to read content of table " + SCHEMA_MIGRATIONS_TABLE, e);
}
}
@Override
public void done(RegisteredMigrationStep dbMigration) {
- try (DbSession dbSession = dbClient.openSession(false)) {
- getMapper(dbSession).insert(String.valueOf(dbMigration.getMigrationNumber()));
- dbSession.commit();
+ long migrationNumber = dbMigration.getMigrationNumber();
+ try (Connection connection = database.getDataSource().getConnection();
+ PreparedStatement statement = connection.prepareStatement("insert into schema_migrations(version) values (?)")) {
+
+ statement.setString(1, String.valueOf(migrationNumber));
+ statement.execute();
+ if (!connection.getAutoCommit()) {
+ connection.commit();
+ }
+ } catch (SQLException e) {
+ throw new IllegalStateException(String.format("Failed to insert row with value %s in table %s", migrationNumber, SCHEMA_MIGRATIONS_TABLE), e);
}
}
- private static SchemaMigrationMapper getMapper(DbSession dbSession) {
- return dbSession.getMapper(SchemaMigrationMapper.class);
+ private static List<Long> selectVersions(Connection connection) throws SQLException {
+ try (Statement statement = connection.createStatement();
+ ResultSet resultSet = statement.executeQuery("select version from " + SCHEMA_MIGRATIONS_TABLE)) {
+ List<Long> res = new ArrayList<>();
+ while (resultSet.next()) {
+ res.add(resultSet.getLong(1));
+ }
+ return res.stream()
+ .sorted(Comparator.naturalOrder())
+ .collect(toList());
+ }
}
}
diff --git a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/history/MigrationHistoryTableImpl.java b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/history/MigrationHistoryTableImpl.java
index efb63266460..0b6815e9a9b 100644
--- a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/history/MigrationHistoryTableImpl.java
+++ b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/history/MigrationHistoryTableImpl.java
@@ -24,23 +24,23 @@ import java.sql.SQLException;
import java.sql.Statement;
import java.util.List;
import org.sonar.api.utils.log.Loggers;
+import org.sonar.db.Database;
import org.sonar.db.DatabaseUtils;
-import org.sonar.db.DbClient;
-import org.sonar.server.platform.db.migration.sql.CreateTableBuilder;
import org.sonar.server.platform.db.migration.def.VarcharColumnDef;
+import org.sonar.server.platform.db.migration.sql.CreateTableBuilder;
public class MigrationHistoryTableImpl implements MigrationHistoryTable {
private static final String VERSION_COLUMN_NAME = "version";
- private final DbClient dbClient;
+ private final Database database;
- public MigrationHistoryTableImpl(DbClient dbClient) {
- this.dbClient = dbClient;
+ public MigrationHistoryTableImpl(Database database) {
+ this.database = database;
}
@Override
public void start() {
- try (Connection connection = createDdlConnection(dbClient)) {
+ try (Connection connection = createDdlConnection(database)) {
if (!DatabaseUtils.tableExists(NAME, connection)) {
createTable(connection);
}
@@ -50,7 +50,7 @@ public class MigrationHistoryTableImpl implements MigrationHistoryTable {
}
private void createTable(Connection connection) throws SQLException {
- List<String> sqls = new CreateTableBuilder(dbClient.getDatabase().getDialect(), NAME)
+ List<String> sqls = new CreateTableBuilder(database.getDialect(), NAME)
.addColumn(VarcharColumnDef.newVarcharColumnDefBuilder().setColumnName(VERSION_COLUMN_NAME).setIsNullable(false).setLimit(255).build())
.build();
@@ -60,8 +60,8 @@ public class MigrationHistoryTableImpl implements MigrationHistoryTable {
}
}
- private static Connection createDdlConnection(DbClient dbClient) throws SQLException {
- Connection res = dbClient.getDatabase().getDataSource().getConnection();
+ private static Connection createDdlConnection(Database database) throws SQLException {
+ Connection res = database.getDataSource().getConnection();
res.setAutoCommit(false);
return res;
}
diff --git a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/step/UpsertImpl.java b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/step/UpsertImpl.java
index 2a609a9eb34..df1a04ad9e2 100644
--- a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/step/UpsertImpl.java
+++ b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/step/UpsertImpl.java
@@ -22,10 +22,11 @@ package org.sonar.server.platform.db.migration.step;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
-import org.sonar.db.BatchSession;
public class UpsertImpl extends BaseSqlStatement<Upsert> implements Upsert {
+ private static final int MAX_BATCH_SIZE = 250;
+
private long batchCount = 0L;
private UpsertImpl(PreparedStatement pstmt) {
@@ -37,7 +38,7 @@ public class UpsertImpl extends BaseSqlStatement<Upsert> implements Upsert {
pstmt.addBatch();
pstmt.clearParameters();
batchCount++;
- if (batchCount % BatchSession.MAX_BATCH_SIZE == 0L) {
+ if (batchCount % MAX_BATCH_SIZE == 0L) {
pstmt.executeBatch();
pstmt.getConnection().commit();
}
diff --git a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v61/DeleteReportsFromCeQueue.java b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v61/DeleteReportsFromCeQueue.java
index 1dc13cbea47..adf74030c27 100644
--- a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v61/DeleteReportsFromCeQueue.java
+++ b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v61/DeleteReportsFromCeQueue.java
@@ -21,7 +21,6 @@ package org.sonar.server.platform.db.migration.version.v61;
import java.sql.SQLException;
import org.sonar.db.Database;
-import org.sonar.db.ce.CeTaskTypes;
import org.sonar.server.platform.db.migration.step.DataChange;
/**
@@ -40,7 +39,7 @@ public class DeleteReportsFromCeQueue extends DataChange {
public void execute(Context context) throws SQLException {
context
.prepareUpsert("delete from ce_queue where task_type=?")
- .setString(1, CeTaskTypes.REPORT)
+ .setString(1, "REPORT")
.execute()
.commit();
}
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/AutoDbMigrationH2Test.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/AutoDbMigrationH2Test.java
deleted file mode 100644
index f085a3ca1c9..00000000000
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/AutoDbMigrationH2Test.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package org.sonar.server.platform.db.migration;
-
-import org.junit.Rule;
-import org.junit.Test;
-import org.sonar.api.platform.ServerUpgradeStatus;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbClient;
-import org.sonar.db.DbTester;
-import org.sonar.server.platform.db.migration.engine.MigrationEngine;
-
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verifyNoMoreInteractions;
-import static org.mockito.Mockito.when;
-
-public class AutoDbMigrationH2Test {
- @Rule
- public DbTester dbTester = DbTester.createForSchema(System2.INSTANCE, AutoDbMigrationH2Test.class, "schema_migrations.sql");
-
- private DbClient dbClient = dbTester.getDbClient();
- private ServerUpgradeStatus serverUpgradeStatus = mock(ServerUpgradeStatus.class);
- private MigrationEngine migrationEngine = mock(MigrationEngine.class);
-
- private AutoDbMigration underTest = new AutoDbMigration(serverUpgradeStatus, dbClient, migrationEngine);
-
- @Test
- public void start_creates_fake_rows_in_project_measures_to_fix_sql_plan_of_measure_tree_queries() {
- when(serverUpgradeStatus.isFreshInstall()).thenReturn(true);
-
- underTest.start();
-
- verifyNoMoreInteractions(migrationEngine);
- assertThat(dbTester.countRowsOfTable("project_measures")).isEqualTo(999);
- }
-}
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/charset/SelectExecutorTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/charset/SelectExecutorTest.java
index f40af4e77a2..1c2499b5db8 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/charset/SelectExecutorTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/charset/SelectExecutorTest.java
@@ -23,26 +23,21 @@ import java.sql.Connection;
import java.util.List;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbSession;
-import org.sonar.db.DbTester;
-import org.sonar.db.user.UserDto;
+import org.sonar.db.CoreDbTester;
import static org.assertj.core.api.Assertions.assertThat;
public class SelectExecutorTest {
@Rule
- public DbTester dbTester = DbTester.create(System2.INSTANCE);
+ public CoreDbTester dbTester = CoreDbTester.createForSchema(SelectExecutorTest.class, "users_table.sql");
SqlExecutor underTest = new SqlExecutor();
@Test
public void testExecuteQuery() throws Exception {
- DbSession session = dbTester.getSession();
- dbTester.getDbClient().userDao().insert(session, new UserDto().setLogin("him").setName("Him"));
- dbTester.getDbClient().userDao().insert(session, new UserDto().setLogin("her").setName("Her"));
- session.commit();
+ insertUser("him", "Him");
+ insertUser("her", "Her");
try (Connection connection = dbTester.openConnection()) {
List<String[]> rows = underTest.select(connection, "select login, name from users order by login", new SqlExecutor.StringsConverter(2));
@@ -53,4 +48,10 @@ public class SelectExecutorTest {
assertThat(rows.get(1)[1]).isEqualTo("Him");
}
}
+
+ private void insertUser(String login, String name) {
+ dbTester.executeInsert("users",
+ "LOGIN", login,
+ "NAME", name);
+ }
}
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/charset/SqlExecutorTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/charset/SqlExecutorTest.java
index d4e0e4b5515..2d8c6c40286 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/charset/SqlExecutorTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/charset/SqlExecutorTest.java
@@ -25,8 +25,7 @@ import java.util.Map;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import org.sonar.db.dialect.H2;
import static org.assertj.core.api.Assertions.assertThat;
@@ -39,10 +38,10 @@ public class SqlExecutorTest {
private static final String USERS_DB_TABLE = "users";
private static final String IS_ROOT_DB_COLUMN = "is_root";
- SqlExecutor underTest = new SqlExecutor();
+ private SqlExecutor underTest = new SqlExecutor();
@Rule
- public DbTester dbTester = DbTester.create(System2.INSTANCE);
+ public CoreDbTester dbTester = CoreDbTester.createForSchema(SqlExecutorTest.class, "users_table.sql");
@Before
public void disableIfNotH2() {
@@ -58,7 +57,7 @@ public class SqlExecutorTest {
dbTester.executeInsert(USERS_DB_TABLE, LOGIN_DB_COLUMN, "login2", NAME_DB_COLUMN, "name two", IS_ROOT_DB_COLUMN, false);
try (Connection connection = dbTester.openConnection()) {
- List<String[]> users = underTest.select(connection, "select " + LOGIN_DB_COLUMN + ", " + NAME_DB_COLUMN + " from users order by id", new SqlExecutor.StringsConverter(
+ List<String[]> users = underTest.select(connection, "select " + LOGIN_DB_COLUMN + ", " + NAME_DB_COLUMN + " from users order by login", new SqlExecutor.StringsConverter(
2));
assertThat(users).hasSize(2);
assertThat(users.get(0)[0]).isEqualTo("login1");
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/history/MigrationHistoryImplTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/history/MigrationHistoryImplTest.java
index 5c7e030684c..8bd51f1dc70 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/history/MigrationHistoryImplTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/history/MigrationHistoryImplTest.java
@@ -19,14 +19,14 @@
*/
package org.sonar.server.platform.db.migration.history;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
import java.util.Arrays;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbSession;
-import org.sonar.db.DbTester;
-import org.sonar.db.schemamigration.SchemaMigrationMapper;
+import org.sonar.db.CoreDbTester;
import org.sonar.server.platform.db.migration.step.MigrationStep;
import org.sonar.server.platform.db.migration.step.RegisteredMigrationStep;
@@ -34,14 +34,11 @@ import static org.assertj.core.api.Assertions.assertThat;
public class MigrationHistoryImplTest {
@Rule
- public DbTester dbTester = DbTester.create(System2.INSTANCE);
+ public CoreDbTester dbTester = CoreDbTester.createForSchema(MigrationHistoryImplTest.class, "schema_migration.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
- private DbSession session = dbTester.getSession();
- private SchemaMigrationMapper schemaMigrationMapper = session.getMapper(SchemaMigrationMapper.class);
-
- private MigrationHistoryImpl underTest = new MigrationHistoryImpl(dbTester.getDbClient());
+ private MigrationHistoryImpl underTest = new MigrationHistoryImpl(dbTester.database());
@Test
public void start_does_not_fail_if_table_history_exists() {
@@ -54,8 +51,8 @@ public class MigrationHistoryImplTest {
}
@Test
- public void getLastMigrationNumber_returns_last_version_assuming_version_are_only_number() {
- insert("12", "5", "30", "8");
+ public void getLastMigrationNumber_returns_last_version_assuming_version_are_only_number() throws SQLException {
+ insert(12, 5, 30, 8);
assertThat(underTest.getLastMigrationNumber()).contains(30L);
}
@@ -74,8 +71,19 @@ public class MigrationHistoryImplTest {
assertThat(underTest.getLastMigrationNumber()).contains(12L);
}
- private void insert(String... versions) {
- Arrays.stream(versions).forEach(version -> schemaMigrationMapper.insert(version));
- session.commit();
+ private void insert(int... versions) throws SQLException {
+ try (Connection connection = dbTester.database().getDataSource().getConnection()) {
+ Arrays.stream(versions).forEach(version -> insert(connection, version));
+ }
+ }
+
+ private void insert(Connection connection, long version) {
+ try (PreparedStatement statement = connection.prepareStatement("insert into schema_migrations(version) values (?)")) {
+ statement.setString(1, String.valueOf(version));
+ statement.execute();
+ connection.commit();
+ } catch (SQLException e) {
+ throw new IllegalStateException(String.format("Failed to insert row with value %s", version), e);
+ }
}
}
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/history/MigrationHistoryTableImplTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/history/MigrationHistoryTableImplTest.java
index 17d635849ec..51eaac93a1b 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/history/MigrationHistoryTableImplTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/history/MigrationHistoryTableImplTest.java
@@ -26,9 +26,7 @@ import java.sql.Types;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbSession;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static org.assertj.core.api.Assertions.assertThat;
@@ -36,11 +34,11 @@ public class MigrationHistoryTableImplTest {
private static final String TABLE_SCHEMA_MIGRATIONS = "schema_migrations";
@Rule
- public DbTester dbTester = DbTester.createForSchema(System2.INSTANCE, MigrationHistoryTableImplTest.class, "empty.sql");
+ public CoreDbTester dbTester = CoreDbTester.createEmpty();
@Rule
public ExpectedException expectedException = ExpectedException.none();
- private MigrationHistoryTableImpl underTest = new MigrationHistoryTableImpl(dbTester.getDbClient());
+ private MigrationHistoryTableImpl underTest = new MigrationHistoryTableImpl(dbTester.database());
@Test
public void start_creates_table_on_empty_schema() {
@@ -60,8 +58,7 @@ public class MigrationHistoryTableImplTest {
}
private void executeDdl(String sql) throws SQLException {
- try (DbSession dbSession = dbTester.getDbClient().openSession(false);
- Connection connection = dbSession.getConnection()) {
+ try (Connection connection = dbTester.database().getDataSource().getConnection()) {
connection.setAutoCommit(false);
try (Statement statement = connection.createStatement()) {
statement.execute(sql);
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/history/NoTableMigrationHistoryImplTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/history/NoTableMigrationHistoryImplTest.java
index 9f18d4b9ae6..704aed52c20 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/history/NoTableMigrationHistoryImplTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/history/NoTableMigrationHistoryImplTest.java
@@ -23,16 +23,15 @@ import java.sql.SQLException;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
public class NoTableMigrationHistoryImplTest {
@Rule
- public DbTester dbTester = DbTester.createForSchema(System2.INSTANCE, NoTableMigrationHistoryImplTest.class, "empty.sql");
+ public CoreDbTester dbTester = CoreDbTester.createEmpty();
@Rule
public ExpectedException expectedException = ExpectedException.none();
- private MigrationHistoryImpl underTest = new MigrationHistoryImpl(dbTester.getDbClient());
+ private MigrationHistoryImpl underTest = new MigrationHistoryImpl(dbTester.database());
@Test
public void start_fails_with_ISE_if_table_history_does_not_exist() throws SQLException {
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/sql/CreateTableBuilderDbTesterTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/sql/CreateTableBuilderDbTesterTest.java
index 18db8f2b330..34464caa089 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/sql/CreateTableBuilderDbTesterTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/sql/CreateTableBuilderDbTesterTest.java
@@ -22,8 +22,7 @@ package org.sonar.server.platform.db.migration.sql;
import java.util.Map;
import org.junit.ClassRule;
import org.junit.Test;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import org.sonar.db.dialect.Dialect;
import org.sonar.server.platform.db.migration.def.TinyIntColumnDef;
import org.sonar.server.platform.db.migration.def.VarcharColumnDef;
@@ -40,9 +39,9 @@ import static org.sonar.server.platform.db.migration.sql.CreateTableBuilder.Colu
public class CreateTableBuilderDbTesterTest {
@ClassRule
- public static final DbTester dbTester = DbTester.create(System2.INSTANCE);
+ public static final CoreDbTester dbTester = CoreDbTester.createEmpty();
- private Dialect dialect = dbTester.getDbClient().getDatabase().getDialect();
+ private Dialect dialect = dbTester.database().getDialect();
private static int tableNameGenerator = 0;
@Test
@@ -117,7 +116,6 @@ public class CreateTableBuilderDbTesterTest {
private void verifyAutoIncrementIsWorking(String tableName) {
dbTester.executeInsert(tableName, "val", "toto");
- dbTester.commit();
Map<String, Object> row = dbTester.selectFirst("select id as \"id\", val as \"val\" from " + tableName);
assertThat(row.get("id")).isNotNull();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/step/DataChangeTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/step/DataChangeTest.java
index 9e4c382bce9..be0fbc774ec 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/step/DataChangeTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/step/DataChangeTest.java
@@ -27,9 +27,7 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.utils.System2;
-import org.sonar.db.BatchSession;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import org.sonar.server.platform.db.migration.step.Select.Row;
import org.sonar.server.platform.db.migration.step.Select.RowReader;
@@ -39,8 +37,10 @@ import static org.junit.Assert.fail;
public class DataChangeTest {
+ private static final int MAX_BATCH_SIZE = 250;
+
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, DataChangeTest.class, "schema.sql");
+ public CoreDbTester db = CoreDbTester.createForSchema(DataChangeTest.class, "schema.sql");
@Rule
public ExpectedException thrown = ExpectedException.none();
@@ -261,7 +261,7 @@ public class DataChangeTest {
public void mass_batch_insert() throws Exception {
db.executeUpdateSql("truncate table persons");
- final int count = BatchSession.MAX_BATCH_SIZE + 10;
+ final int count = MAX_BATCH_SIZE + 10;
new DataChange(db.database()) {
@Override
public void execute(Context context) throws SQLException {
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v56/CreateInitialSchemaTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v56/CreateInitialSchemaTest.java
index 85d4e9582b9..e804fc9d8bc 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v56/CreateInitialSchemaTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v56/CreateInitialSchemaTest.java
@@ -26,15 +26,14 @@ import java.util.List;
import java.util.Locale;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static org.assertj.core.api.Assertions.assertThat;
public class CreateInitialSchemaTest {
@Rule
- public final DbTester dbTester = DbTester.createForSchema(System2.INSTANCE, CreateInitialSchemaTest.class, "empty.sql");
+ public final CoreDbTester dbTester = CoreDbTester.createForSchema(CreateInitialSchemaTest.class, "empty.sql");
private CreateInitialSchema underTest = new CreateInitialSchema(dbTester.database());
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v56/PopulateInitialSchemaTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v56/PopulateInitialSchemaTest.java
index d208b72aee6..444aae7628c 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v56/PopulateInitialSchemaTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v56/PopulateInitialSchemaTest.java
@@ -27,7 +27,7 @@ import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.utils.System2;
import org.sonar.core.util.stream.Collectors;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
@@ -43,7 +43,7 @@ public class PopulateInitialSchemaTest {
private System2 system2 = mock(System2.class);
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, PopulateInitialSchemaTest.class, "v56.sql");
+ public CoreDbTester db = CoreDbTester.createForSchema(PopulateInitialSchemaTest.class, "v56.sql");
private PopulateInitialSchema underTest = new PopulateInitialSchema(db.database(), system2);
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v561/UpdateUsersExternalIdentityWhenEmptyTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v561/UpdateUsersExternalIdentityWhenEmptyTest.java
index 7a4f83775d0..ace075b2ddb 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v561/UpdateUsersExternalIdentityWhenEmptyTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v561/UpdateUsersExternalIdentityWhenEmptyTest.java
@@ -26,7 +26,7 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
@@ -38,7 +38,7 @@ public class UpdateUsersExternalIdentityWhenEmptyTest {
private static final long NOW = 1_500_000_000_000L;
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, UpdateUsersExternalIdentityWhenEmptyTest.class, "schema.sql");
+ public CoreDbTester db = CoreDbTester.createForSchema(UpdateUsersExternalIdentityWhenEmptyTest.class, "schema.sql");
private System2 system = mock(System2.class);
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddAnalysisUuidColumnToCeActivityTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddAnalysisUuidColumnToCeActivityTest.java
index e63ed3e243a..8aca0619cda 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddAnalysisUuidColumnToCeActivityTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddAnalysisUuidColumnToCeActivityTest.java
@@ -24,8 +24,7 @@ import java.sql.Types;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
@@ -34,7 +33,7 @@ public class AddAnalysisUuidColumnToCeActivityTest {
private static final long A_DATE = 123_456L;
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, AddAnalysisUuidColumnToCeActivityTest.class, "old_ce_activity.sql");
+ public CoreDbTester db = CoreDbTester.createForSchema(AddAnalysisUuidColumnToCeActivityTest.class, "old_ce_activity.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
@@ -61,7 +60,6 @@ public class AddAnalysisUuidColumnToCeActivityTest {
"updated_at", valueOf(A_DATE),
"submitted_at", valueOf(A_DATE));
}
- db.commit();
underTest.execute();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddAnalysisUuidColumnToEventsTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddAnalysisUuidColumnToEventsTest.java
index 1dde66f1b19..c0876b15925 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddAnalysisUuidColumnToEventsTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddAnalysisUuidColumnToEventsTest.java
@@ -24,8 +24,7 @@ import java.sql.Types;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
@@ -34,7 +33,7 @@ public class AddAnalysisUuidColumnToEventsTest {
private static final String TABLE_EVENTS = "events";
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, AddAnalysisUuidColumnToEventsTest.class, "events_before_6-0.sql");
+ public CoreDbTester db = CoreDbTester.createForSchema(AddAnalysisUuidColumnToEventsTest.class, "events_before_6-0.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
@@ -56,7 +55,6 @@ public class AddAnalysisUuidColumnToEventsTest {
"EVENT_DATE", valueOf(1 + 100),
"CREATED_AT", valueOf(1 + 300));
}
- db.commit();
underTest.execute();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddAnalysisUuidColumnToMeasuresTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddAnalysisUuidColumnToMeasuresTest.java
index d356eea8f9e..8e1a028c451 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddAnalysisUuidColumnToMeasuresTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddAnalysisUuidColumnToMeasuresTest.java
@@ -24,8 +24,7 @@ import java.sql.Types;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
@@ -34,7 +33,7 @@ public class AddAnalysisUuidColumnToMeasuresTest {
private static final String TABLE = "project_measures";
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, AddAnalysisUuidColumnToMeasuresTest.class, "old_measures.sql");
+ public CoreDbTester db = CoreDbTester.createForSchema(AddAnalysisUuidColumnToMeasuresTest.class, "old_measures.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
@@ -57,7 +56,6 @@ public class AddAnalysisUuidColumnToMeasuresTest {
"snapshot_id", valueOf(i + 100),
"component_uuid", valueOf(i + 1_000));
}
- db.commit();
underTest.execute();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddBColumnsToProjectsTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddBColumnsToProjectsTest.java
index 3fe71b99154..1d6f3b864a3 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddBColumnsToProjectsTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddBColumnsToProjectsTest.java
@@ -24,8 +24,7 @@ import java.sql.Types;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
@@ -34,7 +33,7 @@ public class AddBColumnsToProjectsTest {
private static final String TABLE = "projects";
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, AddBColumnsToProjectsTest.class, "old_projects.sql");
+ public CoreDbTester db = CoreDbTester.createForSchema(AddBColumnsToProjectsTest.class, "old_projects.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
@@ -57,7 +56,6 @@ public class AddBColumnsToProjectsTest {
"root_uuid", valueOf(i + 20),
"uuid_path", valueOf(i + 30));
}
- db.commit();
underTest.execute();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddComponentUuidAndAnalysisUuidColumnToDuplicationsIndexTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddComponentUuidAndAnalysisUuidColumnToDuplicationsIndexTest.java
index 01ff5290f5d..fd93547b46e 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddComponentUuidAndAnalysisUuidColumnToDuplicationsIndexTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddComponentUuidAndAnalysisUuidColumnToDuplicationsIndexTest.java
@@ -24,8 +24,7 @@ import java.sql.Types;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
@@ -34,7 +33,7 @@ public class AddComponentUuidAndAnalysisUuidColumnToDuplicationsIndexTest {
private static final String TABLE = "duplications_index";
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, AddComponentUuidAndAnalysisUuidColumnToDuplicationsIndexTest.class,
+ public CoreDbTester db = CoreDbTester.createForSchema(AddComponentUuidAndAnalysisUuidColumnToDuplicationsIndexTest.class,
"duplications_index_5.6.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
@@ -61,7 +60,6 @@ public class AddComponentUuidAndAnalysisUuidColumnToDuplicationsIndexTest {
"START_LINE", "3",
"END_LINE", "4");
}
- db.commit();
underTest.execute();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddComponentUuidColumnToMeasuresTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddComponentUuidColumnToMeasuresTest.java
index 6f22036d593..6c37bbd6685 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddComponentUuidColumnToMeasuresTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddComponentUuidColumnToMeasuresTest.java
@@ -24,15 +24,14 @@ import java.sql.Types;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
public class AddComponentUuidColumnToMeasuresTest {
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, AddComponentUuidColumnToMeasuresTest.class, "project_measures_5.6.sql");
+ public CoreDbTester db = CoreDbTester.createForSchema(AddComponentUuidColumnToMeasuresTest.class, "project_measures_5.6.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
@@ -54,7 +53,6 @@ public class AddComponentUuidColumnToMeasuresTest {
"VALUE", valueOf(i),
"SNAPSHOT_ID", valueOf(i));
}
- db.commit();
underTest.execute();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddComponentUuidColumnsToSnapshotsTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddComponentUuidColumnsToSnapshotsTest.java
index ccf7961f504..5d793787feb 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddComponentUuidColumnsToSnapshotsTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddComponentUuidColumnsToSnapshotsTest.java
@@ -24,8 +24,7 @@ import java.sql.Types;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
@@ -34,7 +33,7 @@ public class AddComponentUuidColumnsToSnapshotsTest {
private static final String SNAPSHOTS_TABLE = "snapshots";
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, AddComponentUuidColumnsToSnapshotsTest.class, "old_snapshots.sql");
+ public CoreDbTester db = CoreDbTester.createForSchema(AddComponentUuidColumnsToSnapshotsTest.class, "old_snapshots.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
@@ -55,7 +54,6 @@ public class AddComponentUuidColumnsToSnapshotsTest {
"PROJECT_ID", valueOf(i),
"ISLAST", "TRUE");
}
- db.commit();
underTest.execute();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddLastUsedColumnToRulesProfilesTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddLastUsedColumnToRulesProfilesTest.java
index a955f7b3ead..f053a78cfcd 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddLastUsedColumnToRulesProfilesTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddLastUsedColumnToRulesProfilesTest.java
@@ -24,13 +24,12 @@ import java.sql.Types;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
public class AddLastUsedColumnToRulesProfilesTest {
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, AddLastUsedColumnToRulesProfilesTest.class, "rules_profiles.sql");
+ public CoreDbTester db = CoreDbTester.createForSchema(AddLastUsedColumnToRulesProfilesTest.class, "rules_profiles.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
@@ -53,7 +52,6 @@ public class AddLastUsedColumnToRulesProfilesTest {
"kee", "" + i,
"rules_updated_at", "2016-06-21");
}
- db.commit();
underTest.execute();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddProfileKeyToActivitiesTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddProfileKeyToActivitiesTest.java
index 653e341418b..a58aa19cdf9 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddProfileKeyToActivitiesTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddProfileKeyToActivitiesTest.java
@@ -24,13 +24,12 @@ import java.sql.Types;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
public class AddProfileKeyToActivitiesTest {
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, AddProfileKeyToActivitiesTest.class, "activities.sql");
+ public CoreDbTester db = CoreDbTester.createForSchema(AddProfileKeyToActivitiesTest.class, "activities.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
@@ -51,7 +50,6 @@ public class AddProfileKeyToActivitiesTest {
"log_key", "LOG_KEY_" + i,
"user_login", "login");
}
- db.commit();
underTest.execute();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddUserUpdatedAtToRulesProfilesTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddUserUpdatedAtToRulesProfilesTest.java
index 6bcbb6a55e6..8fbf323ce8b 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddUserUpdatedAtToRulesProfilesTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddUserUpdatedAtToRulesProfilesTest.java
@@ -24,13 +24,12 @@ import java.sql.Types;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
public class AddUserUpdatedAtToRulesProfilesTest {
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, AddUserUpdatedAtToRulesProfilesTest.class, "rules_profiles.sql");
+ public CoreDbTester db = CoreDbTester.createForSchema(AddUserUpdatedAtToRulesProfilesTest.class, "rules_profiles.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
@@ -54,7 +53,6 @@ public class AddUserUpdatedAtToRulesProfilesTest {
"rules_updated_at", "2016-06-21",
"last_used", "123456789");
}
- db.commit();
underTest.execute();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddUuidColumnToSnapshotsTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddUuidColumnToSnapshotsTest.java
index bdb72b09a4d..38122d82113 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddUuidColumnToSnapshotsTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddUuidColumnToSnapshotsTest.java
@@ -24,14 +24,13 @@ import java.sql.Types;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
public class AddUuidColumnToSnapshotsTest {
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, AddUuidColumnToSnapshotsTest.class, "old_snapshots.sql");
+ public CoreDbTester db = CoreDbTester.createForSchema(AddUuidColumnToSnapshotsTest.class, "old_snapshots.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
@@ -53,7 +52,6 @@ public class AddUuidColumnToSnapshotsTest {
"root_component_uuid", valueOf(i + 10),
"QUALIFIER", (i % 2 == 0 ? "FIL" : "TRK"));
}
- db.commit();
underTest.execute();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddUuidColumnsToProjectsTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddUuidColumnsToProjectsTest.java
index 214ae911c31..9d86963b1a0 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddUuidColumnsToProjectsTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddUuidColumnsToProjectsTest.java
@@ -24,15 +24,14 @@ import java.sql.Types;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
public class AddUuidColumnsToProjectsTest {
private static final String PROJECTS_TABLE = "projects";
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, AddUuidColumnsToProjectsTest.class, "old_projects.sql");
+ public CoreDbTester db = CoreDbTester.createForSchema(AddUuidColumnsToProjectsTest.class, "old_projects.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
@@ -53,7 +52,6 @@ public class AddUuidColumnsToProjectsTest {
"KEE", "key_" + i,
"ENABLED", "true");
}
- db.commit();
underTest.execute();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddUuidColumnsToResourceIndexTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddUuidColumnsToResourceIndexTest.java
index 17816b08860..f295c2c087d 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddUuidColumnsToResourceIndexTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/AddUuidColumnsToResourceIndexTest.java
@@ -24,15 +24,14 @@ import java.sql.Types;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
public class AddUuidColumnsToResourceIndexTest {
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, AddUuidColumnsToResourceIndexTest.class, "old_resourceindex.sql");
+ public CoreDbTester db = CoreDbTester.createForSchema(AddUuidColumnsToResourceIndexTest.class, "old_resourceindex.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
@@ -57,7 +56,6 @@ public class AddUuidColumnsToResourceIndexTest {
"ROOT_PROJECT_ID", valueOf(i + 20),
"QUALIFIER", (i % 2 == 0 ? "FILE" : "PROJECT"));
}
- db.commit();
underTest.execute();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/CleanEventsWithoutAnalysisUuidTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/CleanEventsWithoutAnalysisUuidTest.java
index c59095431b5..a45427b4987 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/CleanEventsWithoutAnalysisUuidTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/CleanEventsWithoutAnalysisUuidTest.java
@@ -24,8 +24,7 @@ import java.util.List;
import java.util.stream.Collectors;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
import static org.assertj.core.api.Assertions.assertThat;
@@ -35,7 +34,7 @@ public class CleanEventsWithoutAnalysisUuidTest {
private static final String TABLE_EVENTS = "events";
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, CleanEventsWithoutAnalysisUuidTest.class,
+ public CoreDbTester db = CoreDbTester.createForSchema(CleanEventsWithoutAnalysisUuidTest.class,
"in_progress_events.sql");
private CleanEventsWithoutAnalysisUuid underTest = new CleanEventsWithoutAnalysisUuid(db.database());
@@ -53,7 +52,6 @@ public class CleanEventsWithoutAnalysisUuidTest {
insertEvent(2, false, true);
insertEvent(3, false, false);
insertEvent(4, true, true);
- db.commit();
underTest.execute();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/CleanEventsWithoutSnapshotIdTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/CleanEventsWithoutSnapshotIdTest.java
index e5ae0f24504..19876d0a41b 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/CleanEventsWithoutSnapshotIdTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/CleanEventsWithoutSnapshotIdTest.java
@@ -24,8 +24,7 @@ import java.util.List;
import java.util.stream.Collectors;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
import static org.assertj.core.api.Assertions.assertThat;
@@ -35,7 +34,7 @@ public class CleanEventsWithoutSnapshotIdTest {
private static final String TABLE_EVENTS = "events";
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, CleanEventsWithoutSnapshotIdTest.class,
+ public CoreDbTester db = CoreDbTester.createForSchema(CleanEventsWithoutSnapshotIdTest.class,
"in_progress_events.sql");
private CleanEventsWithoutSnapshotId underTest = new CleanEventsWithoutSnapshotId(db.database());
@@ -53,7 +52,6 @@ public class CleanEventsWithoutSnapshotIdTest {
insertEvent(2, false);
insertEvent(3, false);
insertEvent(4, true);
- db.commit();
underTest.execute();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/CleanMeasuresWithNullAnalysisUuidTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/CleanMeasuresWithNullAnalysisUuidTest.java
index daf8f2b97b3..662a18056f3 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/CleanMeasuresWithNullAnalysisUuidTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/CleanMeasuresWithNullAnalysisUuidTest.java
@@ -25,8 +25,7 @@ import java.util.stream.Collectors;
import javax.annotation.Nullable;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
import static org.assertj.core.api.Assertions.assertThat;
@@ -36,7 +35,7 @@ public class CleanMeasuresWithNullAnalysisUuidTest {
private static final String TABLE_MEASURES = "project_measures";
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, CleanMeasuresWithNullAnalysisUuidTest.class,
+ public CoreDbTester db = CoreDbTester.createForSchema(CleanMeasuresWithNullAnalysisUuidTest.class,
"in_progress_measures.sql");
private CleanMeasuresWithNullAnalysisUuid underTest = new CleanMeasuresWithNullAnalysisUuid(db.database());
@@ -53,7 +52,6 @@ public class CleanMeasuresWithNullAnalysisUuidTest {
insertMeasure(1, "U1");
insertMeasure(2, "U1");
insertMeasure(3, null);
- db.commit();
underTest.execute();
@@ -64,7 +62,6 @@ public class CleanMeasuresWithNullAnalysisUuidTest {
public void migration_is_reentrant() throws SQLException {
insertMeasure(1, "U1");
insertMeasure(2, null);
- db.commit();
underTest.execute();
assertThat(idsOfRows()).containsOnly(1L);
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/CleanOrphanRowsInResourceIndexTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/CleanOrphanRowsInResourceIndexTest.java
index 805ba6f8372..deb0c92097d 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/CleanOrphanRowsInResourceIndexTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/CleanOrphanRowsInResourceIndexTest.java
@@ -24,8 +24,7 @@ import java.util.List;
import java.util.stream.Collectors;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
import static org.assertj.core.api.Assertions.assertThat;
@@ -33,7 +32,7 @@ import static org.assertj.core.api.Assertions.assertThat;
public class CleanOrphanRowsInResourceIndexTest {
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, CleanOrphanRowsInResourceIndexTest.class,
+ public CoreDbTester db = CoreDbTester.createForSchema(CleanOrphanRowsInResourceIndexTest.class,
"in_progress_resourceindex.sql");
private CleanOrphanRowsInResourceIndex underTest = new CleanOrphanRowsInResourceIndex(db.database());
@@ -52,7 +51,6 @@ public class CleanOrphanRowsInResourceIndexTest {
insertResourceIndex(3, true, false);
insertResourceIndex(4, false, true);
insertResourceIndex(5, true, true);
- db.commit();
underTest.execute();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/CleanOrphanRowsInSnapshotsTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/CleanOrphanRowsInSnapshotsTest.java
index ee0371706ee..f5ed42b4ee9 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/CleanOrphanRowsInSnapshotsTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/CleanOrphanRowsInSnapshotsTest.java
@@ -24,8 +24,7 @@ import java.util.List;
import java.util.stream.Collectors;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
import static org.assertj.core.api.Assertions.assertThat;
@@ -35,7 +34,7 @@ public class CleanOrphanRowsInSnapshotsTest {
private static final String SNAPSHOTS_TABLE = "snapshots";
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, CleanOrphanRowsInSnapshotsTest.class,
+ public CoreDbTester db = CoreDbTester.createForSchema(CleanOrphanRowsInSnapshotsTest.class,
"in_progress_snapshots_and_children_tables.sql");
private CleanOrphanRowsInSnapshots underTest = new CleanOrphanRowsInSnapshots(db.database());
@@ -54,7 +53,6 @@ public class CleanOrphanRowsInSnapshotsTest {
insertSnapshots(3, true, false);
insertSnapshots(4, false, true);
insertSnapshots(5, true, true);
- db.commit();
underTest.execute();
@@ -84,7 +82,6 @@ public class CleanOrphanRowsInSnapshotsTest {
insertEvents(1);
insertEvents(2);
insertEvents(3);
- db.commit();
underTest.execute();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/CleanUsurperRootComponentsTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/CleanUsurperRootComponentsTest.java
index a8806fad419..e729f210997 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/CleanUsurperRootComponentsTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/CleanUsurperRootComponentsTest.java
@@ -28,8 +28,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.resources.Qualifiers;
import org.sonar.api.resources.Scopes;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
import static org.assertj.core.api.Assertions.assertThat;
@@ -42,7 +41,7 @@ public class CleanUsurperRootComponentsTest {
"user_roles", "properties", "widgets", "projects");
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, CleanUsurperRootComponentsTest.class,
+ public CoreDbTester db = CoreDbTester.createForSchema(CleanUsurperRootComponentsTest.class,
"complete_schema.sql");
private CleanUsurperRootComponents underTest = new CleanUsurperRootComponents(db.database());
@@ -183,7 +182,7 @@ public class CleanUsurperRootComponentsTest {
"INDEX_IN_FILE", valueOf(0),
"START_LINE", valueOf(0),
"END_LINE", valueOf(0));
- db.commit();
+
}
private void insertProjectMeasures(String componentUuid, Long snapshotId) {
@@ -192,7 +191,7 @@ public class CleanUsurperRootComponentsTest {
"METRIC_ID", valueOf(123L),
"COMPONENT_UUID", componentUuid,
"SNAPSHOT_ID", valueOf(snapshotId));
- db.commit();
+
}
private void insertCeActivity(String componentUuid, Long snapshotId) {
@@ -208,7 +207,7 @@ public class CleanUsurperRootComponentsTest {
"SUBMITTED_AT", valueOf(121L),
"CREATED_AT", valueOf(122L),
"UPDATED_AT", valueOf(123L));
- db.commit();
+
}
private void insertEvent(String componentUuid, Long snapshotId) {
@@ -218,7 +217,7 @@ public class CleanUsurperRootComponentsTest {
"COMPONENT_UUID", componentUuid,
"CREATED_AT", valueOf(122L),
"EVENT_DATE", valueOf(123L));
- db.commit();
+
}
private Long insertSnapshot(String componentUuid, String rootComponentUuid) {
@@ -228,7 +227,7 @@ public class CleanUsurperRootComponentsTest {
"ID", valueOf(id),
"COMPONENT_UUID", componentUuid,
"ROOT_COMPONENT_UUID", rootComponentUuid);
- db.commit();
+
return id;
}
@@ -237,7 +236,7 @@ public class CleanUsurperRootComponentsTest {
"project_links",
"COMPONENT_UUID", componentUuid,
"HREF", dontCare());
- db.commit();
+
}
private void insertIssue(@Nullable String componentUuid, @Nullable String projectUuid) {
@@ -247,7 +246,7 @@ public class CleanUsurperRootComponentsTest {
"PROJECT_UUID", projectUuid == null ? dontCare() : projectUuid,
"KEE", "kee_" + componentUuid + projectUuid,
"MANUAL_SEVERITY", valueOf(true));
- db.commit();
+
}
private void insertFileSource(@Nullable String fileUuid, @Nullable String projectUuid) {
@@ -257,7 +256,7 @@ public class CleanUsurperRootComponentsTest {
"PROJECT_UUID", projectUuid == null ? dontCare() : projectUuid,
"CREATED_AT", valueOf(122L),
"UPDATED_AT", valueOf(123L));
- db.commit();
+
}
private void insertGroupRole(long componentId) {
@@ -265,7 +264,7 @@ public class CleanUsurperRootComponentsTest {
"group_roles",
"RESOURCE_ID", valueOf(componentId),
"ROLE", dontCare());
- db.commit();
+
}
private void insertUserRole(long componentId) {
@@ -273,14 +272,14 @@ public class CleanUsurperRootComponentsTest {
"user_roles",
"RESOURCE_ID", valueOf(componentId),
"ROLE", dontCare());
- db.commit();
+
}
private void insertProperties(long componentId) {
db.executeInsert(
"properties",
"RESOURCE_ID", valueOf(componentId));
- db.commit();
+
}
private void insertWidget(long componentId) {
@@ -289,7 +288,7 @@ public class CleanUsurperRootComponentsTest {
"DASHBOARD_ID", valueOf(95),
"WIDGET_KEY", dontCare(),
"RESOURCE_ID", valueOf(componentId));
- db.commit();
+
}
private long idGenerator = 0;
@@ -314,7 +313,7 @@ public class CleanUsurperRootComponentsTest {
"PROJECT_UUID", projectUuid,
"SCOPE", scope,
"QUALIFIER", qualifier);
- db.commit();
+
return uuid;
}
@@ -328,7 +327,7 @@ public class CleanUsurperRootComponentsTest {
"root_component_uuid", dontCare(),
"scope", scope,
"qualifier", qualifier);
- db.commit();
+
return id;
}
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/CreatePermTemplatesCharacteristicsTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/CreatePermTemplatesCharacteristicsTest.java
index e70804bea18..e946a3a66f6 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/CreatePermTemplatesCharacteristicsTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/CreatePermTemplatesCharacteristicsTest.java
@@ -23,8 +23,7 @@ import java.sql.SQLException;
import java.sql.Types;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static org.assertj.core.api.Assertions.assertThat;
@@ -33,7 +32,7 @@ public class CreatePermTemplatesCharacteristicsTest {
private static final String TABLE_NAME = "perm_tpl_characteristics";
@Rule
- public final DbTester dbTester = DbTester.createForSchema(System2.INSTANCE, CreatePermTemplatesCharacteristicsTest.class, "empty.sql");
+ public final CoreDbTester dbTester = CoreDbTester.createForSchema(CreatePermTemplatesCharacteristicsTest.class, "empty.sql");
private CreatePermTemplatesCharacteristics underTest = new CreatePermTemplatesCharacteristics(dbTester.database());
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/DbVersion60Test.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/DbVersion60Test.java
index b5f51492da3..52616348249 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/DbVersion60Test.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/DbVersion60Test.java
@@ -31,9 +31,8 @@ public class DbVersion60Test {
@Test
public void verify_supports_components() {
assertThat(underTest.getSupportComponents()).containsExactly(
- FixProjectUuidOfDeveloperProjects.class,
- CleanUsurperRootComponents.class
- );
+ FixProjectUuidOfDeveloperProjects.class,
+ CleanUsurperRootComponents.class);
}
@Test
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/DeleteOrphanMeasuresWithoutComponentTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/DeleteOrphanMeasuresWithoutComponentTest.java
index 98ecd3125a4..055372f66b4 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/DeleteOrphanMeasuresWithoutComponentTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/DeleteOrphanMeasuresWithoutComponentTest.java
@@ -24,8 +24,7 @@ import java.util.List;
import java.util.stream.Collectors;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
import static org.assertj.core.api.Assertions.assertThat;
@@ -33,7 +32,7 @@ import static org.assertj.core.api.Assertions.assertThat;
public class DeleteOrphanMeasuresWithoutComponentTest {
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, DeleteOrphanMeasuresWithoutComponentTest.class,
+ public CoreDbTester db = CoreDbTester.createForSchema(DeleteOrphanMeasuresWithoutComponentTest.class,
"in_progress_project_measures.sql");
private DeleteOrphanMeasuresWithoutComponent underTest = new DeleteOrphanMeasuresWithoutComponent(db.database());
@@ -51,7 +50,6 @@ public class DeleteOrphanMeasuresWithoutComponentTest {
insertMeasure(2, false);
insertMeasure(3, false);
insertMeasure(4, true);
- db.commit();
underTest.execute();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/DropTreesOfSnapshotsTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/DropTreesOfSnapshotsTest.java
index b247a981fce..0a2a76a4a32 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/DropTreesOfSnapshotsTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/DropTreesOfSnapshotsTest.java
@@ -24,8 +24,7 @@ import java.util.List;
import java.util.Map;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
import static org.assertj.core.api.Assertions.assertThat;
@@ -35,7 +34,7 @@ public class DropTreesOfSnapshotsTest {
private static final String SNAPSHOTS_TABLE = "snapshots";
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, DropTreesOfSnapshotsTest.class,
+ public CoreDbTester db = CoreDbTester.createForSchema(DropTreesOfSnapshotsTest.class,
"in_progress_snapshots.sql");
private DropTreesOfSnapshots underTest = new DropTreesOfSnapshots(db.database());
@@ -54,7 +53,6 @@ public class DropTreesOfSnapshotsTest {
insertSnapshot(3L, 1);
insertSnapshot(4L, 0);
insertSnapshot(5L, 3);
- db.commit();
underTest.execute();
@@ -65,7 +63,6 @@ public class DropTreesOfSnapshotsTest {
public void migration_is_reentrant() throws SQLException {
insertSnapshot(1L, 0);
insertSnapshot(2L, 2);
- db.commit();
underTest.execute();
verifySnapshots(1L);
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/FixProjectUuidOfDeveloperProjectsTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/FixProjectUuidOfDeveloperProjectsTest.java
index 0b02154824d..a769bb4a344 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/FixProjectUuidOfDeveloperProjectsTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/FixProjectUuidOfDeveloperProjectsTest.java
@@ -24,8 +24,7 @@ import java.util.Map;
import javax.annotation.Nullable;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
import static org.assertj.core.api.Assertions.assertThat;
@@ -40,7 +39,7 @@ public class FixProjectUuidOfDeveloperProjectsTest {
private static final String DEV2_IN_PROJECT_UUID = "U5";
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, FixProjectUuidOfDeveloperProjectsTest.class,
+ public CoreDbTester db = CoreDbTester.createForSchema(FixProjectUuidOfDeveloperProjectsTest.class,
"projects_5.6.sql");
private FixProjectUuidOfDeveloperProjects underTest = new FixProjectUuidOfDeveloperProjects(db.database());
@@ -88,7 +87,6 @@ public class FixProjectUuidOfDeveloperProjectsTest {
Long personId = insert(DEVELOPER_UUID, "DEV", null, DEVELOPER_UUID);
insert(DEV1_IN_PROJECT_UUID, "DEV_PRJ", personId, /* not correct */PROJECT_UUID);
insert(DEV2_IN_PROJECT_UUID, "DEV_PRJ", personId, /* not correct */PROJECT_UUID);
- db.commit();
}
private void verifyProjectUuid(String uuid, @Nullable String expectedProjectUuid) {
@@ -103,7 +101,7 @@ public class FixProjectUuidOfDeveloperProjectsTest {
"PERSON_ID", personId == null ? null : valueOf(personId),
"PROJECT_UUID", projectUuid,
"QUALIFIER", qualifier);
- db.commit();
+
return db.select("select ID from projects where UUID='" + uuid + "'").stream()
.findFirst()
.map(f -> (Long) f.get("ID"))
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/MakeAnalysisUuidNotNullOnMeasuresTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/MakeAnalysisUuidNotNullOnMeasuresTest.java
index c555dad92cb..af172c410cb 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/MakeAnalysisUuidNotNullOnMeasuresTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/MakeAnalysisUuidNotNullOnMeasuresTest.java
@@ -25,8 +25,7 @@ import javax.annotation.Nullable;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
@@ -35,7 +34,7 @@ public class MakeAnalysisUuidNotNullOnMeasuresTest {
private static final String TABLE_MEASURES = "project_measures";
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, MakeAnalysisUuidNotNullOnMeasuresTest.class,
+ public CoreDbTester db = CoreDbTester.createForSchema(MakeAnalysisUuidNotNullOnMeasuresTest.class,
"in_progress_measures.sql");
@Rule
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/MakeComponentUuidAndAnalysisUuidNotNullOnDuplicationsIndexTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/MakeComponentUuidAndAnalysisUuidNotNullOnDuplicationsIndexTest.java
index 35244cf7b14..383bc688fd6 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/MakeComponentUuidAndAnalysisUuidNotNullOnDuplicationsIndexTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/MakeComponentUuidAndAnalysisUuidNotNullOnDuplicationsIndexTest.java
@@ -26,8 +26,7 @@ import java.util.stream.Collectors;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
import static org.assertj.core.api.Assertions.assertThat;
@@ -35,7 +34,7 @@ import static org.assertj.core.api.Assertions.assertThat;
public class MakeComponentUuidAndAnalysisUuidNotNullOnDuplicationsIndexTest {
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, MakeComponentUuidAndAnalysisUuidNotNullOnDuplicationsIndexTest.class,
+ public CoreDbTester db = CoreDbTester.createForSchema(MakeComponentUuidAndAnalysisUuidNotNullOnDuplicationsIndexTest.class,
"in_progress_duplications_index.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/MakeComponentUuidColumnsNotNullOnSnapshotsTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/MakeComponentUuidColumnsNotNullOnSnapshotsTest.java
index a46c0767fb6..c7949ea7eb1 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/MakeComponentUuidColumnsNotNullOnSnapshotsTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/MakeComponentUuidColumnsNotNullOnSnapshotsTest.java
@@ -24,8 +24,7 @@ import java.sql.Types;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
@@ -34,7 +33,7 @@ public class MakeComponentUuidColumnsNotNullOnSnapshotsTest {
private static final String SNAPSHOTS_TABLE = "snapshots";
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, MakeComponentUuidColumnsNotNullOnSnapshotsTest.class,
+ public CoreDbTester db = CoreDbTester.createForSchema(MakeComponentUuidColumnsNotNullOnSnapshotsTest.class,
"in_progress_snapshots.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/MakeComponentUuidNotNullOnMeasuresTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/MakeComponentUuidNotNullOnMeasuresTest.java
index 65f33fc4524..cc9d86008af 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/MakeComponentUuidNotNullOnMeasuresTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/MakeComponentUuidNotNullOnMeasuresTest.java
@@ -26,8 +26,7 @@ import java.util.stream.Collectors;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
import static org.assertj.core.api.Assertions.assertThat;
@@ -35,7 +34,7 @@ import static org.assertj.core.api.Assertions.assertThat;
public class MakeComponentUuidNotNullOnMeasuresTest {
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, MakeComponentUuidNotNullOnMeasuresTest.class,
+ public CoreDbTester db = CoreDbTester.createForSchema(MakeComponentUuidNotNullOnMeasuresTest.class,
"in_progress_project_measures.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/MakeProfileKeyNotNullOnActivitiesTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/MakeProfileKeyNotNullOnActivitiesTest.java
index 8357f169469..5671be20ec7 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/MakeProfileKeyNotNullOnActivitiesTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/MakeProfileKeyNotNullOnActivitiesTest.java
@@ -24,15 +24,14 @@ import java.sql.Types;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
public class MakeProfileKeyNotNullOnActivitiesTest {
private static final String TABLE_ACTIVITIES = "activities";
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, MakeProfileKeyNotNullOnActivitiesTest.class, "activities.sql");
+ public CoreDbTester db = CoreDbTester.createForSchema(MakeProfileKeyNotNullOnActivitiesTest.class, "activities.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/MakeUuidColumnNotNullOnSnapshotsTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/MakeUuidColumnNotNullOnSnapshotsTest.java
index 9a1773c3ba3..a82ae3cacc1 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/MakeUuidColumnNotNullOnSnapshotsTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/MakeUuidColumnNotNullOnSnapshotsTest.java
@@ -24,8 +24,7 @@ import java.sql.Types;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
@@ -34,7 +33,7 @@ public class MakeUuidColumnNotNullOnSnapshotsTest {
private static final String TABLE_SNAPSHOTS = "snapshots";
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, MakeUuidColumnNotNullOnSnapshotsTest.class,
+ public CoreDbTester db = CoreDbTester.createForSchema(MakeUuidColumnNotNullOnSnapshotsTest.class,
"in_progress_snapshots.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/MakeUuidColumnsNotNullOnProjectsTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/MakeUuidColumnsNotNullOnProjectsTest.java
index aac0618ee0b..d0434f73082 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/MakeUuidColumnsNotNullOnProjectsTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/MakeUuidColumnsNotNullOnProjectsTest.java
@@ -24,8 +24,7 @@ import java.sql.Types;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
@@ -34,7 +33,7 @@ public class MakeUuidColumnsNotNullOnProjectsTest {
private static final String PROJECTS_TABLE = "projects";
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, MakeUuidColumnsNotNullOnProjectsTest.class,
+ public CoreDbTester db = CoreDbTester.createForSchema(MakeUuidColumnsNotNullOnProjectsTest.class,
"in_progress_projects.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/MakeUuidColumnsNotNullOnResourceIndexTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/MakeUuidColumnsNotNullOnResourceIndexTest.java
index 084605d7dc6..d6e8d719410 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/MakeUuidColumnsNotNullOnResourceIndexTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/MakeUuidColumnsNotNullOnResourceIndexTest.java
@@ -24,15 +24,14 @@ import java.sql.Types;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
public class MakeUuidColumnsNotNullOnResourceIndexTest {
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, MakeUuidColumnsNotNullOnResourceIndexTest.class,
+ public CoreDbTester db = CoreDbTester.createForSchema(MakeUuidColumnsNotNullOnResourceIndexTest.class,
"in_progress_resourceindex.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateAnalysisUuidColumnOnCeActivityTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateAnalysisUuidColumnOnCeActivityTest.java
index 8bf60f98a4d..291f48789aa 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateAnalysisUuidColumnOnCeActivityTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateAnalysisUuidColumnOnCeActivityTest.java
@@ -25,8 +25,7 @@ import javax.annotation.Nullable;
import org.apache.commons.lang.RandomStringUtils;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
import static org.assertj.core.api.Assertions.assertThat;
@@ -38,7 +37,7 @@ public class PopulateAnalysisUuidColumnOnCeActivityTest {
private static final String TABLE_SNAPSHOTS = "snapshots";
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, PopulateAnalysisUuidColumnOnCeActivityTest.class,
+ public CoreDbTester db = CoreDbTester.createForSchema(PopulateAnalysisUuidColumnOnCeActivityTest.class,
"in_progress_ce_activity.sql");
private PopulateAnalysisUuidColumnOnCeActivity underTest = new PopulateAnalysisUuidColumnOnCeActivity(db.database());
@@ -57,7 +56,6 @@ public class PopulateAnalysisUuidColumnOnCeActivityTest {
insertCeActivity(1, null);
insertCeActivity(2, 1L);
insertCeActivity(3, 2L);
- db.commit();
underTest.execute();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateAnalysisUuidOnEventsTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateAnalysisUuidOnEventsTest.java
index 92ad08f3257..b4188311fd3 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateAnalysisUuidOnEventsTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateAnalysisUuidOnEventsTest.java
@@ -26,8 +26,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.resources.Qualifiers;
import org.sonar.api.resources.Scopes;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
import static org.assertj.core.api.Assertions.assertThat;
@@ -38,7 +37,7 @@ public class PopulateAnalysisUuidOnEventsTest {
private static final String TABLE_SNAPSHOTS = "snapshots";
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, PopulateAnalysisUuidOnEventsTest.class,
+ public CoreDbTester db = CoreDbTester.createForSchema(PopulateAnalysisUuidOnEventsTest.class,
"in_progress_events_with_snapshots.sql");
private PopulateAnalysisUuidOnEvents underTest = new PopulateAnalysisUuidOnEvents(db.database());
@@ -75,7 +74,6 @@ public class PopulateAnalysisUuidOnEventsTest {
insertEvent(210, 9L);
insertEvent(211, 10L);
insertEvent(212, 11L);
- db.commit();
underTest.execute();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateAnalysisUuidOnMeasuresTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateAnalysisUuidOnMeasuresTest.java
index 10a074c7a86..6ce6d93de39 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateAnalysisUuidOnMeasuresTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateAnalysisUuidOnMeasuresTest.java
@@ -25,8 +25,7 @@ import javax.annotation.Nullable;
import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.resources.Qualifiers;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
import static org.assertj.core.api.Assertions.assertThat;
@@ -37,7 +36,7 @@ public class PopulateAnalysisUuidOnMeasuresTest {
private static final String TABLE_SNAPSHOTS = "snapshots";
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, PopulateAnalysisUuidOnMeasuresTest.class,
+ public CoreDbTester db = CoreDbTester.createForSchema(PopulateAnalysisUuidOnMeasuresTest.class,
"old_measures.sql");
private PopulateAnalysisUuidOnMeasures underTest = new PopulateAnalysisUuidOnMeasures(db.database());
@@ -57,7 +56,6 @@ public class PopulateAnalysisUuidOnMeasuresTest {
insertMeasure(21, 1);
insertMeasure(22, 2);
insertMeasure(23, 3);
- db.commit();
underTest.execute();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateComponentUuidAndAnalysisUuidOfDuplicationsIndexTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateComponentUuidAndAnalysisUuidOfDuplicationsIndexTest.java
index b670e24bec2..24a4975dc38 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateComponentUuidAndAnalysisUuidOfDuplicationsIndexTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateComponentUuidAndAnalysisUuidOfDuplicationsIndexTest.java
@@ -25,8 +25,7 @@ import java.util.Map;
import javax.annotation.Nullable;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
import static org.assertj.core.api.Assertions.assertThat;
@@ -34,7 +33,7 @@ import static org.assertj.core.api.Assertions.assertThat;
public class PopulateComponentUuidAndAnalysisUuidOfDuplicationsIndexTest {
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, PopulateComponentUuidAndAnalysisUuidOfDuplicationsIndexTest.class,
+ public CoreDbTester db = CoreDbTester.createForSchema(PopulateComponentUuidAndAnalysisUuidOfDuplicationsIndexTest.class,
"in_progress_measures_with_snapshots.sql");
private PopulateComponentUuidAndAnalysisUuidOfDuplicationsIndex underTest = new PopulateComponentUuidAndAnalysisUuidOfDuplicationsIndex(db.database());
@@ -60,7 +59,6 @@ public class PopulateComponentUuidAndAnalysisUuidOfDuplicationsIndexTest {
insertDuplicationIndex(4, 60, 110); // 110 doesn't exist
insertDuplicationIndex(5, 90, 120); // 90 and 120 does not exist
insertDuplicationIndex(6, 100, 70); // 100 does not exist
- db.commit();
underTest.execute();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateComponentUuidColumnsOfSnapshotsTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateComponentUuidColumnsOfSnapshotsTest.java
index a3de98177a5..992b808ec56 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateComponentUuidColumnsOfSnapshotsTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateComponentUuidColumnsOfSnapshotsTest.java
@@ -25,8 +25,7 @@ import java.util.Map;
import javax.annotation.Nullable;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
import static org.assertj.core.api.Assertions.assertThat;
@@ -36,7 +35,7 @@ public class PopulateComponentUuidColumnsOfSnapshotsTest {
private static final String SNAPSHOTS_TABLE = "snapshots";
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, PopulateComponentUuidColumnsOfSnapshotsTest.class,
+ public CoreDbTester db = CoreDbTester.createForSchema(PopulateComponentUuidColumnsOfSnapshotsTest.class,
"in_progress_snapshots_with_projects.sql");
private PopulateComponentUuidColumnsOfSnapshots underTest = new PopulateComponentUuidColumnsOfSnapshots(db.database());
@@ -64,7 +63,6 @@ public class PopulateComponentUuidColumnsOfSnapshotsTest {
insertSnapshots(5, 110, 100L); // 110 and 100 do not exist
insertSnapshots(6, 80, null); // no root
insertSnapshots(7, 120, null); // no root and 120 does not exist
- db.commit();
underTest.execute();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateComponentUuidOfMeasuresTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateComponentUuidOfMeasuresTest.java
index caddc23d2d9..cdd39ef3456 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateComponentUuidOfMeasuresTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateComponentUuidOfMeasuresTest.java
@@ -25,8 +25,7 @@ import java.util.Map;
import javax.annotation.Nullable;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
import static org.assertj.core.api.Assertions.assertThat;
@@ -47,7 +46,7 @@ public class PopulateComponentUuidOfMeasuresTest {
private static final String COMPONENT_UUID_2 = "U500";
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, PopulateComponentUuidOfMeasuresTest.class,
+ public CoreDbTester db = CoreDbTester.createForSchema(PopulateComponentUuidOfMeasuresTest.class,
"in_progress_measures_with_projects.sql");
private PopulateComponentUuidOfMeasures underTest = new PopulateComponentUuidOfMeasures(db.database());
@@ -71,7 +70,6 @@ public class PopulateComponentUuidOfMeasuresTest {
insertMeasure(2, SNAPSHOT_ID_2, COMPONENT_ID_1);
insertMeasure(3, SNAPSHOT_ID_3, COMPONENT_ID_2);
insertMeasure(4, SNAPSHOT_ID_5, COMPONENT_ID_3); // snapshot does not exist
- db.commit();
underTest.execute();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateLastUsedColumnOfRulesProfilesTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateLastUsedColumnOfRulesProfilesTest.java
index 0061d717263..55aae8f3bdc 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateLastUsedColumnOfRulesProfilesTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateLastUsedColumnOfRulesProfilesTest.java
@@ -25,8 +25,7 @@ import java.util.stream.Collectors;
import javax.annotation.CheckForNull;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
import static org.assertj.core.api.Assertions.assertThat;
@@ -39,7 +38,7 @@ public class PopulateLastUsedColumnOfRulesProfilesTest {
private static final String METRIC_ID = "1";
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, PopulateLastUsedColumnOfRulesProfilesTest.class, "rules_profiles.sql");
+ public CoreDbTester db = CoreDbTester.createForSchema(PopulateLastUsedColumnOfRulesProfilesTest.class, "rules_profiles.sql");
PopulateLastUsedColumnOfRulesProfiles underTest = new PopulateLastUsedColumnOfRulesProfiles(db.database());
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateProfileKeyOfActivitiesTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateProfileKeyOfActivitiesTest.java
index 6100f618a11..e641f2f98de 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateProfileKeyOfActivitiesTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateProfileKeyOfActivitiesTest.java
@@ -23,8 +23,7 @@ import java.sql.SQLException;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static org.assertj.core.api.Assertions.assertThat;
@@ -34,7 +33,7 @@ public class PopulateProfileKeyOfActivitiesTest {
@Rule
public ExpectedException expectedException = ExpectedException.none();
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, PopulateProfileKeyOfActivitiesTest.class, "activities.sql");
+ public CoreDbTester db = CoreDbTester.createForSchema(PopulateProfileKeyOfActivitiesTest.class, "activities.sql");
PopulateProfileKeyOfActivities underTest = new PopulateProfileKeyOfActivities(db.database());
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateUserUpdatedAtOfRulesProfilesTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateUserUpdatedAtOfRulesProfilesTest.java
index 11c226b0208..5bdcf9fe14f 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateUserUpdatedAtOfRulesProfilesTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateUserUpdatedAtOfRulesProfilesTest.java
@@ -28,8 +28,7 @@ import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
import static org.assertj.core.api.Assertions.assertThat;
@@ -39,7 +38,7 @@ public class PopulateUserUpdatedAtOfRulesProfilesTest {
private static final String TABLE_ACTIVITIES = "activities";
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, PopulateUserUpdatedAtOfRulesProfilesTest.class, "schema.sql");
+ public CoreDbTester db = CoreDbTester.createForSchema(PopulateUserUpdatedAtOfRulesProfilesTest.class, "schema.sql");
PopulateUserUpdatedAtOfRulesProfiles underTest = new PopulateUserUpdatedAtOfRulesProfiles(db.database());
@@ -100,8 +99,8 @@ public class PopulateUserUpdatedAtOfRulesProfilesTest {
private void insertActivity(String profileKey, @Nullable String login, @Nullable Long createdAt) {
final String sqlInsertActivity = "insert into activities (profile_key, user_login, created_at) values (?, ?, ?) ";
- Connection connection = db.getSession().getConnection();
- try (PreparedStatement ps = connection.prepareStatement(sqlInsertActivity)) {
+ try (Connection connection = db.openConnection();
+ PreparedStatement ps = connection.prepareStatement(sqlInsertActivity)) {
ps.setString(1, profileKey);
ps.setString(2, login);
ps.setTimestamp(3, createdAt == null ? null : new Timestamp(createdAt));
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateUuidColumnOnSnapshotsTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateUuidColumnOnSnapshotsTest.java
index 3aa0ad7f798..c112b338349 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateUuidColumnOnSnapshotsTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateUuidColumnOnSnapshotsTest.java
@@ -29,7 +29,7 @@ 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 org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
import static org.assertj.core.api.Assertions.assertThat;
@@ -39,7 +39,7 @@ public class PopulateUuidColumnOnSnapshotsTest {
private static final String TABLE_SNAPSHOTS = "snapshots";
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, PopulateUuidColumnOnSnapshotsTest.class,
+ public CoreDbTester db = CoreDbTester.createForSchema(PopulateUuidColumnOnSnapshotsTest.class,
"in_progress_snapshots.sql");
private PopulateUuidColumnOnSnapshots underTest = new PopulateUuidColumnOnSnapshots(db.database(), UuidFactoryImpl.INSTANCE);
@@ -56,7 +56,6 @@ public class PopulateUuidColumnOnSnapshotsTest {
insertSnapshot(1);
insertSnapshot(2);
insertSnapshot(3);
- db.commit();
underTest.execute();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateUuidColumnsOfProjectsTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateUuidColumnsOfProjectsTest.java
index b6b541fb1c1..bd71ff83247 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateUuidColumnsOfProjectsTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateUuidColumnsOfProjectsTest.java
@@ -25,8 +25,7 @@ import java.util.Map;
import javax.annotation.Nullable;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
import static org.assertj.core.api.Assertions.assertThat;
@@ -34,7 +33,7 @@ import static org.assertj.core.api.Assertions.assertThat;
public class PopulateUuidColumnsOfProjectsTest {
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, PopulateUuidColumnsOfProjectsTest.class,
+ public CoreDbTester db = CoreDbTester.createForSchema(PopulateUuidColumnsOfProjectsTest.class,
"in_progress_projects.sql");
private PopulateUuidColumnsOfProjects underTest = new PopulateUuidColumnsOfProjects(db.database());
@@ -58,7 +57,6 @@ public class PopulateUuidColumnsOfProjectsTest {
insertComponent(8, 200L, 1L, 200L); // a project copy of project 1 for developer 200 (does't exist)
insertComponent(9, 6L, 300L, null); // a project view of project 300 (doesn't exist)
insertComponent(10, 400L, null, null); // a module of a non existing project
- db.commit();
underTest.execute();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateUuidColumnsOfResourceIndexTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateUuidColumnsOfResourceIndexTest.java
index 3bd42776369..2605e582c45 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateUuidColumnsOfResourceIndexTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateUuidColumnsOfResourceIndexTest.java
@@ -25,8 +25,7 @@ import java.util.Map;
import javax.annotation.Nullable;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
import static org.assertj.core.api.Assertions.assertThat;
@@ -34,7 +33,7 @@ import static org.assertj.core.api.Assertions.assertThat;
public class PopulateUuidColumnsOfResourceIndexTest {
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, PopulateUuidColumnsOfResourceIndexTest.class,
+ public CoreDbTester db = CoreDbTester.createForSchema(PopulateUuidColumnsOfResourceIndexTest.class,
"in_progress_resourceindex_with_projects.sql");
private PopulateUuidColumnsOfResourceIndex underTest = new PopulateUuidColumnsOfResourceIndex(db.database());
@@ -59,7 +58,6 @@ public class PopulateUuidColumnsOfResourceIndexTest {
insertResourceIndex(3, 90, 70); // 90 does not exist
insertResourceIndex(4, 40, 100); // 100 does not exist
insertResourceIndex(5, 110, 100); // 110 and 100 do not exist
- db.commit();
underTest.execute();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateUuidPathColumnOnProjectsTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateUuidPathColumnOnProjectsTest.java
index f3063c9a979..50202a3ed0d 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateUuidPathColumnOnProjectsTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateUuidPathColumnOnProjectsTest.java
@@ -23,8 +23,7 @@ import java.sql.SQLException;
import java.util.Map;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.format;
import static org.assertj.core.api.Assertions.assertThat;
@@ -43,7 +42,7 @@ public class PopulateUuidPathColumnOnProjectsTest {
private static final String QUALIFIER_FILE = "FIL";
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, PopulateUuidPathColumnOnProjectsTest.class,
+ public CoreDbTester db = CoreDbTester.createForSchema(PopulateUuidPathColumnOnProjectsTest.class,
"in_progress_projects_and_snapshots.sql");
private PopulateUuidPathColumnOnProjects underTest = new PopulateUuidPathColumnOnProjects(db.database());
@@ -149,7 +148,6 @@ public class PopulateUuidPathColumnOnProjectsTest {
"root_component_uuid", rootUuid,
"qualifier", qualifier);
}
- db.commit();
}
private void verifyPath(String componentUuid, String expectedUuidPath) {
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/RemoveUsersPasswordWhenNotLocalTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/RemoveUsersPasswordWhenNotLocalTest.java
index 6d43af7a0eb..6f40c163f4b 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/RemoveUsersPasswordWhenNotLocalTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/RemoveUsersPasswordWhenNotLocalTest.java
@@ -25,7 +25,7 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
@@ -39,7 +39,7 @@ public class RemoveUsersPasswordWhenNotLocalTest {
System2 system2 = mock(System2.class);
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, RemoveUsersPasswordWhenNotLocalTest.class, "schema.sql");
+ public CoreDbTester db = CoreDbTester.createForSchema(RemoveUsersPasswordWhenNotLocalTest.class, "schema.sql");
private RemoveUsersPasswordWhenNotLocal migration = new RemoveUsersPasswordWhenNotLocal(db.database(), system2);
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/AddErrorColumnsToCeActivityTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/AddErrorColumnsToCeActivityTest.java
index fa77dad9afb..97badc80994 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/AddErrorColumnsToCeActivityTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/AddErrorColumnsToCeActivityTest.java
@@ -24,8 +24,7 @@ import java.sql.Types;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
@@ -34,7 +33,7 @@ public class AddErrorColumnsToCeActivityTest {
private static final String TABLE = "CE_ACTIVITY";
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, AddErrorColumnsToCeActivityTest.class, "old_ce_activity.sql");
+ public CoreDbTester db = CoreDbTester.createForSchema(AddErrorColumnsToCeActivityTest.class, "old_ce_activity.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
@@ -63,7 +62,6 @@ public class AddErrorColumnsToCeActivityTest {
"created_at", valueOf(9512),
"updated_at", valueOf(45120));
}
- db.commit();
underTest.execute();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/CopyActivitiesToQprofileChangesTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/CopyActivitiesToQprofileChangesTest.java
index 2ecc1d07649..13e17f66864 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/CopyActivitiesToQprofileChangesTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/CopyActivitiesToQprofileChangesTest.java
@@ -25,8 +25,7 @@ import java.util.Map;
import javax.annotation.Nullable;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static org.assertj.core.api.Assertions.assertThat;
@@ -38,7 +37,7 @@ public class CopyActivitiesToQprofileChangesTest {
private static final String TABLE_QPROFILE_CHANGES = "qprofile_changes";
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, CopyActivitiesToQprofileChangesTest.class, "schema.sql");
+ public CoreDbTester db = CoreDbTester.createForSchema(CopyActivitiesToQprofileChangesTest.class, "schema.sql");
private CopyActivitiesToQprofileChanges underTest = new CopyActivitiesToQprofileChanges(db.database());
@@ -123,11 +122,15 @@ public class CopyActivitiesToQprofileChangesTest {
assertThat(db.countRowsOfTable(TABLE_QPROFILE_CHANGES)).isEqualTo(0);
}
- private void insertActivity(String key, @Nullable String profileKey, @Nullable String login, @Nullable String activityType, @Nullable String type, @Nullable String data, @Nullable Long createdAt) {
- db.executeInsert(TABLE_ACTIVITIES, "log_key", key, "profile_key", profileKey, "user_login", login, "log_type", activityType, "log_action", type, "data_field", data, "created_at", createdAt != null ? new Date(createdAt) : null);
+ private void insertActivity(String key, @Nullable String profileKey, @Nullable String login, @Nullable String activityType, @Nullable String type, @Nullable String data,
+ @Nullable Long createdAt) {
+ db.executeInsert(TABLE_ACTIVITIES, "log_key", key, "profile_key", profileKey, "user_login", login, "log_type", activityType, "log_action", type, "data_field", data,
+ "created_at", createdAt != null ? new Date(createdAt) : null);
}
private Map<String, Object> selectChangeByKey(String key) {
- return db.selectFirst("select qprofile_key as \"qprofileKey\", created_at as \"createdAt\", user_login as \"login\", change_type as \"changeType\", change_data as \"changeData\" from qprofile_changes where kee='" + key + "'");
+ return db.selectFirst(
+ "select qprofile_key as \"qprofileKey\", created_at as \"createdAt\", user_login as \"login\", change_type as \"changeType\", change_data as \"changeData\" from qprofile_changes where kee='"
+ + key + "'");
}
}
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/CreateTableCeTaskInputTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/CreateTableCeTaskInputTest.java
index d0cf946511a..b2fcfbbc2ce 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/CreateTableCeTaskInputTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/CreateTableCeTaskInputTest.java
@@ -24,8 +24,7 @@ import java.sql.Types;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static org.assertj.core.api.Assertions.assertThat;
@@ -33,7 +32,7 @@ public class CreateTableCeTaskInputTest {
private static final String TABLE_CE_TASK_INPUT = "ce_task_input";
@Rule
- public final DbTester dbTester = DbTester.createForSchema(System2.INSTANCE, CreateTableCeTaskInputTest.class, "empty.sql");
+ public final CoreDbTester dbTester = CoreDbTester.createForSchema(CreateTableCeTaskInputTest.class, "empty.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/CreateTableInternalPropertiesTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/CreateTableInternalPropertiesTest.java
index af8688dc37a..15f214eed04 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/CreateTableInternalPropertiesTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/CreateTableInternalPropertiesTest.java
@@ -24,8 +24,7 @@ import java.sql.Types;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static org.assertj.core.api.Assertions.assertThat;
@@ -33,7 +32,7 @@ public class CreateTableInternalPropertiesTest {
private static final String TABLE_INTERNAL_PROPERTIES = "internal_properties";
@Rule
- public final DbTester dbTester = DbTester.createForSchema(System2.INSTANCE, CreateTableInternalPropertiesTest.class, "empty.sql");
+ public final CoreDbTester dbTester = CoreDbTester.createForSchema(CreateTableInternalPropertiesTest.class, "empty.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/CreateTableProperties2Test.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/CreateTableProperties2Test.java
index be39be19dc4..3bda71adb58 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/CreateTableProperties2Test.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/CreateTableProperties2Test.java
@@ -24,8 +24,7 @@ import java.sql.Types;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static org.assertj.core.api.Assertions.assertThat;
@@ -33,7 +32,7 @@ public class CreateTableProperties2Test {
private static final String TABLE_PROPERTIES_2 = "properties2";
@Rule
- public final DbTester dbTester = DbTester.createForSchema(System2.INSTANCE, CreateTableProperties2Test.class, "empty.sql");
+ public final CoreDbTester dbTester = CoreDbTester.createForSchema(CreateTableProperties2Test.class, "empty.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/CreateTableQprofileChangesTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/CreateTableQprofileChangesTest.java
index da0b4e73ffb..d091f423e7b 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/CreateTableQprofileChangesTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/CreateTableQprofileChangesTest.java
@@ -24,8 +24,7 @@ import java.sql.Types;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static org.assertj.core.api.Assertions.assertThat;
@@ -33,7 +32,7 @@ public class CreateTableQprofileChangesTest {
private static final String TABLE_QPROFILE_CHANGES = "qprofile_changes";
@Rule
- public final DbTester dbTester = DbTester.createForSchema(System2.INSTANCE, CreateTableQprofileChangesTest.class, "empty.sql");
+ public final CoreDbTester dbTester = CoreDbTester.createForSchema(CreateTableQprofileChangesTest.class, "empty.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/CreateTableRuleRepositoriesTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/CreateTableRuleRepositoriesTest.java
index 25703c6bf7b..349295b9e2b 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/CreateTableRuleRepositoriesTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/CreateTableRuleRepositoriesTest.java
@@ -24,8 +24,7 @@ import java.sql.Types;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static org.assertj.core.api.Assertions.assertThat;
@@ -33,7 +32,7 @@ public class CreateTableRuleRepositoriesTest {
private static final String TABLE_RULE_REPOSITORIES = "rule_repositories";
@Rule
- public final DbTester dbTester = DbTester.createForSchema(System2.INSTANCE, CreateTableRuleRepositoriesTest.class, "empty.sql");
+ public final CoreDbTester dbTester = CoreDbTester.createForSchema(CreateTableRuleRepositoriesTest.class, "empty.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/CreateTableScannerContextTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/CreateTableScannerContextTest.java
index 5c8b6bdb891..74ccfbfe732 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/CreateTableScannerContextTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/CreateTableScannerContextTest.java
@@ -24,8 +24,7 @@ import java.sql.Types;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static org.assertj.core.api.Assertions.assertThat;
@@ -33,7 +32,7 @@ public class CreateTableScannerContextTest {
private static final String TABLE_CE_SCANNER_CONTEXT = "ce_scanner_context";
@Rule
- public final DbTester dbTester = DbTester.createForSchema(System2.INSTANCE, CreateTableCeTaskInputTest.class, "empty.sql");
+ public final CoreDbTester dbTester = CoreDbTester.createForSchema(CreateTableCeTaskInputTest.class, "empty.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/DeleteProjectDashboardsTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/DeleteProjectDashboardsTest.java
index 486440993f3..c22747021da 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/DeleteProjectDashboardsTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/DeleteProjectDashboardsTest.java
@@ -25,15 +25,14 @@ import java.util.List;
import java.util.stream.Collectors;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
import static org.assertj.core.api.Assertions.assertThat;
public class DeleteProjectDashboardsTest {
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, DeleteProjectDashboardsTest.class, "schema.sql");
+ public CoreDbTester db = CoreDbTester.createForSchema(DeleteProjectDashboardsTest.class, "schema.sql");
private DeleteProjectDashboards underTest = new DeleteProjectDashboards(db.database());
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/DeleteReportsFromCeQueueTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/DeleteReportsFromCeQueueTest.java
index b17e71a6712..d300c8ae984 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/DeleteReportsFromCeQueueTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/DeleteReportsFromCeQueueTest.java
@@ -24,9 +24,7 @@ import java.util.List;
import java.util.Map;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
-import org.sonar.db.ce.CeTaskTypes;
+import org.sonar.db.CoreDbTester;
import static org.assertj.core.api.Assertions.assertThat;
@@ -36,7 +34,7 @@ public class DeleteReportsFromCeQueueTest {
private static final String TABLE_NAME = "ce_queue";
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, DeleteReportsFromCeQueueTest.class, "schema.sql");
+ public CoreDbTester db = CoreDbTester.createForSchema(DeleteReportsFromCeQueueTest.class, "schema.sql");
private DeleteReportsFromCeQueue underTest = new DeleteReportsFromCeQueue(db.database());
@@ -49,7 +47,7 @@ public class DeleteReportsFromCeQueueTest {
@Test
public void delete_tasks_with_type_REPORT_only() throws SQLException {
- db.executeInsert("ce_queue", "uuid", "U1", "task_type", CeTaskTypes.REPORT, "status", "PENDING", "created_at", NOW, "updated_at", NOW);
+ db.executeInsert("ce_queue", "uuid", "U1", "task_type", "REPORT", "status", "PENDING", "created_at", NOW, "updated_at", NOW);
db.executeInsert("ce_queue", "uuid", "U2", "task_type", "REFRESH_VIEWS", "status", "PENDING", "created_at", NOW, "updated_at", NOW);
underTest.execute();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/PopulateTableProperties2Test.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/PopulateTableProperties2Test.java
index 37b9eb93470..787cabb55dd 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/PopulateTableProperties2Test.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/PopulateTableProperties2Test.java
@@ -28,8 +28,7 @@ import org.assertj.core.api.AbstractAssert;
import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.utils.System2;
-import org.sonar.db.DbSession;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.Boolean.FALSE;
import static java.lang.Boolean.TRUE;
@@ -52,7 +51,7 @@ public class PopulateTableProperties2Test {
private System2 system2 = mock(System2.class);
@Rule
- public DbTester dbTester = DbTester.createForSchema(system2, PopulateTableProperties2Test.class,
+ public CoreDbTester dbTester = CoreDbTester.createForSchema(PopulateTableProperties2Test.class,
"properties_and_properties_2_tables.sql");
private PopulateTableProperties2 underTest = new PopulateTableProperties2(dbTester.database(), system2);
@@ -202,7 +201,6 @@ public class PopulateTableProperties2Test {
"text_value", value,
"resource_id", resourceId == null ? null : valueOf(resourceId),
"user_id", userId == null ? null : valueOf(userId));
- dbTester.commit();
}
private void insertProperty2(int idAndKey, @Nullable String value, @Nullable Integer resourceId, @Nullable Integer userId) {
@@ -215,22 +213,20 @@ public class PopulateTableProperties2Test {
"text_value", value != null && value.length() <= 4000 ? value : null,
"clob_value", value != null && value.length() > 4000 ? value : null,
"created_at", valueOf(1_55555_555));
- dbTester.commit();
}
private Property2Assert assertThatProperty2(int key) {
- return new Property2Assert(dbTester, dbTester.getSession(), valueOf(key));
+ return new Property2Assert(dbTester, valueOf(key));
}
private static class Property2Assert extends AbstractAssert<Property2Assert, Property2> {
- private Property2Assert(DbTester dbTester, DbSession dbSession, String internalPropertyKey) {
- super(asInternalProperty(dbTester, dbSession, internalPropertyKey), Property2Assert.class);
+ private Property2Assert(CoreDbTester dbTester, String internalPropertyKey) {
+ super(asInternalProperty(dbTester, internalPropertyKey), Property2Assert.class);
}
- private static Property2 asInternalProperty(DbTester dbTester, DbSession dbSession, String key) {
+ private static Property2 asInternalProperty(CoreDbTester dbTester, String key) {
Map<String, Object> row = dbTester.selectFirst(
- dbSession,
"select" +
" user_id as \"userId\", resource_id as \"resourceId\", is_empty as \"isEmpty\", text_value as \"textValue\", clob_value as \"clobValue\", created_at as \"createdAt\"" +
" from properties2" +
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/RemoveViewsDefinitionFromPropertiesTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/RemoveViewsDefinitionFromPropertiesTest.java
index 03f6855b833..0ae2b2e32f4 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/RemoveViewsDefinitionFromPropertiesTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v61/RemoveViewsDefinitionFromPropertiesTest.java
@@ -26,7 +26,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.spy;
@@ -39,7 +39,7 @@ public class RemoveViewsDefinitionFromPropertiesTest {
@Rule
public ExpectedException expectedException = ExpectedException.none();
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, RemoveViewsDefinitionFromPropertiesTest.class, "properties_and_internal_properties.sql");
+ public CoreDbTester db = CoreDbTester.createForSchema(RemoveViewsDefinitionFromPropertiesTest.class, "properties_and_internal_properties.sql");
private System2 system2 = spy(System2.INSTANCE);
private RemoveViewsDefinitionFromProperties underTest = new RemoveViewsDefinitionFromProperties(db.database(), system2);
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/AddIsRootColumnOnTableUsersTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/AddIsRootColumnOnTableUsersTest.java
index ae9b923eb62..ce0617ac092 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/AddIsRootColumnOnTableUsersTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/AddIsRootColumnOnTableUsersTest.java
@@ -25,11 +25,11 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
public class AddIsRootColumnOnTableUsersTest {
@Rule
- public DbTester dbTester = DbTester.createForSchema(System2.INSTANCE, AddIsRootColumnOnTableUsersTest.class, "table_users.sql");
+ public CoreDbTester dbTester = CoreDbTester.createForSchema(AddIsRootColumnOnTableUsersTest.class, "table_users.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/AddOrganizationUuidToGroupRolesTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/AddOrganizationUuidToGroupRolesTest.java
index 5ed6707d5c7..683e4319858 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/AddOrganizationUuidToGroupRolesTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/AddOrganizationUuidToGroupRolesTest.java
@@ -25,13 +25,13 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
public class AddOrganizationUuidToGroupRolesTest {
@Rule
- public final DbTester dbTester = DbTester.createForSchema(System2.INSTANCE, AddOrganizationUuidToGroupRolesTest.class, "previous-group_roles.sql");
+ public final CoreDbTester dbTester = CoreDbTester.createForSchema(AddOrganizationUuidToGroupRolesTest.class, "previous-group_roles.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/AddOrganizationUuidToGroupsTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/AddOrganizationUuidToGroupsTest.java
index 9deeeca3077..fb5a7540102 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/AddOrganizationUuidToGroupsTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/AddOrganizationUuidToGroupsTest.java
@@ -25,12 +25,12 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
public class AddOrganizationUuidToGroupsTest {
@Rule
- public final DbTester dbTester = DbTester.createForSchema(System2.INSTANCE, AddOrganizationUuidToGroupsTest.class, "previous-groups.sql");
+ public final CoreDbTester dbTester = CoreDbTester.createForSchema(AddOrganizationUuidToGroupsTest.class, "previous-groups.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/AddOrganizationUuidToPermissionTemplatesTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/AddOrganizationUuidToPermissionTemplatesTest.java
index 0d8c8a8845f..d324e3cc15f 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/AddOrganizationUuidToPermissionTemplatesTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/AddOrganizationUuidToPermissionTemplatesTest.java
@@ -25,12 +25,12 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
public class AddOrganizationUuidToPermissionTemplatesTest {
@Rule
- public final DbTester dbTester = DbTester.createForSchema(System2.INSTANCE, AddOrganizationUuidToPermissionTemplatesTest.class, "previous-permission_templates.sql");
+ public final CoreDbTester dbTester = CoreDbTester.createForSchema(AddOrganizationUuidToPermissionTemplatesTest.class, "previous-permission_templates.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/AddOrganizationUuidToUserRolesTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/AddOrganizationUuidToUserRolesTest.java
index 94638e0c05d..a6b66b35cff 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/AddOrganizationUuidToUserRolesTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/AddOrganizationUuidToUserRolesTest.java
@@ -25,13 +25,13 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
public class AddOrganizationUuidToUserRolesTest {
@Rule
- public final DbTester dbTester = DbTester.createForSchema(System2.INSTANCE, AddOrganizationUuidToUserRolesTest.class, "previous-user_roles.sql");
+ public final CoreDbTester dbTester = CoreDbTester.createForSchema(AddOrganizationUuidToUserRolesTest.class, "previous-user_roles.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/CreateDefaultOrganizationTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/CreateDefaultOrganizationTest.java
index d906dd3db0b..3b124d0942a 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/CreateDefaultOrganizationTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/CreateDefaultOrganizationTest.java
@@ -23,12 +23,14 @@ import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
+import java.util.Date;
+import java.util.Map;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.utils.System2;
import org.sonar.core.util.UuidFactory;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.fail;
@@ -43,7 +45,7 @@ public class CreateDefaultOrganizationTest {
private System2 system2 = mock(System2.class);
@Rule
- public final DbTester dbTester = DbTester.createForSchema(system2, CreateDefaultOrganizationTest.class, "organizations_and_internal_properties.sql");
+ public final CoreDbTester dbTester = CoreDbTester.createForSchema(CreateDefaultOrganizationTest.class, "organizations_and_internal_properties.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
@@ -98,8 +100,14 @@ public class CreateDefaultOrganizationTest {
}
private void verifyInternalProperty(String expectedUuid) {
- assertThat(dbTester.getDbClient().internalPropertiesDao().selectByKey(dbTester.getSession(), INTERNAL_PROPERTY_ORGANIZATION_DEFAULT))
- .contains(expectedUuid);
+
+ Map<String, Object> row = dbTester.selectFirst("select" +
+ " kee as \"KEE\"," +
+ " is_empty as \"IS_EMPTY\"," +
+ " text_value as \"TEXT_VALUE\"" +
+ " from internal_properties" +
+ " where kee = '" + INTERNAL_PROPERTY_ORGANIZATION_DEFAULT + "'");
+ assertThat(row.get("TEXT_VALUE")).isEqualTo(expectedUuid);
}
@Test
@@ -128,8 +136,11 @@ public class CreateDefaultOrganizationTest {
}
private void insertExistingInternalProperty(String uuid) {
- dbTester.getDbClient().internalPropertiesDao().save(dbTester.getSession(), INTERNAL_PROPERTY_ORGANIZATION_DEFAULT, uuid);
- dbTester.commit();
+ dbTester.executeInsert("INTERNAL_PROPERTIES",
+ "KEE", INTERNAL_PROPERTY_ORGANIZATION_DEFAULT,
+ "TEXT_VALUE", uuid,
+ "CREATED_AT", new Date().getTime(),
+ "IS_EMPTY", false);
}
private void insertExistingOrganization(String uuid, long past) throws Exception {
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/CreateTableOrganizationsTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/CreateTableOrganizationsTest.java
index b5627f4afca..2eecc9174d8 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/CreateTableOrganizationsTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/CreateTableOrganizationsTest.java
@@ -25,7 +25,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static org.assertj.core.api.Assertions.assertThat;
@@ -33,7 +33,7 @@ public class CreateTableOrganizationsTest {
private static final String TABLE_ORGANIZATIONS = "organizations";
@Rule
- public final DbTester dbTester = DbTester.createForSchema(System2.INSTANCE, CreateTableOrganizationsTest.class, "empty.sql");
+ public final CoreDbTester dbTester = CoreDbTester.createForSchema(CreateTableOrganizationsTest.class, "empty.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/CreateTableWebhookDeliveriesTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/CreateTableWebhookDeliveriesTest.java
index 0995fdd714f..07e01d720e1 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/CreateTableWebhookDeliveriesTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/CreateTableWebhookDeliveriesTest.java
@@ -25,7 +25,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static org.assertj.core.api.Assertions.assertThat;
@@ -35,7 +35,7 @@ public class CreateTableWebhookDeliveriesTest {
private static final String TABLE = "webhook_deliveries";
@Rule
- public final DbTester dbTester = DbTester.createForSchema(System2.INSTANCE, CreateTableWebhookDeliveriesTest.class, "empty.sql");
+ public final CoreDbTester dbTester = CoreDbTester.createForSchema(CreateTableWebhookDeliveriesTest.class, "empty.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/DeletePermissionShareDashboardTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/DeletePermissionShareDashboardTest.java
index 730920747eb..96a8b1c7ed8 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/DeletePermissionShareDashboardTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/DeletePermissionShareDashboardTest.java
@@ -24,7 +24,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static org.assertj.core.api.Assertions.assertThat;
@@ -34,7 +34,7 @@ public class DeletePermissionShareDashboardTest {
public ExpectedException expectedException = ExpectedException.none();
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, DeletePermissionShareDashboardTest.class, "roles.sql");
+ public CoreDbTester db = CoreDbTester.createForSchema(DeletePermissionShareDashboardTest.class, "roles.sql");
private DeletePermissionShareDashboard underTest = new DeletePermissionShareDashboard(db.database());
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/DropIssueFiltersTableTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/DropIssueFiltersTableTest.java
index e2226eedafa..24c2dead008 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/DropIssueFiltersTableTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/DropIssueFiltersTableTest.java
@@ -23,12 +23,12 @@ import java.sql.SQLException;
import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
public class DropIssueFiltersTableTest {
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, DropIssueFiltersTableTest.class, "schema.sql");
+ public CoreDbTester db = CoreDbTester.createForSchema(DropIssueFiltersTableTest.class, "schema.sql");
private DropIssueFiltersTables underTest = new DropIssueFiltersTables(db.database());
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/DropMeasureFiltersTableTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/DropMeasureFiltersTableTest.java
index 7b40b0451ca..989d5a58db2 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/DropMeasureFiltersTableTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/DropMeasureFiltersTableTest.java
@@ -23,12 +23,12 @@ import java.sql.SQLException;
import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
public class DropMeasureFiltersTableTest {
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, DropMeasureFiltersTableTest.class, "schema.sql");
+ public CoreDbTester db = CoreDbTester.createForSchema(DropMeasureFiltersTableTest.class, "schema.sql");
private DropMeasureFiltersTables underTest = new DropMeasureFiltersTables(db.database());
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/DropRelatedDashboardTablesTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/DropRelatedDashboardTablesTest.java
index 5f44c1abd28..e69b99ad191 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/DropRelatedDashboardTablesTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/DropRelatedDashboardTablesTest.java
@@ -23,12 +23,12 @@ import java.sql.SQLException;
import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
public class DropRelatedDashboardTablesTest {
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, DropRelatedDashboardTablesTest.class, "schema.sql");
+ public CoreDbTester db = CoreDbTester.createForSchema(DropRelatedDashboardTablesTest.class, "schema.sql");
private DropRelatedDashboardTables underTest = new DropRelatedDashboardTables(db.database());
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/MakeOrganizationUuidNotNullOnGroupRolesTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/MakeOrganizationUuidNotNullOnGroupRolesTest.java
index 0e7f106dfdf..404a422203a 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/MakeOrganizationUuidNotNullOnGroupRolesTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/MakeOrganizationUuidNotNullOnGroupRolesTest.java
@@ -25,7 +25,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
@@ -34,7 +34,7 @@ public class MakeOrganizationUuidNotNullOnGroupRolesTest {
private static final String TABLE_GROUP_ROLES = "group_roles";
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, MakeOrganizationUuidNotNullOnGroupRolesTest.class,
+ public CoreDbTester db = CoreDbTester.createForSchema(MakeOrganizationUuidNotNullOnGroupRolesTest.class,
"in_progress_group_roles.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/MakeOrganizationUuidNotNullOnGroupsTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/MakeOrganizationUuidNotNullOnGroupsTest.java
index b6d66522515..761e6c095a3 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/MakeOrganizationUuidNotNullOnGroupsTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/MakeOrganizationUuidNotNullOnGroupsTest.java
@@ -25,7 +25,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
@@ -34,7 +34,7 @@ public class MakeOrganizationUuidNotNullOnGroupsTest {
private static final String TABLE_GROUPS = "groups";
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, MakeOrganizationUuidNotNullOnGroupsTest.class,
+ public CoreDbTester db = CoreDbTester.createForSchema(MakeOrganizationUuidNotNullOnGroupsTest.class,
"in_progress_groups.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/MakeOrganizationUuidNotNullOnPermissionTemplatesTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/MakeOrganizationUuidNotNullOnPermissionTemplatesTest.java
index f17cf18bd7a..e9cf4ac2363 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/MakeOrganizationUuidNotNullOnPermissionTemplatesTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/MakeOrganizationUuidNotNullOnPermissionTemplatesTest.java
@@ -25,7 +25,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
@@ -35,7 +35,7 @@ public class MakeOrganizationUuidNotNullOnPermissionTemplatesTest {
private static final String TABLE_PERMISSION_TEMPLATES = "permission_templates";
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, MakeOrganizationUuidNotNullOnPermissionTemplatesTest.class,
+ public CoreDbTester db = CoreDbTester.createForSchema(MakeOrganizationUuidNotNullOnPermissionTemplatesTest.class,
"in_progress_permission_templates.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/MakeOrganizationUuidNotNullOnUserRolesTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/MakeOrganizationUuidNotNullOnUserRolesTest.java
index c1bd3988305..df5b5642c0c 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/MakeOrganizationUuidNotNullOnUserRolesTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/MakeOrganizationUuidNotNullOnUserRolesTest.java
@@ -25,7 +25,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
@@ -34,7 +34,7 @@ public class MakeOrganizationUuidNotNullOnUserRolesTest {
private static final String TABLE_USER_ROLES = "user_roles";
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, MakeOrganizationUuidNotNullOnUserRolesTest.class,
+ public CoreDbTester db = CoreDbTester.createForSchema(MakeOrganizationUuidNotNullOnUserRolesTest.class,
"in_progress_user_roles.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/MakeRootColumnNotNullOnTableUsersTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/MakeRootColumnNotNullOnTableUsersTest.java
index 5e15f77c814..aafee864d2b 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/MakeRootColumnNotNullOnTableUsersTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/MakeRootColumnNotNullOnTableUsersTest.java
@@ -25,11 +25,11 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
public class MakeRootColumnNotNullOnTableUsersTest {
@Rule
- public DbTester dbTester = DbTester.createForSchema(System2.INSTANCE, MakeRootColumnNotNullOnTableUsersTest.class, "users_with_nullable_root.sql");
+ public CoreDbTester dbTester = CoreDbTester.createForSchema(MakeRootColumnNotNullOnTableUsersTest.class, "users_with_nullable_root.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/PopulateIsRootColumnOnTableUsersTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/PopulateIsRootColumnOnTableUsersTest.java
index 1e86c29ef41..9285b715dc8 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/PopulateIsRootColumnOnTableUsersTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/PopulateIsRootColumnOnTableUsersTest.java
@@ -24,8 +24,7 @@ import java.util.List;
import java.util.Map;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static org.assertj.core.api.Assertions.assertThat;
@@ -34,7 +33,7 @@ public class PopulateIsRootColumnOnTableUsersTest {
private static final String ROLE_ADMIN = "admin";
@Rule
- public DbTester dbTester = DbTester.createForSchema(System2.INSTANCE, PopulateIsRootColumnOnTableUsersTest.class, "users_and_permissions_tables.sql");
+ public CoreDbTester dbTester = CoreDbTester.createForSchema(PopulateIsRootColumnOnTableUsersTest.class, "users_and_permissions_tables.sql");
private PopulateIsRootColumnOnTableUsers underTest = new PopulateIsRootColumnOnTableUsers(dbTester.database());
@@ -57,7 +56,6 @@ public class PopulateIsRootColumnOnTableUsersTest {
@Test
public void execute_sets_inactive_user_with_no_permission_has_not_root() throws SQLException {
insertUser("foo", false);
- dbTester.commit();
underTest.execute();
@@ -114,14 +112,14 @@ public class PopulateIsRootColumnOnTableUsersTest {
insertGroupRole(adminGroupId, ROLE_ADMIN);
int groupId = insertGroup("other group");
int[] userIds = {
- insertUser("inactive_direct_admin", false),
- insertUser("active_direct_admin", true),
- insertUser("inactive_group_admin", false),
- insertUser("active_group_admin", true),
- insertUser("group_and_direct_admin", true),
- insertUser("group_perm_user", true),
- insertUser("no_perm_user", true),
- insertUser("all_groups_user", true)
+ insertUser("inactive_direct_admin", false),
+ insertUser("active_direct_admin", true),
+ insertUser("inactive_group_admin", false),
+ insertUser("active_group_admin", true),
+ insertUser("group_and_direct_admin", true),
+ insertUser("group_perm_user", true),
+ insertUser("no_perm_user", true),
+ insertUser("all_groups_user", true)
};
// inactive_direct_admin
insertRole(userIds[0], ROLE_ADMIN);
@@ -160,31 +158,26 @@ public class PopulateIsRootColumnOnTableUsersTest {
private void insertRole(int userId, String role) {
dbTester.executeInsert("user_roles", "user_id", userId, "role", role);
- dbTester.commit();
}
private int insertUser(String login, boolean active) {
dbTester.executeInsert(USERS_TABLE, "login", login, "active", active);
- dbTester.commit();
Long userId = (Long) dbTester.selectFirst("select id as \"id\" from users where login = '" + login + "'").get("id");
return userId.intValue();
}
private int insertGroup(String groupName) {
dbTester.executeInsert("groups", "name", groupName);
- dbTester.commit();
Long groupId = (Long) dbTester.selectFirst("select id as \"id\" from groups where name = '" + groupName + "'").get("id");
return groupId.intValue();
}
private void insertGroupRole(int groupId, String role) {
dbTester.executeInsert("group_roles", "group_id", groupId, "role", role);
- dbTester.commit();
}
private void addUserToGroup(int userId, int groupId) {
dbTester.executeInsert("groups_users", "user_id", userId, "group_id", groupId);
- dbTester.commit();
}
private void verifySingleUser(String login, boolean root) {
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/PopulateOrganizationUuidOfGroupRolesTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/PopulateOrganizationUuidOfGroupRolesTest.java
index b9b678d14d4..c3e54ab6d3c 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/PopulateOrganizationUuidOfGroupRolesTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/PopulateOrganizationUuidOfGroupRolesTest.java
@@ -24,7 +24,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static org.assertj.core.api.Assertions.assertThat;
@@ -34,7 +34,7 @@ public class PopulateOrganizationUuidOfGroupRolesTest {
private static final String AN_ORG_UUID = "org1";
@Rule
- public DbTester dbTester = DbTester.createForSchema(System2.INSTANCE, PopulateOrganizationUuidOfGroupRolesTest.class, "group_roles.sql");
+ public CoreDbTester dbTester = CoreDbTester.createForSchema(PopulateOrganizationUuidOfGroupRolesTest.class, "group_roles.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/PopulateOrganizationUuidOfGroupsTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/PopulateOrganizationUuidOfGroupsTest.java
index 31827ec4e30..c36c568efe8 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/PopulateOrganizationUuidOfGroupsTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/PopulateOrganizationUuidOfGroupsTest.java
@@ -25,7 +25,7 @@ import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.utils.System2;
import org.sonar.api.utils.internal.TestSystem2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static org.assertj.core.api.Assertions.assertThat;
@@ -40,7 +40,7 @@ public class PopulateOrganizationUuidOfGroupsTest {
public ExpectedException expectedException = ExpectedException.none();
@Rule
- public DbTester dbTester = DbTester.createForSchema(system2, PopulateOrganizationUuidOfGroupsTest.class, "user_groups.sql");
+ public CoreDbTester dbTester = CoreDbTester.createForSchema(PopulateOrganizationUuidOfGroupsTest.class, "user_groups.sql");
private PopulateOrganizationUuidOfGroups underTest = new PopulateOrganizationUuidOfGroups(dbTester.database(), system2);
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/PopulateOrganizationUuidOfPermissionTemplatesTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/PopulateOrganizationUuidOfPermissionTemplatesTest.java
index 4e87186e073..a856c8ab0c7 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/PopulateOrganizationUuidOfPermissionTemplatesTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/PopulateOrganizationUuidOfPermissionTemplatesTest.java
@@ -24,7 +24,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static org.assertj.core.api.Assertions.assertThat;
@@ -34,7 +34,7 @@ public class PopulateOrganizationUuidOfPermissionTemplatesTest {
private static final String AN_ORG_UUID = "org1";
@Rule
- public DbTester dbTester = DbTester.createForSchema(System2.INSTANCE, PopulateOrganizationUuidOfPermissionTemplatesTest.class, "permission_templates.sql");
+ public CoreDbTester dbTester = CoreDbTester.createForSchema(PopulateOrganizationUuidOfPermissionTemplatesTest.class, "permission_templates.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/PopulateOrganizationUuidOfUserRolesTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/PopulateOrganizationUuidOfUserRolesTest.java
index 74932d6cf5d..12675ce9313 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/PopulateOrganizationUuidOfUserRolesTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/PopulateOrganizationUuidOfUserRolesTest.java
@@ -24,7 +24,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static org.assertj.core.api.Assertions.assertThat;
@@ -34,7 +34,7 @@ public class PopulateOrganizationUuidOfUserRolesTest {
private static final String AN_ORG_UUID = "org1";
@Rule
- public DbTester dbTester = DbTester.createForSchema(System2.INSTANCE, PopulateOrganizationUuidOfUserRolesTest.class, "user_roles.sql");
+ public CoreDbTester dbTester = CoreDbTester.createForSchema(PopulateOrganizationUuidOfUserRolesTest.class, "user_roles.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/UpdateQualityGateConditionsOnCoverageTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/UpdateQualityGateConditionsOnCoverageTest.java
index d64260361a4..cf55e2c5e61 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/UpdateQualityGateConditionsOnCoverageTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/UpdateQualityGateConditionsOnCoverageTest.java
@@ -37,8 +37,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.format;
import static org.assertj.core.api.Assertions.assertThat;
@@ -50,7 +49,7 @@ public class UpdateQualityGateConditionsOnCoverageTest {
private static final String TABLE_QUALITY_GATE_CONDITIONS = "quality_gate_conditions";
@Rule
- public DbTester dbTester = DbTester.createForSchema(System2.INSTANCE, UpdateQualityGateConditionsOnCoverageTest.class, "schema.sql");
+ public CoreDbTester dbTester = CoreDbTester.createForSchema(UpdateQualityGateConditionsOnCoverageTest.class, "schema.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
@@ -238,12 +237,12 @@ public class UpdateQualityGateConditionsOnCoverageTest {
private long insertMetric(String key) {
dbTester.executeInsert("metrics", "NAME", key);
- return (Long) dbTester.selectFirst(dbTester.getSession(), format("select id as \"id\" from metrics where name='%s'", key)).get("id");
+ return (Long) dbTester.selectFirst(format("select id as \"id\" from metrics where name='%s'", key)).get("id");
}
private long insertQualityGate(String qualityGate) {
dbTester.executeInsert(TABLE_QUALITY_GATES, "NAME", qualityGate);
- return (Long) dbTester.selectFirst(dbTester.getSession(), format("select id as \"id\" from %s where name='%s'", TABLE_QUALITY_GATES, qualityGate)).get("id");
+ return (Long) dbTester.selectFirst(format("select id as \"id\" from %s where name='%s'", TABLE_QUALITY_GATES, qualityGate)).get("id");
}
private long insertQualityGateCondition(long qualityGateId, long metricId, @Nullable Long period, String operator, @Nullable String error, @Nullable String warning) {
@@ -259,12 +258,12 @@ public class UpdateQualityGateConditionsOnCoverageTest {
}
dbTester.executeInsert(TABLE_QUALITY_GATE_CONDITIONS, values);
return (Long) dbTester
- .selectFirst(dbTester.getSession(), format("select id as \"id\" from %s where qgate_id='%s' and metric_id='%s'", TABLE_QUALITY_GATE_CONDITIONS, qualityGateId, metricId))
+ .selectFirst(format("select id as \"id\" from %s where qgate_id='%s' and metric_id='%s'", TABLE_QUALITY_GATE_CONDITIONS, qualityGateId, metricId))
.get("id");
}
private void verifyConditions(long qualityGateId, QualityGateCondition... expectedConditions) {
- List<Map<String, Object>> results = dbTester.select(dbTester.getSession(),
+ List<Map<String, Object>> results = dbTester.select(
format("select m.name as \"metricKey\", qgc.period as \"period\", qgc.operator as \"operator\", qgc.value_error as \"error\", qgc.value_warning as \"warning\" from %s qgc " +
"inner join metrics m on m.id=qgc.metric_id " +
"where qgc.qgate_id = '%s'", TABLE_QUALITY_GATE_CONDITIONS, qualityGateId));
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/AddColumnGuardedToOrganizationsTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/AddColumnGuardedToOrganizationsTest.java
index edabf08650c..8c3981f1dfd 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/AddColumnGuardedToOrganizationsTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/AddColumnGuardedToOrganizationsTest.java
@@ -25,12 +25,12 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
public class AddColumnGuardedToOrganizationsTest {
@Rule
- public final DbTester dbTester = DbTester.createForSchema(System2.INSTANCE, AddColumnGuardedToOrganizationsTest.class, "previous-organizations.sql");
+ public final CoreDbTester dbTester = CoreDbTester.createForSchema(AddColumnGuardedToOrganizationsTest.class, "previous-organizations.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/AddDefaultPermTemplateColumnsToOrganizationsTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/AddDefaultPermTemplateColumnsToOrganizationsTest.java
index d4a9dcc0540..722665f9b2a 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/AddDefaultPermTemplateColumnsToOrganizationsTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/AddDefaultPermTemplateColumnsToOrganizationsTest.java
@@ -25,12 +25,12 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
public class AddDefaultPermTemplateColumnsToOrganizationsTest {
@Rule
- public final DbTester dbTester = DbTester.createForSchema(System2.INSTANCE, AddDefaultPermTemplateColumnsToOrganizationsTest.class, "previous-organizations.sql");
+ public final CoreDbTester dbTester = CoreDbTester.createForSchema(AddDefaultPermTemplateColumnsToOrganizationsTest.class, "previous-organizations.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/AddIndexOnOrganizationUuidOfProjectsTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/AddIndexOnOrganizationUuidOfProjectsTest.java
index 90ca69e93a8..57fdefbe569 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/AddIndexOnOrganizationUuidOfProjectsTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/AddIndexOnOrganizationUuidOfProjectsTest.java
@@ -24,12 +24,12 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
public class AddIndexOnOrganizationUuidOfProjectsTest {
@Rule
- public final DbTester dbTester = DbTester.createForSchema(System2.INSTANCE, AddIndexOnOrganizationUuidOfProjectsTest.class, "projects.sql");
+ public final CoreDbTester dbTester = CoreDbTester.createForSchema(AddIndexOnOrganizationUuidOfProjectsTest.class, "projects.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/AddOrganizationUuidToProjectsTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/AddOrganizationUuidToProjectsTest.java
index 8bf9cb76f2c..8ed2cdee74d 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/AddOrganizationUuidToProjectsTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/AddOrganizationUuidToProjectsTest.java
@@ -25,12 +25,12 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
public class AddOrganizationUuidToProjectsTest {
@Rule
- public final DbTester dbTester = DbTester.createForSchema(System2.INSTANCE, AddOrganizationUuidToProjectsTest.class, "previous-projects.sql");
+ public final CoreDbTester dbTester = CoreDbTester.createForSchema(AddOrganizationUuidToProjectsTest.class, "previous-projects.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/AddUserIdToOrganizationsTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/AddUserIdToOrganizationsTest.java
index af9c7781f5d..647584f2c7c 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/AddUserIdToOrganizationsTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/AddUserIdToOrganizationsTest.java
@@ -25,12 +25,12 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
public class AddUserIdToOrganizationsTest {
@Rule
- public final DbTester dbTester = DbTester.createForSchema(System2.INSTANCE, AddUserIdToOrganizationsTest.class, "previous-organizations.sql");
+ public final CoreDbTester dbTester = CoreDbTester.createForSchema(AddUserIdToOrganizationsTest.class, "previous-organizations.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/AddUuidToEventsTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/AddUuidToEventsTest.java
index 4fac5eb32b1..ce6f23c0a40 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/AddUuidToEventsTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/AddUuidToEventsTest.java
@@ -25,13 +25,13 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
public class AddUuidToEventsTest {
@Rule
- public final DbTester dbTester = DbTester.createForSchema(System2.INSTANCE, AddUuidToEventsTest.class, "previous-events.sql");
+ public final CoreDbTester dbTester = CoreDbTester.createForSchema(AddUuidToEventsTest.class, "previous-events.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/DefaultOrganizationUuidImplTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/DefaultOrganizationUuidImplTest.java
index 32a3bad09b1..6c4b101fd12 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/DefaultOrganizationUuidImplTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/DefaultOrganizationUuidImplTest.java
@@ -24,7 +24,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import org.sonar.server.platform.db.migration.step.DataChange;
import static org.assertj.core.api.Assertions.assertThat;
@@ -33,7 +33,7 @@ public class DefaultOrganizationUuidImplTest {
private static final String AN_ORG_UUID = "org1";
@Rule
- public DbTester dbTester = DbTester.createForSchema(System2.INSTANCE, DefaultOrganizationUuidImplTest.class, "internal_properties.sql");
+ public CoreDbTester dbTester = CoreDbTester.createForSchema(DefaultOrganizationUuidImplTest.class, "internal_properties.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/DeleteMeasuresHavingNoValueTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/DeleteMeasuresHavingNoValueTest.java
index b65234b9e40..a6792c6106e 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/DeleteMeasuresHavingNoValueTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/DeleteMeasuresHavingNoValueTest.java
@@ -27,8 +27,7 @@ import java.util.Map;
import javax.annotation.Nullable;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
import static org.apache.commons.lang.RandomStringUtils.randomAlphanumeric;
@@ -39,7 +38,7 @@ public class DeleteMeasuresHavingNoValueTest {
private static final String TABLE_MEASURES = "project_measures";
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, DeleteMeasuresHavingNoValueTest.class, "project_measures.sql");
+ public CoreDbTester db = CoreDbTester.createForSchema(DeleteMeasuresHavingNoValueTest.class, "project_measures.sql");
private DeleteMeasuresHavingNoValue underTest = new DeleteMeasuresHavingNoValue(db.database());
@@ -56,7 +55,6 @@ public class DeleteMeasuresHavingNoValueTest {
insertMeasure(null, "text", null, null);
insertMeasure(null, null, "data", null);
insertMeasure(null, null, null, 50d);
- db.commit();
underTest.execute();
@@ -68,7 +66,6 @@ public class DeleteMeasuresHavingNoValueTest {
insertMeasure(null, null, null, null);
insertMeasure(null, null, null, null);
insertMeasure(null, null, null, null);
- db.commit();
underTest.execute();
@@ -81,7 +78,6 @@ public class DeleteMeasuresHavingNoValueTest {
insertMeasureOnlyOnVariations(11d, 2d, null, null, null);
insertMeasureOnlyOnVariations(12d, null, 3d, 4d, 5d);
insertMeasureOnlyOnVariations(12d, 2d, 3d, 4d, 5d);
- db.commit();
underTest.execute();
@@ -95,7 +91,6 @@ public class DeleteMeasuresHavingNoValueTest {
insertMeasureOnlyOnVariations(null, null, null, 4d, null);
insertMeasureOnlyOnVariations(null, null, null, null, 5d);
insertMeasureOnlyOnVariations(null, 2d, 3d, 4d, 5d);
- db.commit();
underTest.execute();
@@ -108,7 +103,6 @@ public class DeleteMeasuresHavingNoValueTest {
insertMeasure(null, "text", null, null);
insertMeasure(null, null, null, null);
insertMeasure(null, null, null, null);
- db.commit();
underTest.execute();
assertThat(db.countRowsOfTable(TABLE_MEASURES)).isEqualTo(2);
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/DeleteUselessPropertiesTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/DeleteUselessPropertiesTest.java
index a0e50488e41..9893fb02797 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/DeleteUselessPropertiesTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/DeleteUselessPropertiesTest.java
@@ -29,8 +29,7 @@ import java.util.stream.Collectors;
import javax.annotation.Nullable;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
import static org.assertj.core.api.Assertions.assertThat;
@@ -42,7 +41,7 @@ public class DeleteUselessPropertiesTest {
private static final int COMPONENT_ID_2 = 604;
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, DeleteUselessPropertiesTest.class, "properties.sql");
+ public CoreDbTester db = CoreDbTester.createForSchema(DeleteUselessPropertiesTest.class, "properties.sql");
private DeleteUselessProperties underTest = new DeleteUselessProperties(db.database());
@@ -56,7 +55,6 @@ public class DeleteUselessPropertiesTest {
@Test
public void migration_removes_hours_in_day_setting() throws SQLException {
insertProperty("sonar.technicalDebt.hoursInDay", null);
- db.commit();
underTest.execute();
@@ -66,7 +64,6 @@ public class DeleteUselessPropertiesTest {
@Test
public void migration_removes_create_user_setting() throws SQLException {
insertProperty("sonar.authenticator.createUser", null);
- db.commit();
underTest.execute();
@@ -79,7 +76,6 @@ public class DeleteUselessPropertiesTest {
insertProperty("sonar.timemachine.period3", null);
insertProperty("sonar.timemachine.period4", null);
insertProperty("sonar.timemachine.period5", null);
- db.commit();
underTest.execute();
@@ -94,7 +90,6 @@ public class DeleteUselessPropertiesTest {
insertProperty("sonar.timemachine.period3", COMPONENT_ID_1);
insertProperty("sonar.timemachine.period4", COMPONENT_ID_2);
insertProperty("sonar.timemachine.period5", COMPONENT_ID_2);
- db.commit();
underTest.execute();
@@ -110,7 +105,6 @@ public class DeleteUselessPropertiesTest {
insertProperty("sonar.timemachine.period2", COMPONENT_ID_1);
insertProperty("sonar.timemachine.period3", COMPONENT_ID_2);
insertProperty("sonar.timemachine.period3.TRK", COMPONENT_ID_2);
- db.commit();
underTest.execute();
@@ -125,7 +119,6 @@ public class DeleteUselessPropertiesTest {
// Only these settings should be removed
insertProperty("sonar.timemachine.period4", null);
insertProperty("sonar.timemachine.period5", null);
- db.commit();
underTest.execute();
@@ -141,7 +134,6 @@ public class DeleteUselessPropertiesTest {
// Only these settings should be removed
insertProperty("sonar.timemachine.period4", null);
insertProperty("sonar.timemachine.period5", null);
- db.commit();
underTest.execute();
assertThat(db.countRowsOfTable(TABLE_PROPERTIES)).isEqualTo(3);
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/DropTableResourceIndexTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/DropTableResourceIndexTest.java
index 7f7ca788727..cad0b2bc8eb 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/DropTableResourceIndexTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/DropTableResourceIndexTest.java
@@ -24,7 +24,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
public class DropTableResourceIndexTest {
@@ -32,7 +32,7 @@ public class DropTableResourceIndexTest {
public ExpectedException expectedException = ExpectedException.none();
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, DropTableResourceIndexTest.class, "schema.sql");
+ public CoreDbTester db = CoreDbTester.createForSchema(DropTableResourceIndexTest.class, "schema.sql");
private DropTableResourceIndex underTest = new DropTableResourceIndex(db.database());
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/MakeColumnGuardedOfOrganizationsNotNullableTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/MakeColumnGuardedOfOrganizationsNotNullableTest.java
index 268777a7e32..ef7e016bfc7 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/MakeColumnGuardedOfOrganizationsNotNullableTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/MakeColumnGuardedOfOrganizationsNotNullableTest.java
@@ -26,13 +26,13 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
public class MakeColumnGuardedOfOrganizationsNotNullableTest {
private static final String TABLE_ORGANIZATIONS = "organizations";
@Rule
- public DbTester dbTester = DbTester.createForSchema(System2.INSTANCE, MakeColumnGuardedOfOrganizationsNotNullableTest.class, "organizations_with_nullable_guarded.sql");
+ public CoreDbTester dbTester = CoreDbTester.createForSchema(MakeColumnGuardedOfOrganizationsNotNullableTest.class, "organizations_with_nullable_guarded.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/MakeDefaultOrganizationGuardedTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/MakeDefaultOrganizationGuardedTest.java
index 5a152eaaabf..1bb0a0e7261 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/MakeDefaultOrganizationGuardedTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/MakeDefaultOrganizationGuardedTest.java
@@ -26,8 +26,7 @@ import java.sql.SQLException;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static org.assertj.core.api.Assertions.assertThat;
@@ -37,7 +36,7 @@ public class MakeDefaultOrganizationGuardedTest {
private static final String DEFAULT_ORGANIZATION_UUID = "def-org";
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, MakeDefaultOrganizationGuardedTest.class, "organizations_and_internal_properties.sql");
+ public CoreDbTester db = CoreDbTester.createForSchema(MakeDefaultOrganizationGuardedTest.class, "organizations_and_internal_properties.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/MakeOrganizationUuidOfProjectsNotNullableTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/MakeOrganizationUuidOfProjectsNotNullableTest.java
index 5a1b18d0aac..fc683c2ad0e 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/MakeOrganizationUuidOfProjectsNotNullableTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/MakeOrganizationUuidOfProjectsNotNullableTest.java
@@ -25,8 +25,7 @@ import javax.annotation.Nullable;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
@@ -34,7 +33,7 @@ public class MakeOrganizationUuidOfProjectsNotNullableTest {
private static final String TABLE_PROJECTS = "projects";
@Rule
- public DbTester dbTester = DbTester.createForSchema(System2.INSTANCE, PopulateOrganizationUuidToProjectsTest.class, "projects_with_nullable_organization.sql");
+ public CoreDbTester dbTester = CoreDbTester.createForSchema(PopulateOrganizationUuidToProjectsTest.class, "projects_with_nullable_organization.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/MakeUuidNotNullOnEventsTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/MakeUuidNotNullOnEventsTest.java
index f51a0c897a1..7d41f31005a 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/MakeUuidNotNullOnEventsTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/MakeUuidNotNullOnEventsTest.java
@@ -25,7 +25,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
@@ -34,7 +34,7 @@ public class MakeUuidNotNullOnEventsTest {
private static final String TABLE_EVENTS = "events";
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, MakeUuidNotNullOnEventsTest.class, "in_progress_events.sql");
+ public CoreDbTester db = CoreDbTester.createForSchema(MakeUuidNotNullOnEventsTest.class, "in_progress_events.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/PopulateColumnGuardedOfOrganizationsTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/PopulateColumnGuardedOfOrganizationsTest.java
index fe6aba2793a..506cb38fa66 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/PopulateColumnGuardedOfOrganizationsTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/PopulateColumnGuardedOfOrganizationsTest.java
@@ -24,14 +24,14 @@ import javax.annotation.Nullable;
import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static org.assertj.core.api.Assertions.assertThat;
public class PopulateColumnGuardedOfOrganizationsTest {
@Rule
- public DbTester dbTester = DbTester.createForSchema(System2.INSTANCE, PopulateColumnGuardedOfOrganizationsTest.class, "organizations.sql");
+ public CoreDbTester dbTester = CoreDbTester.createForSchema(PopulateColumnGuardedOfOrganizationsTest.class, "organizations.sql");
private PopulateColumnGuardedOfOrganizations underTest = new PopulateColumnGuardedOfOrganizations(dbTester.database());
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/PopulateDefaultPermTemplateColumnsOfOrganizationsTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/PopulateDefaultPermTemplateColumnsOfOrganizationsTest.java
index 6d8c56aeb70..8abdae37504 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/PopulateDefaultPermTemplateColumnsOfOrganizationsTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/PopulateDefaultPermTemplateColumnsOfOrganizationsTest.java
@@ -26,7 +26,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static org.assertj.core.api.Assertions.assertThat;
@@ -38,7 +38,7 @@ public class PopulateDefaultPermTemplateColumnsOfOrganizationsTest {
private static final String DEFAULT_ORGANIZATION_UUID = "def org uuid";
@Rule
- public DbTester dbTester = DbTester.createForSchema(System2.INSTANCE, PopulateDefaultPermTemplateColumnsOfOrganizationsTest.class, "properties_and_organizations.sql");
+ public CoreDbTester dbTester = CoreDbTester.createForSchema(PopulateDefaultPermTemplateColumnsOfOrganizationsTest.class, "properties_and_organizations.sql");
@Rule
public ExpectedException expectedException = ExpectedException.none();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/PopulateOrganizationUuidToProjectsTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/PopulateOrganizationUuidToProjectsTest.java
index 9f48e8c3017..605f418db93 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/PopulateOrganizationUuidToProjectsTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/PopulateOrganizationUuidToProjectsTest.java
@@ -23,7 +23,7 @@ import java.sql.SQLException;
import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
+import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
import static org.assertj.core.api.Assertions.assertThat;
@@ -33,7 +33,7 @@ public class PopulateOrganizationUuidToProjectsTest {
private static final String ORGANIZATION_UUID = "some uuid";
@Rule
- public DbTester dbTester = DbTester.createForSchema(System2.INSTANCE, PopulateOrganizationUuidToProjectsTest.class, "projects_with_nullable_organization.sql");
+ public CoreDbTester dbTester = CoreDbTester.createForSchema(PopulateOrganizationUuidToProjectsTest.class, "projects_with_nullable_organization.sql");
private PopulateOrganizationUuidToProjects underTest = new PopulateOrganizationUuidToProjects(dbTester.database(), new TestDefaultOrganizationUuid(ORGANIZATION_UUID));
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/PopulateUuidColumnOfEventsTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/PopulateUuidColumnOfEventsTest.java
index 17626973c70..0426035270c 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/PopulateUuidColumnOfEventsTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/PopulateUuidColumnOfEventsTest.java
@@ -27,9 +27,8 @@ import java.util.stream.Collectors;
import org.apache.commons.lang.StringUtils;
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 org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
import static org.assertj.core.api.Assertions.assertThat;
@@ -39,7 +38,7 @@ public class PopulateUuidColumnOfEventsTest {
private static final String TABLE_EVENTS = "events";
@Rule
- public DbTester db = DbTester.createForSchema(System2.INSTANCE, PopulateUuidColumnOfEventsTest.class, "in_progress_events.sql");
+ public CoreDbTester db = CoreDbTester.createForSchema(PopulateUuidColumnOfEventsTest.class, "in_progress_events.sql");
private PopulateUuidColumnOfEvents underTest = new PopulateUuidColumnOfEvents(db.database(), UuidFactoryImpl.INSTANCE);
@@ -55,7 +54,6 @@ public class PopulateUuidColumnOfEventsTest {
insertEvents(1);
insertEvents(2);
insertEvents(3);
- db.commit();
underTest.execute();
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/UnsetUserRootFlagsTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/UnsetUserRootFlagsTest.java
index 276e8515fba..cf4596b8ac0 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/UnsetUserRootFlagsTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/UnsetUserRootFlagsTest.java
@@ -20,63 +20,68 @@
package org.sonar.server.platform.db.migration.version.v63;
import java.sql.SQLException;
+import java.util.Map;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.utils.internal.TestSystem2;
-import org.sonar.db.DbTester;
-import org.sonar.db.user.UserDto;
-import org.sonar.db.user.UserTesting;
+import org.sonar.db.CoreDbTester;
+
+import static org.assertj.core.api.Assertions.assertThat;
public class UnsetUserRootFlagsTest {
private static final long CREATED_AT = 1_500L;
private static final long FIXED_AT = 1_600L;
- @Rule
- public ExpectedException expectedException = ExpectedException.none();
-
private TestSystem2 system = new TestSystem2().setNow(FIXED_AT);
@Rule
- public DbTester db = DbTester.createForSchema(system, UnsetUserRootFlagsTest.class, "in_progress_users.sql");
+ public ExpectedException expectedException = ExpectedException.none();
+ @Rule
+ public CoreDbTester db = CoreDbTester.createForSchema(UnsetUserRootFlagsTest.class, "in_progress_users.sql");
private UnsetUserRootFlags underTest = new UnsetUserRootFlags(db.database(), system);
@Test
public void sets_USERS_IS_ROOT_to_false() throws SQLException {
- UserDto root1 = db.users().makeRoot(createUser());
- UserDto user1 = createUser();
- UserDto root2 = db.users().makeRoot(createUser());
- UserDto user2 = createUser();
+ createUser("root1", true);
+ createUser("nonRoot1", false);
+ createUser("root2", true);
+ createUser("nonRoot2", false);
underTest.execute();
- verifyNotRoot(CREATED_AT, user1, user2);
- verifyNotRoot(FIXED_AT, root1, root2);
+ verifyNotRoot(CREATED_AT, "nonRoot1", "nonRoot2");
+ verifyNotRoot(FIXED_AT, "root1", "root2");
}
@Test
public void migration_is_reentrant() throws SQLException {
- UserDto root = db.users().makeRoot(createUser());
+ createUser("root", true);
underTest.execute();
- verifyNotRoot(FIXED_AT, root);
+ verifyNotRoot(FIXED_AT, "root");
system.setNow(FIXED_AT + 100L);
underTest.execute();
- verifyNotRoot(FIXED_AT, root);
+ verifyNotRoot(FIXED_AT, "root");
}
- private void verifyNotRoot(long updatedAt, UserDto... users) {
- for (UserDto user : users) {
- db.rootFlag().verify(user, false, updatedAt);
+ private void verifyNotRoot(long updatedAt, String... logins) {
+ for (String login : logins) {
+ Map<String, Object> row = db.selectFirst("select is_root as \"isRoot\", updated_at as \"updatedAt\" from users where login='" + login + "'");
+ assertThat(row.get("isRoot")).isEqualTo(false);
+ assertThat(row.get("updatedAt")).isEqualTo(updatedAt);
}
}
- private UserDto createUser() {
- return db.users().insertUser(UserTesting.newUserDto()
- .setCreatedAt(CREATED_AT)
- .setUpdatedAt(CREATED_AT));
+ private String createUser(String login, boolean isRoot) {
+ db.executeInsert("users",
+ "login", login,
+ "is_root", isRoot,
+ "created_at", CREATED_AT,
+ "updated_at", CREATED_AT);
+ return login;
}
}
diff --git a/server/sonar-db-migration/src/test/resources/org/sonar/server/platform/db/migration/charset/SelectExecutorTest/users_table.sql b/server/sonar-db-migration/src/test/resources/org/sonar/server/platform/db/migration/charset/SelectExecutorTest/users_table.sql
new file mode 100644
index 00000000000..e86b74fd8ec
--- /dev/null
+++ b/server/sonar-db-migration/src/test/resources/org/sonar/server/platform/db/migration/charset/SelectExecutorTest/users_table.sql
@@ -0,0 +1,4 @@
+CREATE TABLE "USERS" (
+ "LOGIN" VARCHAR(255),
+ "NAME" VARCHAR(200)
+);
diff --git a/server/sonar-db-migration/src/test/resources/org/sonar/server/platform/db/migration/charset/SqlExecutorTest/users_table.sql b/server/sonar-db-migration/src/test/resources/org/sonar/server/platform/db/migration/charset/SqlExecutorTest/users_table.sql
new file mode 100644
index 00000000000..1920431bc40
--- /dev/null
+++ b/server/sonar-db-migration/src/test/resources/org/sonar/server/platform/db/migration/charset/SqlExecutorTest/users_table.sql
@@ -0,0 +1,5 @@
+CREATE TABLE "USERS" (
+ "LOGIN" VARCHAR(255),
+ "NAME" VARCHAR(200),
+ "IS_ROOT" BOOLEAN
+);
diff --git a/server/sonar-db-migration/src/test/resources/org/sonar/server/platform/db/migration/history/MigrationHistoryImplTest/schema_migration.sql b/server/sonar-db-migration/src/test/resources/org/sonar/server/platform/db/migration/history/MigrationHistoryImplTest/schema_migration.sql
new file mode 100644
index 00000000000..aad2a0750a7
--- /dev/null
+++ b/server/sonar-db-migration/src/test/resources/org/sonar/server/platform/db/migration/history/MigrationHistoryImplTest/schema_migration.sql
@@ -0,0 +1,4 @@
+CREATE TABLE "SCHEMA_MIGRATIONS" (
+ "VERSION" VARCHAR(256) NOT NULL
+);
+CREATE INDEX "UNIQUE_SCHEMA_MIGRATIONS" ON "SCHEMA_MIGRATIONS" ("VERSION");
diff --git a/server/sonar-db-testing/pom.xml b/server/sonar-db-testing/pom.xml
new file mode 100644
index 00000000000..77fa3b09e3d
--- /dev/null
+++ b/server/sonar-db-testing/pom.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.sonarsource.sonarqube</groupId>
+ <artifactId>server</artifactId>
+ <version>6.4-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>sonar-db-testing</artifactId>
+ <packaging>pom</packaging>
+
+ <name>SonarQube :: DB testing</name>
+ <description>DB testing for SonarQube</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>sonar-testing-harness</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>sonar-db-core</artifactId>
+ <version>${project.version}</version>
+ <type>test-jar</type>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>sonar-db-dao</artifactId>
+ <version>${project.version}</version>
+ <type>test-jar</type>
+ </dependency>
+ <dependency>
+ <groupId>org.dbunit</groupId>
+ <artifactId>dbunit</artifactId>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ </build>
+
+ <profiles>
+ </profiles>
+</project>
diff --git a/server/sonar-server/pom.xml b/server/sonar-server/pom.xml
index ce99f0d7e93..69f66f0a1c7 100644
--- a/server/sonar-server/pom.xml
+++ b/server/sonar-server/pom.xml
@@ -61,7 +61,7 @@
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
- <artifactId>sonar-db</artifactId>
+ <artifactId>sonar-db-dao</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
@@ -188,19 +188,8 @@
<!-- unit tests -->
<dependency>
<groupId>${project.groupId}</groupId>
- <artifactId>sonar-db</artifactId>
- <version>${project.version}</version>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-testing-harness</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.dbunit</groupId>
- <artifactId>dbunit</artifactId>
+ <artifactId>sonar-db-testing</artifactId>
+ <type>pom</type>
<scope>test</scope>
</dependency>
<dependency>
diff --git a/server/sonar-server/src/main/java/org/sonar/server/component/ws/ProjectMeasuresQueryFactory.java b/server/sonar-server/src/main/java/org/sonar/server/component/ws/ProjectMeasuresQueryFactory.java
index 0be862b3473..5431c1148c9 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/component/ws/ProjectMeasuresQueryFactory.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/component/ws/ProjectMeasuresQueryFactory.java
@@ -31,12 +31,12 @@ import javax.annotation.Nullable;
import org.sonar.api.measures.Metric.Level;
import org.sonar.core.util.stream.Collectors;
import org.sonar.server.measure.index.ProjectMeasuresQuery;
-import org.sonar.server.measure.index.ProjectMeasuresQuery.MetricCriterion;
-import org.sonar.server.measure.index.ProjectMeasuresQuery.Operator;
import static com.google.common.base.Preconditions.checkArgument;
import static java.util.Locale.ENGLISH;
import static org.sonar.api.measures.CoreMetrics.ALERT_STATUS_KEY;
+import static org.sonar.server.measure.index.ProjectMeasuresQuery.MetricCriterion;
+import static org.sonar.server.measure.index.ProjectMeasuresQuery.Operator;
class ProjectMeasuresQueryFactory {
private static final Splitter CRITERIA_SPLITTER = Splitter.on(Pattern.compile("and", Pattern.CASE_INSENSITIVE));
diff --git a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/AutoDbMigration.java b/server/sonar-server/src/main/java/org/sonar/server/platform/db/migration/AutoDbMigration.java
index 40f297bfeea..40f297bfeea 100644
--- a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/AutoDbMigration.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/platform/db/migration/AutoDbMigration.java
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/AutoDbMigrationTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/db/migration/AutoDbMigrationTest.java
index b8e24b0cf32..b8e24b0cf32 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/AutoDbMigrationTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/platform/db/migration/AutoDbMigrationTest.java