summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Fick <mfick@codeaurora.org>2011-08-24 10:18:11 -0700
committerAndroid Code Review <code-review@android.com>2011-08-24 10:18:11 -0700
commitbb533b542503cf11ea3efb218f96a49ce9c31fc4 (patch)
treefba5e0381f567449dea6da7702902fc3177a2759
parent6109b28c41d6830a65a71be05792cc624948d69c (diff)
parent0e44707bde1730c8f3c0f1049a1683bce52fb610 (diff)
Merge "Fix case-issue with path name on Windows"
-rw-r--r--gerrit-server/src/test/java/com/google/gerrit/server/schema/SchemaCreatorTest.java6
-rw-r--r--gerrit-server/src/test/java/com/google/gerrit/server/schema/SchemaUpdaterTest.java6
2 files changed, 8 insertions, 4 deletions
diff --git a/gerrit-server/src/test/java/com/google/gerrit/server/schema/SchemaCreatorTest.java b/gerrit-server/src/test/java/com/google/gerrit/server/schema/SchemaCreatorTest.java
index 50b87dae38..d31bd3cfa1 100644
--- a/gerrit-server/src/test/java/com/google/gerrit/server/schema/SchemaCreatorTest.java
+++ b/gerrit-server/src/test/java/com/google/gerrit/server/schema/SchemaCreatorTest.java
@@ -24,6 +24,7 @@ import com.google.gwtorm.jdbc.JdbcSchema;
import junit.framework.TestCase;
import java.io.File;
+import java.io.IOException;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.HashSet;
@@ -44,7 +45,8 @@ public class SchemaCreatorTest extends TestCase {
super.tearDown();
}
- public void testGetCauses_CreateSchema() throws OrmException, SQLException {
+ public void testGetCauses_CreateSchema() throws OrmException, SQLException,
+ IOException {
// Initially the schema should be empty.
//
{
@@ -74,7 +76,7 @@ public class SchemaCreatorTest extends TestCase {
if (sitePath.getName().equals(".")) {
sitePath = sitePath.getParentFile();
}
- assertEquals(sitePath.getAbsolutePath(), db.getSystemConfig().sitePath);
+ assertEquals(sitePath.getCanonicalPath(), db.getSystemConfig().sitePath);
}
public void testCreateSchema_ApprovalCategory_CodeReview()
diff --git a/gerrit-server/src/test/java/com/google/gerrit/server/schema/SchemaUpdaterTest.java b/gerrit-server/src/test/java/com/google/gerrit/server/schema/SchemaUpdaterTest.java
index dfdf1f43a6..7d696728f2 100644
--- a/gerrit-server/src/test/java/com/google/gerrit/server/schema/SchemaUpdaterTest.java
+++ b/gerrit-server/src/test/java/com/google/gerrit/server/schema/SchemaUpdaterTest.java
@@ -38,6 +38,7 @@ import org.eclipse.jgit.lib.PersonIdent;
import java.io.File;
import java.io.FileNotFoundException;
+import java.io.IOException;
import java.util.List;
import java.util.UUID;
@@ -56,7 +57,8 @@ public class SchemaUpdaterTest extends TestCase {
super.tearDown();
}
- public void testUpdate() throws OrmException, FileNotFoundException {
+ public void testUpdate() throws OrmException, FileNotFoundException,
+ IOException {
db.create();
final File site = new File(UUID.randomUUID().toString());
@@ -110,6 +112,6 @@ public class SchemaUpdaterTest extends TestCase {
db.assertSchemaVersion();
final SystemConfig sc = db.getSystemConfig();
- assertEquals(paths.site_path.getAbsolutePath(), sc.sitePath);
+ assertEquals(paths.site_path.getCanonicalPath(), sc.sitePath);
}
}