Skip to content

Commit

Permalink
test/performance: Prevent the big file performance tests from running…
Browse files Browse the repository at this point in the history
… on Jackrabbit 1.[4-6] where we have a massive performance problem with the default configuration

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1163543 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
jukka committed Aug 31, 2011
1 parent 405dde0 commit f35e915
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
Expand Up @@ -133,6 +133,19 @@ protected void afterTest() throws Exception {
protected void afterSuite() throws Exception {
}

protected void failOnRepositoryVersions(String... versions)
throws RepositoryException {
String repositoryVersion =
repository.getDescriptor(Repository.REP_VERSION_DESC);
for (String version : versions) {
if (repositoryVersion.startsWith(version)) {
throw new RepositoryException(
"Unable to run " + getClass().getName()
+ " on repository version " + version);
}
}
}

protected Repository getRepository() {
return repository;
}
Expand Down
Expand Up @@ -39,7 +39,9 @@ public class BigFileReadTest extends AbstractTest {
private int i = 0;

public void beforeSuite() throws RepositoryException {
session = getRepository().login(getCredentials());
failOnRepositoryVersions("1.4", "1.5", "1.6");

session = loginWriter();

root = session.getRootNode().addNode(
"BigFileReadTest", "nt:folder");
Expand Down Expand Up @@ -68,7 +70,6 @@ public void runTest() throws Exception {
public void afterSuite() throws RepositoryException {
root.remove();
session.save();
session.logout();
}

}
Expand Up @@ -31,6 +31,8 @@ public class BigFileWriteTest extends AbstractTest {
private Node file;

public void beforeSuite() throws RepositoryException {
failOnRepositoryVersions("1.4", "1.5", "1.6");

session = loginWriter();
}

Expand Down

0 comments on commit f35e915

Please sign in to comment.