Author: bcarothers
Date: 2010-01-06 20:13:22 -0500 (Wed, 06 Jan 2010)
New Revision: 1541
Modified:
trunk/dna-integration-tests/src/test/java/org/jboss/dna/test/integration/svn/SvnAndJcrIntegrationTest.java
Log:
DNA-618 SVN connector integration tests are failing with '404 Not Found'
Applied patch that shrinks the size of the repo, making it run dramatically more quickly
from sites outside of the
jboss.org network. Prior to the search code, there was no
particular penalty for having a huge repo as long as you didn't try to read every
node. But the search code has to read the whole repo to build the search index. In this
case, that required reading several thousand files, each requiring two network calls (one
for the file and one for its contents).
Modified:
trunk/dna-integration-tests/src/test/java/org/jboss/dna/test/integration/svn/SvnAndJcrIntegrationTest.java
===================================================================
---
trunk/dna-integration-tests/src/test/java/org/jboss/dna/test/integration/svn/SvnAndJcrIntegrationTest.java 2010-01-07
00:14:25 UTC (rev 1540)
+++
trunk/dna-integration-tests/src/test/java/org/jboss/dna/test/integration/svn/SvnAndJcrIntegrationTest.java 2010-01-07
01:13:22 UTC (rev 1541)
@@ -51,7 +51,7 @@
@Before
public void beforeEach() throws Exception {
final String repositoryUrl = "http://anonsvn.jboss.org/repos/dna/";
- final String[] predefinedWorkspaceNames = {"trunk", "tags",
"branches"};
+ final String[] predefinedWorkspaceNames =
{"trunk/dna-common/src/main/java/org/jboss/dna/common/xml",};
final String svnRepositorySource = "svnRepositorySource";
final String repositoryName = "svnRepository";
final JcrConfiguration configuration = new JcrConfiguration();
@@ -61,11 +61,10 @@
.setProperty("username", "anonymous")
.setProperty("repositoryRootUrl", repositoryUrl)
.setProperty("predefinedWorkspaceNames",
predefinedWorkspaceNames)
-.setProperty("defaultWorkspaceName",
-
predefinedWorkspaceNames[0])
+ .setProperty("defaultWorkspaceName",
predefinedWorkspaceNames[0])
.setProperty("creatingWorkspacesAllowed", false);
-
configuration.repository(repositoryName).setSource(svnRepositorySource).setOption(Option.QUERY_EXECUTION_ENABLED,
"false");
+
configuration.repository(repositoryName).setSource(svnRepositorySource).setOption(Option.QUERY_EXECUTION_ENABLED,
"true");
configuration.save();
this.engine = configuration.build();
@@ -94,13 +93,13 @@
while (nodeIterator.hasNext()) {
System.out.println(nodeIterator.nextNode());
}
- assertThat(this.session.getRootNode().getNode("dna-graph"),
is(notNullValue()));
+ assertThat(this.session.getRootNode().getNode("XmlCharacters.java"),
is(notNullValue()));
}
@Test
public void shouldProvideAccessToJcrDataNodeUnderFileNode() throws Exception {
- System.out.println("Getting /pom.xml/jcr:content and then walking its
properties ...");
- Node resourceNodeOfPomFile =
this.session.getRootNode().getNode("pom.xml/jcr:content");
+ System.out.println("Getting /package-info.java/jcr:content and then walking
its properties ...");
+ Node resourceNodeOfPomFile =
this.session.getRootNode().getNode("package-info.java/jcr:content");
assertThat(resourceNodeOfPomFile, is(notNullValue()));
for (PropertyIterator iter = resourceNodeOfPomFile.getProperties();
iter.hasNext();) {
@@ -109,19 +108,6 @@
}
}
- @Test
- public void shouldProvideAccessToJcrDataNodeUnderDeepFileNode() throws Exception {
- String path =
"extensions/dna-sequencer-text/src/test/resources/delimited/multiLineCommaDelimitedFile.csv/jcr:content";
- System.out.println("Getting " + path + " and then walking its
properties ...");
- Node resourceNodeOfPomFile = this.session.getRootNode().getNode(path);
- assertThat(resourceNodeOfPomFile, is(notNullValue()));
-
- for (PropertyIterator iter = resourceNodeOfPomFile.getProperties();
iter.hasNext();) {
- Property property = iter.nextProperty();
- assertThat(property.getName(), is(notNullValue()));
- }
- }
-
protected class MyCustomSecurityContext implements SecurityContext {
/**
* {@inheritDoc}