diff options
author | Daniel Schwarz <daniel.schwarz@sonarsource.com> | 2017-07-28 15:32:29 +0200 |
---|---|---|
committer | Daniel Schwarz <bartfastiel@users.noreply.github.com> | 2017-08-09 15:09:54 +0200 |
commit | f32d27df1c833bdb2e8153020b6613cb37ba38fa (patch) | |
tree | b86d4e77b105509e40f5fdb24fdbe4e10306b075 /server/sonar-db-core | |
parent | 4a0af974b74e68159b9304752b5832487bf58cf8 (diff) | |
download | sonarqube-f32d27df1c833bdb2e8153020b6613cb37ba38fa.tar.gz sonarqube-f32d27df1c833bdb2e8153020b6613cb37ba38fa.zip |
SONAR-8798 convert medium tests to unit tests
Diffstat (limited to 'server/sonar-db-core')
-rw-r--r-- | server/sonar-db-core/src/test/java/org/sonar/db/CoreTestDb.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/server/sonar-db-core/src/test/java/org/sonar/db/CoreTestDb.java b/server/sonar-db-core/src/test/java/org/sonar/db/CoreTestDb.java index 30752123607..8476c8ef8c9 100644 --- a/server/sonar-db-core/src/test/java/org/sonar/db/CoreTestDb.java +++ b/server/sonar-db-core/src/test/java/org/sonar/db/CoreTestDb.java @@ -91,7 +91,6 @@ class CoreTestDb { ((H2Database) db).executeScript(schemaPath); } else { db.stop(); - } } isDefault = (schemaPath == null); @@ -153,6 +152,7 @@ class CoreTestDb { InputStream input = null; try { URI uri = new URI(url); + if (url.startsWith("file:")) { File file = new File(uri); input = FileUtils.openInputStream(file); @@ -164,8 +164,8 @@ class CoreTestDb { } input = connection.getInputStream(); - } + Properties props = new Properties(); props.load(input); settings.addProperties(props); @@ -179,6 +179,4 @@ class CoreTestDb { IOUtils.closeQuietly(input); } } - - } |