Author: tolusha
Date: 2011-07-12 11:16:01 -0400 (Tue, 12 Jul 2011)
New Revision: 4619
Modified:
jcr/trunk/exo.jcr.component.ext/src/test/java/org/exoplatform/services/jcr/ext/backup/AbstractBackupUseCasesTest.java
Log:
EXOJCR-1435: fix tests
Modified:
jcr/trunk/exo.jcr.component.ext/src/test/java/org/exoplatform/services/jcr/ext/backup/AbstractBackupUseCasesTest.java
===================================================================
---
jcr/trunk/exo.jcr.component.ext/src/test/java/org/exoplatform/services/jcr/ext/backup/AbstractBackupUseCasesTest.java 2011-07-12
14:49:45 UTC (rev 4618)
+++
jcr/trunk/exo.jcr.component.ext/src/test/java/org/exoplatform/services/jcr/ext/backup/AbstractBackupUseCasesTest.java 2011-07-12
15:16:01 UTC (rev 4619)
@@ -1222,9 +1222,7 @@
String backupDitEnv = backDir.getCanonicalPath();
String newBackupDir =
- "\\${java.io.tmpdir}"
- + bch.getBackupConfig().getBackupDir().getCanonicalPath()
- .replace(backupDitEnv, "");
+ "\\${java.io.tmpdir}" +
bch.getBackupConfig().getBackupDir().getCanonicalPath().replace(backupDitEnv,
"");
File dest = new File(repositoryBackupChainLogPath + ".xml");
dest.createNewFile();
@@ -1235,7 +1233,8 @@
String sConfig =
setNewBackupDirInRepositoryBackupChainLog(new
File(repositoryBackupChainLogPath), dest, newBackupDir);
- assertTrue(sConfig.contains(newBackupDir.subSequence(1,
newBackupDir.length())));
+ assertTrue(sConfig.contains("${java.io.tmpdir}"
+ +
bch.getBackupConfig().getBackupDir().getCanonicalPath().replace(backupDitEnv,
"")));
// check
newRepositoryBackupChainLog = new RepositoryBackupChainLog(dest);
@@ -1277,7 +1276,7 @@
String relativePrefixBackupDir = backDir.getCanonicalFile().getParent() +
File.separator;
String newBackupDir =
-
bch.getBackupConfig().getBackupDir().getCanonicalPath().replaceAll(relativePrefixBackupDir,
"");
+
bch.getBackupConfig().getBackupDir().getCanonicalPath().replace(relativePrefixBackupDir,
"");
File dest = new File(repositoryBackupChainLogPath + ".xml");
dest.createNewFile();
Show replies by date