Author: bcarothers
Date: 2009-07-12 20:31:57 -0400 (Sun, 12 Jul 2009)
New Revision: 1094
Added:
trunk/dna-integration-tests/src/test/java/org/jboss/dna/test/integration/InfinispanRepositoryTckTest.java
trunk/dna-integration-tests/src/test/resources/tck/infinispan/
trunk/dna-integration-tests/src/test/resources/tck/infinispan/configRepository.xml
trunk/dna-integration-tests/src/test/resources/tck/infinispan/repositoryOverlay.properties
Log:
DNA-487 Add integration test that uses the Infinispan connector
Committed new test classes that use the new TCK architecture to run the JR and DNA TCK
tests against a repository that uses the Infinispan connector.
Added:
trunk/dna-integration-tests/src/test/java/org/jboss/dna/test/integration/InfinispanRepositoryTckTest.java
===================================================================
---
trunk/dna-integration-tests/src/test/java/org/jboss/dna/test/integration/InfinispanRepositoryTckTest.java
(rev 0)
+++
trunk/dna-integration-tests/src/test/java/org/jboss/dna/test/integration/InfinispanRepositoryTckTest.java 2009-07-13
00:31:57 UTC (rev 1094)
@@ -0,0 +1,44 @@
+/*
+ * JBoss DNA (
http://www.jboss.org/dna)
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ * See the AUTHORS.txt file in the distribution for a full listing of
+ * individual contributors.
+ *
+ * JBoss DNA is free software. Unless otherwise indicated, all code in JBoss DNA
+ * is licensed to you under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * JBoss DNA is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.dna.test.integration;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.jboss.dna.jcr.DnaRepositoryStub;
+import org.jboss.dna.jcr.DnaTckTest;
+import org.jboss.dna.jcr.JcrTckTest;
+
+public class InfinispanRepositoryTckTest extends JcrTckTest {
+
+ private static final String NAME = "infinispan";
+
+ public static Test suite() {
+ DnaRepositoryStub.setCurrentConfigurationName(NAME);
+ TestSuite suite = new TestSuite("TCK Tests for " + NAME);
+ suite.addTest(JcrTckTest.suite());
+ suite.addTestSuite(DnaTckTest.class);
+
+ return suite;
+ }
+}
Property changes on:
trunk/dna-integration-tests/src/test/java/org/jboss/dna/test/integration/InfinispanRepositoryTckTest.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/dna-integration-tests/src/test/resources/tck/infinispan/configRepository.xml
===================================================================
--- trunk/dna-integration-tests/src/test/resources/tck/infinispan/configRepository.xml
(rev 0)
+++
trunk/dna-integration-tests/src/test/resources/tck/infinispan/configRepository.xml 2009-07-13
00:31:57 UTC (rev 1094)
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ JBoss DNA (
http://www.jboss.org/dna)
+ ~
+ ~ See the COPYRIGHT.txt file distributed with this work for information
+ ~ regarding copyright ownership. Some portions may be licensed
+ ~ to Red Hat, Inc. under one or more contributor license agreements.
+ ~ See the AUTHORS.txt file in the distribution for a full listing of
+ ~ individual contributors.
+ ~
+ ~ JBoss DNA is free software. Unless otherwise indicated, all code in JBoss DNA
+ ~ is licensed to you under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ JBoss DNA is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ ~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ ~ for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public License
+ ~ along with this distribution; if not, write to:
+ ~ Free Software Foundation, Inc.
+ ~ 51 Franklin Street, Fifth Floor
+ ~ Boston, MA 02110-1301 USA
+ -->
+<configuration
xmlns:dna="http://www.jboss.org/dna/1.0"
xmlns:jcr="http://www.jcp.org/jcr/1.0">
+ <!--
+ Define the sources for the content. These sources are directly accessible using the
DNA-specific Graph API.
+ In fact, this is how the DNA JCR implementation works. You can think of these as
being similar to
+ JDBC DataSource objects, except that they expose graph content via the Graph API
instead of records via SQL or JDBC.
+ -->
+ <dna:sources jcr:primaryType="nt:unstructured">
+ <!--
+ The 'JCR' repository is an Infinispan source with a single default
workspace (though others could be created, too).
+ -->
+ <dna:source jcr:name="Store"
dna:classname="org.jboss.dna.connector.infinispan.InfinispanSource"
dna:retryLimit="3" dna:defaultWorkspaceName="default"/>
+ </dna:sources>
+ <!--
+ Define the mime type detectors. This is an optional section. By default, each engine
will use the
+ MIME type detector that uses filename extensions. So we wouldn't need to define
the same detector again,
+ but this is how you'd define another extension.
+ -->
+ <dna:mimeTypeDetectors>
+ <dna:mimeTypeDetector jcr:name="Detector">
+ <dna:description>Standard extension-based MIME type
detector</dna:description>
+ <!--
+ Specify the implementation class (required), as a child element or attribute
on parent element.
+ -->
+
<dna:classname>org.jboss.dna.graph.mimetype.ExtensionBasedMimeTypeDetector</dna:classname>
+ <!--
+ Specify the classpath (optional) as an ordered list of 'names', where
each name is significant to
+ the classpath factory. For example, a name could be an OSGI identifier or a
Maven coordinate,
+ depending upon the classpath factory being used. If there is only one
'name' in the classpath,
+ it may be specified as an attribute on the 'mimeTypeDetector'
element. If there is more than one
+ 'name', then they must be specified as child 'classpath'
elements. Blank or empty values are ignored.
+ -->
+ <dna:classpath></dna:classpath>
+ </dna:mimeTypeDetector>
+ </dna:mimeTypeDetectors>
+ <!--
+ Define the JCR repositories
+ -->
+ <dna:repositories>
+ <!--
+ Define a JCR repository that accesses the 'JCR' source directly.
+ This of course is optional, since we could access the same content through
'JCR'.
+ -->
+ <dna:repository jcr:name="Test Repository Source">
+ <!-- Specify the source that should be used for the repository -->
+ <dna:source>Store</dna:source>
+ <!-- Define the options for the JCR repository, using camelcase version of
JcrRepository.Option names
+-->
+ <dna:options jcr:primaryType="dna:options">
+ <jaasLoginConfigName jcr:primaryType="dna:option"
dna:value="dna-jcr"/>
+ <projectNodeTypes jcr:primaryType="dna:option"
dna:value="false"/>
+ </dna:options>
+ <!-- Define any namespaces for this repository, other than those already
defined by JCR or DNA
+-->
+ <namespaces jcr:primaryType="dna:namespaces">
+ <dnatest jcr:primaryType="dna:namespace"
dna:uri="http://jboss.org/dna/test/1.0"/>
+ </namespaces>
+ </dna:repository>
+ </dna:repositories>
+</configuration>
Property changes on:
trunk/dna-integration-tests/src/test/resources/tck/infinispan/configRepository.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Added:
trunk/dna-integration-tests/src/test/resources/tck/infinispan/repositoryOverlay.properties
===================================================================
---
trunk/dna-integration-tests/src/test/resources/tck/infinispan/repositoryOverlay.properties
(rev 0)
+++
trunk/dna-integration-tests/src/test/resources/tck/infinispan/repositoryOverlay.properties 2009-07-13
00:31:57 UTC (rev 1094)
@@ -0,0 +1 @@
+# Placeholder for any overlaid properties for this repo configuration