Author: tolusha
Date: 2012-02-28 11:31:10 -0500 (Tue, 28 Feb 2012)
New Revision: 5703
Modified:
jcr/branches/1.15.x/exo.jcr.component.core/pom.xml
jcr/branches/1.15.x/exo.jcr.component.ext/src/test/java/org/exoplatform/services/jcr/ext/backup/server/HTTPBackupAgentTest.java
Log:
EXOJCR-1769: fix pom and tests
Modified: jcr/branches/1.15.x/exo.jcr.component.core/pom.xml
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/pom.xml 2012-02-28 13:54:06 UTC (rev 5702)
+++ jcr/branches/1.15.x/exo.jcr.component.core/pom.xml 2012-02-28 16:31:10 UTC (rev 5703)
@@ -413,6 +413,40 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>add-test-resource</id>
+ <phase>generate-test-sources</phase>
+ <goals>
+ <goal>add-test-resource</goal>
+ </goals>
+ <configuration>
+ <resources>
+ <resource>
+
<directory>${project.build.directory}/jackrabbit-jcr-tests</directory>
+ <excludes>
+ </excludes>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ <execution>
+ <id>add-test-source</id>
+ <phase>generate-test-sources</phase>
+ <goals>
+ <goal>add-test-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+
<source>${project.build.directory}/jackrabbit-jcr-tests</source>
+ </sources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
Modified:
jcr/branches/1.15.x/exo.jcr.component.ext/src/test/java/org/exoplatform/services/jcr/ext/backup/server/HTTPBackupAgentTest.java
===================================================================
---
jcr/branches/1.15.x/exo.jcr.component.ext/src/test/java/org/exoplatform/services/jcr/ext/backup/server/HTTPBackupAgentTest.java 2012-02-28
13:54:06 UTC (rev 5702)
+++
jcr/branches/1.15.x/exo.jcr.component.ext/src/test/java/org/exoplatform/services/jcr/ext/backup/server/HTTPBackupAgentTest.java 2012-02-28
16:31:10 UTC (rev 5703)
@@ -680,13 +680,17 @@
ShortInfoList infoList = (ShortInfoList) getObject(ShortInfoList.class,
responseWriter.getBody());
List<ShortInfo> list = new
ArrayList<ShortInfo>(infoList.getBackups());
- assertEquals(1, list.size());
+ ShortInfo info = null;
+ for (ShortInfo inf : list)
+ {
+ if (inf.getRepositoryName().equals("db6") &&
inf.getWorkspaceName().equals("ws2"))
+ {
+ info = inf;
+ break;
+ }
+ }
+ assertNotNull(info);
- ShortInfo info = list.get(0);
-
- assertEquals(info.getRepositoryName(), "db6");
- assertEquals(info.getWorkspaceName(), "ws2");
-
id = info.getBackupId();
}
@@ -821,13 +825,17 @@
ShortInfoList infoList = (ShortInfoList) getObject(ShortInfoList.class,
responseWriter.getBody());
List<ShortInfo> list = new
ArrayList<ShortInfo>(infoList.getBackups());
- assertEquals(1, list.size());
+ ShortInfo info = null;
+ for (ShortInfo inf : list)
+ {
+ if (inf.getRepositoryName().equals("db6") &&
inf.getWorkspaceName().equals("ws2"))
+ {
+ info = inf;
+ break;
+ }
+ }
+ assertNotNull(info);
- ShortInfo info = list.get(0);
-
- assertEquals(info.getRepositoryName(), "db6");
- assertEquals(info.getWorkspaceName(), "ws2");
-
id = info.getBackupId();
}
@@ -1087,13 +1095,17 @@
ShortInfoList infoList = (ShortInfoList) getObject(ShortInfoList.class,
responseWriter.getBody());
List<ShortInfo> list = new
ArrayList<ShortInfo>(infoList.getBackups());
- assertEquals(1, list.size());
+ ShortInfo info = null;
+ for (ShortInfo inf : list)
+ {
+ if (inf.getRepositoryName().equals("db6") &&
inf.getWorkspaceName().equals("ws2"))
+ {
+ info = inf;
+ break;
+ }
+ }
+ assertNotNull(info);
- ShortInfo info = list.get(0);
-
- assertEquals(info.getRepositoryName(), "db6");
- assertEquals(info.getWorkspaceName(), "ws2");
-
id = info.getBackupId();
}
@@ -1206,13 +1218,17 @@
ShortInfoList infoList = (ShortInfoList) getObject(ShortInfoList.class,
responseWriter.getBody());
List<ShortInfo> list = new
ArrayList<ShortInfo>(infoList.getBackups());
- assertEquals(1, list.size());
+ ShortInfo info = null;
+ for (ShortInfo inf : list)
+ {
+ if (inf.getRepositoryName().equals("db6") &&
inf.getWorkspaceName().equals("ws2"))
+ {
+ info = inf;
+ break;
+ }
+ }
+ assertNotNull(info);
- ShortInfo info = list.get(0);
-
- assertEquals(info.getRepositoryName(), "db6");
- assertEquals(info.getWorkspaceName(), "ws2");
-
id = info.getBackupId();
}
@@ -1298,13 +1314,17 @@
ShortInfoList infoList = (ShortInfoList) getObject(ShortInfoList.class,
responseWriter.getBody());
List<ShortInfo> list = new
ArrayList<ShortInfo>(infoList.getBackups());
- assertEquals(1, list.size());
+ ShortInfo info = null;
+ for (ShortInfo inf : list)
+ {
+ if (inf.getRepositoryName().equals("db6") &&
inf.getWorkspaceName().equals("ws2"))
+ {
+ info = inf;
+ break;
+ }
+ }
+ assertNotNull(info);
- ShortInfo info = list.get(0);
-
- assertEquals(info.getRepositoryName(), "db6");
- assertEquals(info.getWorkspaceName(), "ws2");
-
id = info.getBackupId();
}
@@ -1393,13 +1413,17 @@
ShortInfoList infoList = (ShortInfoList) getObject(ShortInfoList.class,
responseWriter.getBody());
List<ShortInfo> list = new
ArrayList<ShortInfo>(infoList.getBackups());
- assertEquals(1, list.size());
+ ShortInfo info = null;
+ for (ShortInfo inf : list)
+ {
+ if (inf.getRepositoryName().equals("db6") &&
inf.getWorkspaceName().equals("ws2"))
+ {
+ info = inf;
+ break;
+ }
+ }
+ assertNotNull(info);
- ShortInfo info = list.get(0);
-
- assertEquals(info.getRepositoryName(), "db6");
- assertEquals(info.getWorkspaceName(), "ws2");
-
id = info.getBackupId();
for (BackupChainLog bcl : backup.getBackupsLogs())
@@ -1521,13 +1545,17 @@
ShortInfoList infoList = (ShortInfoList) getObject(ShortInfoList.class,
responseWriter.getBody());
List<ShortInfo> list = new
ArrayList<ShortInfo>(infoList.getBackups());
- assertEquals(1, list.size());
+ ShortInfo info = null;
+ for (ShortInfo inf : list)
+ {
+ if (inf.getRepositoryName().equals("db6") &&
inf.getWorkspaceName().equals("ws2"))
+ {
+ info = inf;
+ break;
+ }
+ }
+ assertNotNull(info);
- ShortInfo info = list.get(0);
-
- assertEquals(info.getRepositoryName(), "db6");
- assertEquals(info.getWorkspaceName(), "ws2");
-
id = info.getBackupId();
for (BackupChainLog bcl : backup.getBackupsLogs())
@@ -1623,13 +1651,17 @@
ShortInfoList infoList = (ShortInfoList) getObject(ShortInfoList.class,
responseWriter.getBody());
List<ShortInfo> list = new
ArrayList<ShortInfo>(infoList.getBackups());
- assertEquals(1, list.size());
+ ShortInfo info = null;
+ for (ShortInfo inf : list)
+ {
+ if (inf.getRepositoryName().equals("db6") &&
inf.getWorkspaceName().equals("ws2"))
+ {
+ info = inf;
+ break;
+ }
+ }
+ assertNotNull(info);
- ShortInfo info = list.get(0);
-
- assertEquals(info.getRepositoryName(), "db6");
- assertEquals(info.getWorkspaceName(), "ws2");
-
id = info.getBackupId();
for (BackupChainLog bcl : backup.getBackupsLogs())
@@ -1726,13 +1758,17 @@
ShortInfoList infoList = (ShortInfoList) getObject(ShortInfoList.class,
responseWriter.getBody());
List<ShortInfo> list = new
ArrayList<ShortInfo>(infoList.getBackups());
- assertEquals(1, list.size());
+ ShortInfo info = null;
+ for (ShortInfo inf : list)
+ {
+ if (inf.getRepositoryName().equals("db6") &&
inf.getWorkspaceName().equals("ws2"))
+ {
+ info = inf;
+ break;
+ }
+ }
+ assertNotNull(info);
- ShortInfo info = list.get(0);
-
- assertEquals(info.getRepositoryName(), "db6");
- assertEquals(info.getWorkspaceName(), "ws2");
-
id = info.getBackupId();
for (BackupChainLog bcl : backup.getBackupsLogs())