jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r156148 - in incubator/jackrabbit/trunk/contrib/tck-webapp/src: java/org/apache/jackrabbit/tck/ java/org/apache/jackrabbit/tck/j2ee/ webapp/ webapp/WEB-INF/ webapp/WEB-INF/classes/ webapp/WEB-INF/content-repository/ webapp/docroot/imgs/ webapp/docroot/ui/
Date Fri, 04 Mar 2005 10:01:36 GMT
Author: mreutegg
Date: Fri Mar  4 02:01:30 2005
New Revision: 156148

URL: http://svn.apache.org/viewcvs?view=rev&rev=156148
Log:
Patch provided by Philipp Koch to synchronize with recent jackrabbit changes.

Modified:
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/TckTestRunner.java
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/Tester.java
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/WebAppTestConfig.java
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/j2ee/RepositoryServlet.java
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/classes/repositoryStubImpl.properties
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/content-repository/repository.xml
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/web.xml
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/config.jsp
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/imgs/banner_left.jpg
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/imgs/banner_right.jpg
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/ui/default.css
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/graph.jsp
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/index.jsp

Modified: incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/TckTestRunner.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/TckTestRunner.java?view=diff&r1=156147&r2=156148
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/TckTestRunner.java (original)
+++ incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/TckTestRunner.java Fri Mar  4 02:01:30 2005
@@ -58,6 +58,12 @@
     /** String containing defined interaction output */
     private String interactionString;
 
+    /** current testclass */
+    private String currentTestClass;
+
+    /** new test identifier string */
+    private String newTestString;
+
     /**
      * The constructor inits the result map and sets the writer
      *
@@ -66,6 +72,7 @@
     public TckTestRunner(JspWriter writer) {
         this.writer = writer;
         results = new HashMap();
+        currentTestClass = "";
     }
 
     /**
@@ -88,7 +95,7 @@
      */
     protected void runFailed(String message) {
         String msg = "RUN FAILED:" + message;
-        write(msg);
+        write(msg, false);
     }
 
     /**
@@ -103,7 +110,12 @@
         result.setTestTime(testTime);
         result.setStatus(state);
         results.put(test.toString(), result);
-        write(test.toString());
+        if (!currentTestClass.equals(test.getClass().getName())) {
+            currentTestClass = test.getClass().getName();
+            write(test.toString(), true);
+        } else {
+            write(test.toString(), false);
+        }
     }
 
     /**
@@ -131,7 +143,7 @@
      *
      * @param msg
      */
-    private void write(String msg) {
+    private void write(String msg, boolean newTestClass) {
         if (writer != null) {
             try {
                 String html = "";
@@ -158,6 +170,9 @@
 
                 if (interactionString!= null && !"".equals(interactionString)) {
                     html = MessageFormat.format(interactionString, new String[]{msg, color, String.valueOf(testTime)});
+                    if (newTestClass) {
+                        html += newTestString;
+                    }
                     writer.write(html);
                 }
                 writer.flush();
@@ -185,11 +200,14 @@
         this.interactionString = interactionString;
     }
 
+    public void setNewTestString(String newTestString) {
+        this.newTestString = newTestString;
+    }
+
     public void testStarted(String testName) {
     }
 
     public void testEnded(String testName) {
     }
-
 }
 

Modified: incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/Tester.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/Tester.java?view=diff&r1=156147&r2=156148
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/Tester.java (original)
+++ incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/Tester.java Fri Mar  4 02:01:30 2005
@@ -20,7 +20,11 @@
 import junit.framework.TestResult;
 import javax.jcr.*;
 import javax.jcr.nodetype.ConstraintViolationException;
+import javax.servlet.jsp.JspWriter;
 import java.util.*;
+import java.io.IOException;
+import java.text.MessageFormat;
+
 import org.apache.jackrabbit.test.AbstractJCRTest;
 import org.apache.jackrabbit.test.RepositoryHelper;
 
@@ -38,18 +42,25 @@
     /** the test listener */
     TckTestRunner runner;
 
+    /** the jsp writer */
+    JspWriter writer;
+
+    /** The string to be writen after finishing a suite */
+    String finishedSuiteString;
+
     /**
      * The constructor...
      *
      * @param tests All tests found using <code>TestFinder</code>
      */
-    public Tester(TestFinder tests, TckTestRunner runner) {
+    public Tester(TestFinder tests, TckTestRunner runner, JspWriter writer) {
         this.tests = tests;
         results = new HashMap();
         this.runner = runner;
+        this.writer = writer;
 
         // set the configuration for the to be tested repository
-        AbstractJCRTest.helper = new RepositoryHelper(WebAppTestConfig.getConfig());
+        AbstractJCRTest.helper = new RepositoryHelper(WebAppTestConfig.getCurrentConfig());
     }
 
     /**
@@ -71,11 +82,26 @@
             try {
                 suite.run(result);
                 results.putAll(runner.getResults());
+                write(suite);
             } catch (Exception e) {
                 // ignore
             }
         }
         return results;
+    }
+
+
+    public void setfinishedSuiteString(String line) {
+        finishedSuiteString = line;
+    }
+
+    /**
+     * Writes a predefined string to the output after finishing a test suite
+     */
+    private void write(TestSuite suite) throws IOException {
+        if (writer != null) {
+            writer.write(MessageFormat.format(finishedSuiteString, new String[]{suite.toString(), String.valueOf(suite.testCount())}));
+        }
     }
 
     /**

Modified: incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/WebAppTestConfig.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/WebAppTestConfig.java?view=diff&r1=156147&r2=156148
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/WebAppTestConfig.java (original)
+++ incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/WebAppTestConfig.java Fri Mar  4 02:01:30 2005
@@ -18,24 +18,29 @@
 
 import org.apache.jackrabbit.tck.j2ee.RepositoryServlet;
 import org.apache.jackrabbit.test.JNDIRepositoryStub;
+import org.apache.jackrabbit.test.RepositoryStub;
 
 import javax.jcr.Session;
 import javax.jcr.RepositoryException;
 import javax.jcr.Node;
 import javax.servlet.http.HttpServletRequest;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.Properties;
+import java.util.*;
 import java.io.InputStream;
 import java.io.IOException;
 
+import junit.framework.TestSuite;
+import junit.framework.TestCase;
+
 
 /**
  * The <code>WebAppTestConfig</code> class reads and saves the config in the tck web app specific way.
  */
 public class WebAppTestConfig {
+    /** default property names */
     public final static String[] propNames = {JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_WORKSPACE_NAME,
-                                              JNDIRepositoryStub.REPOSITORY_LOOKUP_PROP, "java.naming.provider.url", "java.naming.factory.initial",
+                                              JNDIRepositoryStub.REPOSITORY_LOOKUP_PROP,
+                                              "java.naming.provider.url",
+                                              "java.naming.factory.initial",
                                               JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_SUPERUSER_NAME,
                                               JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_SUPERUSER_PWD,
                                               JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_READWRITE_NAME,
@@ -46,6 +51,10 @@
                                               JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_NODE_NAME1,
                                               JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_NODE_NAME2,
                                               JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_NODE_NAME3,
+                                              JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_NODE_NAME4,
+                                              JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_PROP_NAME1,
+                                              JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_PROP_NAME2,
+                                              JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_NAMESPACES,
                                               JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_NODETYPE};
 
     /**
@@ -56,12 +65,16 @@
     public static Map getConfig() {
         Map config = new HashMap();
         try {
-            Session repSession = RepositoryServlet.getSession(null);
+            Iterator allPropNames = getOriConfig().keySet().iterator();
+
+            Session repSession = RepositoryServlet.getSession();
             Node configNode = repSession.getRootNode().getNode("testconfig");
 
-            for (int i = 0; i < propNames.length; i++) {
-                String pName = propNames[i];
-                config.put(pName, configNode.getProperty(pName).getString());
+            while (allPropNames.hasNext()) {
+                String pName = (String) allPropNames.next();
+                if (configNode.hasProperty(pName)) {
+                    config.put(pName, configNode.getProperty(pName).getString());
+                }
             }
         } catch (RepositoryException e) {
             return new HashMap();
@@ -84,6 +97,12 @@
                 // ignore
             }
         }
+
+        // add additional props
+        props.put(JNDIRepositoryStub.REPOSITORY_LOOKUP_PROP, "");
+        props.put("java.naming.provider.url", "");
+        props.put("java.naming.factory.initial", "");
+
         return props;
     }
 
@@ -105,8 +124,10 @@
         }
 
         // save config entries
-        for (int i = 0; i < propNames.length; i++) {
-            String pName = propNames[i];
+        Iterator allPropNames = getOriConfig().keySet().iterator();
+
+        while (allPropNames.hasNext()) {
+            String pName = (String) allPropNames.next();
             setEntry(pName, request, testConfig);
         }
 
@@ -126,5 +147,78 @@
         if (request.getParameter(propname) != null) {
             testConfig.setProperty(propname, request.getParameter(propname));
         }
+    }
+
+    /**
+     * Returns all test case specific configuration entries
+     *
+     * @param suite test suite
+     * @return all test case specific conf entries
+     */
+    public static Map getTestCaseSpecificConfigs(TestSuite suite) {
+        Map currentConfig = getCurrentConfig();
+        Map configs = new HashMap();
+
+        // check for "package" defined props
+        String pname = suite.getName();
+        if ("versioning".equals(pname)) {
+            pname = "version";
+        }
+        configs.putAll(getProperties(pname, currentConfig));
+
+        Enumeration allTestClasses = suite.tests();
+
+        while (allTestClasses.hasMoreElements()) {
+            TestSuite aTest = (TestSuite) allTestClasses.nextElement();
+            String name = aTest.getName();
+            name = name.substring(name.lastIndexOf(".") + 1);
+
+            // check for class defined props
+            configs.putAll(getProperties(name, currentConfig));
+
+            // goto methods
+            Enumeration testMethods = aTest.tests();
+
+            while (testMethods.hasMoreElements()) {
+                TestCase tc = (TestCase) testMethods.nextElement();
+                String methodname = tc.getName();
+                String fullName = name + "." + methodname;
+                configs.putAll(getProperties(fullName, currentConfig));
+            }
+        }
+        return configs;
+    }
+
+    /**
+     * Returns the current configuration
+     * @return
+     */
+    public static Map getCurrentConfig() {
+        Map conf = getOriConfig();
+        conf.putAll(getConfig());
+        return conf;
+    }
+
+    /**
+     * Returns all properties which property name starts with <code>"javax.jcr.tck." + name</code>
+     *
+     * @param name property name "extension"
+     * @param config configuration
+     * @return all properties which apply the above mentioned rule
+     */
+    private static Map getProperties(String name, Map config) {
+        Map props = new HashMap();
+
+        String pname = RepositoryStub.PROP_PREFIX + "." + name;
+
+        Iterator itr = config.keySet().iterator();
+
+        while (itr.hasNext()) {
+            String key = (String) itr.next();
+            if (key.startsWith(pname)) {
+                props.put(key, config.get(key));
+            }
+        }
+        return props;
     }
 }

Modified: incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/j2ee/RepositoryServlet.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/j2ee/RepositoryServlet.java?view=diff&r1=156147&r2=156148
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/j2ee/RepositoryServlet.java (original)
+++ incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/j2ee/RepositoryServlet.java Fri Mar  4 02:01:30 2005
@@ -35,19 +35,45 @@
  */
 public class RepositoryServlet extends HttpServlet {
 
+    /** the logger */
     private static Logger log;// = Logger.getLogger(RepositoryServlet.class);
 
+    /** repository configuration path */
     public final static String INIT_PARAM_REPOSITORY_CONFIG = "repository-config";
 
+    /** repository home */
     public final static String INIT_PARAM_REPOSITORY_HOME = "repository-home";
 
+    /** repository name */
     public final static String INIT_PARAM_REPOSITORY_NAME = "repository-name";
 
-    // todo: implement correctly
+    /** jaas configuration file path */
+    public static final String JAAS_CONFIG_FILE = "jaas-config-file";
+
+    /** user id name */
+    public static final String USER_ID = "jcr-userid";
+
+    /** user password name */
+    public static final String  USER_PASSWORD = "jcr-password";
+
+    /** log4j config */
     public final static String PARAM_LOG4J_CONFIG = "log4j-config";
 
-    public static RepositoryImpl repository;
+    /** the repository to read/write test results and config */
+    private static RepositoryImpl repository;
+
+    /** the user id */
+    private static String uid;
+
+    /** the password */
+    private static String pw;
 
+    /**
+     * The init method starts the repository to read/write test results and configuration,
+     * sets the jaas config and the user id and the user password
+     *
+     * @throws ServletException
+     */
     public void init() throws ServletException {
         super.init();
 
@@ -117,6 +143,18 @@
 
             log_info("JSR170 RI Repository initialized.");
 
+            // set jaas config file
+            String jaasConfigFile = getServletConfig().getInitParameter(JAAS_CONFIG_FILE);
+            if (jaasConfigFile == null) {
+                jaasConfigFile = "etc/jaas.config";
+            }
+            System.setProperty("java.security.auth.login.config", jaasConfigFile);
+            log_info("JAAS config set");
+
+            // set user id and password to read/write test results and configuration
+            uid = getServletConfig().getInitParameter(USER_ID);
+            pw = getServletConfig().getInitParameter(USER_PASSWORD);
+
         } catch (RepositoryException e) {
             log_info("Unable to initialize repository: " + e.toString(), e);
             throw new ServletException("Unable to initialize repository: " + e.toString(), e);
@@ -155,10 +193,9 @@
     /**
      * Returns the jcr session
      *
-     * @param req
      * @return
      */
-    public static Session getSession(HttpServletRequest req) {
+    public static Session getSession() {
         try {
             return login();
         } catch (RepositoryException e) {
@@ -168,14 +205,14 @@
     }
 
     /**
-     * logs in to the repository. currently only as anonymous user
+     * Logs in to the repository. The user to login is specified in the servlet config.
      * @throws RepositoryException
      */
     public static Session login()
 	    throws RepositoryException {
 
         // login
-        Session repSession = repository.login(null, null);
+        Session repSession = repository.login(new SimpleCredentials(uid, pw.toCharArray()), null);
         return repSession;
     }
 

Modified: incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/classes/repositoryStubImpl.properties
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/classes/repositoryStubImpl.properties?view=diff&r1=156147&r2=156148
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/classes/repositoryStubImpl.properties (original)
+++ incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/classes/repositoryStubImpl.properties Fri Mar  4 02:01:30 2005
@@ -1,19 +1,20 @@
 #
-# This is the configuration file for the JNDI repository test stub.
+# This is the configuration file for the jackrabbit repository test stub.
 #
 
 # Stub implementation class
 javax.jcr.tck.repository_stub_impl=org.apache.jackrabbit.test.JNDIRepositoryStub
 
-# JNDI configuration
-javax.jcr.tck.jndi.repository_lookup_name=tck.repository
-java.naming.provider.url=http://www.day.com/tck
-java.naming.factory.initial=com.day.crx.jndi.provider.MemoryInitialContextFactory
+# repository specific configuration
+org.apache.jackrabbit.repository.config=applications/test/repository.xml
+org.apache.jackrabbit.repository.name=repo
+org.apache.jackrabbit.repository.home=applications/test
+org.apache.jackrabbit.repository.jaas.config=applications/test/jaas.config
 
 # credential configuration
 javax.jcr.tck.superuser.name=superuser
 javax.jcr.tck.superuser.pwd=
-javax.jcr.tck.readwrite.name=superuser
+javax.jcr.tck.readwrite.name=user
 javax.jcr.tck.readwrite.pwd=
 javax.jcr.tck.readonly.name=anonymous
 javax.jcr.tck.readonly.pwd=
@@ -21,11 +22,302 @@
 # global test configuration
 javax.jcr.tck.testroot=/testroot
 javax.jcr.tck.nodetype=nt:unstructured
-javax.jcr.tck.nodename1=foo
-javax.jcr.tck.nodename2=bar
-javax.jcr.tck.nodename3=foobar
+javax.jcr.tck.nodename1=node1
+javax.jcr.tck.nodename2=node2
+javax.jcr.tck.nodename3=node3
+javax.jcr.tck.nodename4=node4
+javax.jcr.tck.propertyname1=prop1
+javax.jcr.tck.propertyname2=prop2
+javax.jcr.tck.workspacename=test
+
+# namespace configuration
+javax.jcr.tck.namespaces=test
+javax.jcr.tck.namespaces.test=http://www.apache.org/jackrabbit/test
 
 # sample for per test case config overriding
 # Test class: AddNodeText
 # Test method: testName
 javax.jcr.tck.AddNodeTest.testName.nodename1=myname
+
+# ==============================================================================
+# JAVAX.JCR CONFIGURATION
+# ==============================================================================
+
+# Test class: ItemDefTest
+javax.jcr.tck.ItemDefTest.testroot=/
+
+# Test class: ItemReadMethodsTest
+javax.jcr.tck.ItemReadMethodsTest.testroot=/
+
+# Test class: NodeReadMethodsTest
+javax.jcr.tck.NodeReadMethodsTest.testroot=/
+
+# Test class: PropertyTypeTest
+javax.jcr.tck.PropertyTypeTest.testroot=/
+
+# Test class: BinaryPropertyTest
+javax.jcr.tck.BinaryPropertyTest.testroot=/
+
+# Test class: BooleanPropertyTest
+javax.jcr.tck.BooleanPropertyTest.testroot=/
+
+# Test class: DatePropertyTest
+javax.jcr.tck.DatePropertyTest.testroot=/
+
+# Test class: DoublePropertyTest
+javax.jcr.tck.DoublePropertyTest.testroot=/
+
+# Test class: LongPropertyTest
+javax.jcr.tck.LongPropertyTest.testroot=/
+
+# Test class: NamePropertyTest
+javax.jcr.tck.NamePropertyTest.testroot=/
+
+# Test class: PathPropertyTest
+javax.jcr.tck.PathPropertyTest.testroot=/
+
+# Test class: ReferencePropertyTest
+javax.jcr.tck.ReferencePropertyTest.testroot=/
+
+# Test class: StringPropertyTest
+javax.jcr.tck.StringPropertyTest.testroot=/
+
+# Test class: UndefinedPropertyTest
+javax.jcr.tck.UndefinedPropertyTest.testroot=/
+
+# Test class: PropertyReadMethodsTest
+javax.jcr.tck.PropertyReadMethodsTest.testroot=/
+
+# Test class: NodeIteratorTest
+javax.jcr.tck.NodeIteratorTest.testroot=/
+
+# Test class: RepositoryDescriptorTest
+javax.jcr.tck.RepositoryDescriptorTest.testroot=/
+
+# Test class: WorkspaceReadMethodsTest
+javax.jcr.tck.WorkspaceReadMethodsTest.testroot=/
+
+# Test class: SessionReadMethodsTest
+javax.jcr.tck.SessionReadMethodsTest.testroot=/
+
+# Test class: NamespaceRegistryReadMethodsTest
+javax.jcr.tck.NamespaceRegistryReadMethodsTest.testroot=/
+
+# Test class: NamespaceRemappingTest
+javax.jcr.tck.NamespaceRemappingTest.testroot=/
+
+# Test class: SessionTest
+# Test method: testMoveItemExistsException
+# nodetype that does not allow same name siblings
+javax.jcr.tck.SessionTest.testMoveItemExistsException.nodetype2=nt:folder
+# valid node type that can be added as child of nodetype2
+javax.jcr.tck.SessionTest.testMoveItemExistsException.nodetype3=nt:hierarchyNode
+
+# Test class: SessionTest
+# Test method: testSaveContstraintViolationException
+# nodetype that has a property that is mandatory but not autocreated
+javax.jcr.tck.SessionTest.testSaveContstraintViolationException.nodetype2=nt:file
+
+# Test class: SessionUUIDTest
+# node type that has a property of type PropertyType.REFERENCE
+javax.jcr.tck.SessionUUIDTest.nodetype=nt:unstructured
+# name of the property that is of type PropertyType.REFERENCE
+javax.jcr.tck.SessionUUIDTest.propertyname1=foobar
+# nodetype that has nodetype mix:referenceable assigned
+javax.jcr.tck.SessionUUIDTest.nodetype2=test:refTargetNode
+
+# Test class: SessionUUIDTest
+# Test method: testSaveMovedRefNode
+# name of the property that can be modified
+javax.jcr.tck.SessionUUIDTest.testSaveMovedRefNode.propertyname1=foobar
+
+# Test class: NodeTest
+# Test method: testAddNodeItemExistsException
+# nodetype that does not allow same name siblings and allows child nodes of
+# the same type
+javax.jcr.tck.NodeTest.testAddNodeItemExistsException.nodetype=nt:folder
+
+# Test class: NodeTest
+# Test method: testRemoveMandatoryNode
+# nodetype that has a mandatory child node definition
+javax.jcr.tck.NodeTest.testRemoveMandatoryNode.nodetype2=nt:file
+# nodetype of the  mandatory child
+javax.jcr.tck.NodeTest.testRemoveMandatoryNode.nodetype3=nt:base
+# name of the mandatory node
+javax.jcr.tck.NodeTest.testRemoveMandatoryNode.nodename3=jcr:content
+
+# Test class: NodeTest
+# Test method: testSaveContstraintViolationException
+# nodetype that has a property that is mandatory but not autocreated
+javax.jcr.tck.NodeTest.testSaveContstraintViolationException.nodetype2=nt:file
+
+# Test class: NodeUUIDTest
+# node type that has a property of type PropertyType.REFERENCE
+javax.jcr.tck.NodeUUIDTest.nodetype=nt:unstructured
+# name of the property that is of type PropertyType.REFERENCE
+javax.jcr.tck.NodeUUIDTest.propertyname1=ref
+# nodetype that has nodetype mix:referenceable assigned
+javax.jcr.tck.NodeUUIDTest.nodetype2=test:refTargetNode
+
+# Test class: NodeUUIDTest
+# Test method: testSaveMovedRefNode
+# name of the property that can be modified
+javax.jcr.tck.NodeUUIDTest.testSaveMovedRefNode.propertyname1=foobar
+# nodetype that has nodetype mix:referenceable assigned
+
+# Test class: NodeOrderableChildNodesTest
+# nodetype that supports orderable child nodes
+javax.jcr.tck.NodeOrderableChildNodesTest.nodetype2=nt:unstructured
+# valid node type that can be added as child of nodetype 2
+javax.jcr.tck.NodeOrderableChildNodesTest.nodetype3=nt:unstructured
+
+# Test class: NodeOrderableChildNodesTest
+# Test method: testOrderBeforeUnsupportedRepositoryOperationException
+# nodetype that does not allow ordering of child nodes
+javax.jcr.tck.NodeOrderableChildNodesTest.testOrderBeforeUnsupportedRepositoryOperationException.nodetype2=nt:folder
+# valid node type that can be added as child of nodetype 2
+javax.jcr.tck.NodeOrderableChildNodesTest.testOrderBeforeUnsupportedRepositoryOperationException.nodetype3=nt:hierarchyNode
+
+# ------------------------------------------------------------------------------
+# observation configuration
+# ------------------------------------------------------------------------------
+
+# Configuration settings for the serialization.
+# Note that the serialization test tries to use as many features of the repository
+# as possible, but fails silently if a feature is not available. You have to
+# specify all of the following configuration entries, even if your repository does
+# not support the feature that is associated with them.
+
+# Root node for the example tree
+javax.jcr.tck.SerializationTest.testroot=/testdata/serialization
+
+# Node type to use for the example tree. Specify a node type that allows complex trees and all property types if possible
+javax.jcr.tck.SerializationTest.nodetype=nt:unstructured
+
+# Name of the nodes for source and target tree
+javax.jcr.tck.SerializationTest.sourceFolderName=source
+javax.jcr.tck.SerializationTest.targetFolderName=target
+javax.jcr.tck.SerializationTest.rootNodeName=test
+
+# List the properties whose values may change during serialization/deserialization. For example,
+# the UUID of a node is unique in the repository, so it will have to change when you re-import
+# a tree at a different location.
+javax.jcr.tck.SerializationTest.propertyValueMayChange= jcr:created jcr:uuid jcr:versionHistory jcr:baseVersion jcr:predecessors P_Reference
+
+# The name of the test node types. For easier diagnostics, the node types have names
+# that tell you the kind of information they store
+javax.jcr.tck.SerializationTest.nodeTypesTestNode=NodeTypes
+javax.jcr.tck.SerializationTest.mixinTypeTestNode=MixinTypes
+javax.jcr.tck.SerializationTest.propertyTypesTestNode=PropertyTypes
+javax.jcr.tck.SerializationTest.sameNameChildrenTestNode=SameNameChildren
+javax.jcr.tck.SerializationTest.multiValuePropertiesTestNode=MultiValueProperties
+javax.jcr.tck.SerializationTest.referenceableNodeTestNode=ReferenceableNode
+javax.jcr.tck.SerializationTest.orderChildrenTestNode=OrderChildren
+javax.jcr.tck.SerializationTest.namespaceTestNode=Namespace
+
+# The name of the test property types.
+javax.jcr.tck.SerializationTest.stringTestProperty=P_String
+javax.jcr.tck.SerializationTest.binaryTestProperty=P_Binary
+javax.jcr.tck.SerializationTest.dateTestProperty=P_Date
+javax.jcr.tck.SerializationTest.longTestProperty=P_Long
+javax.jcr.tck.SerializationTest.doubleTestProperty=P_Double
+javax.jcr.tck.SerializationTest.booleanTestProperty=P_Boolean
+javax.jcr.tck.SerializationTest.nameTestProperty=P_Name
+javax.jcr.tck.SerializationTest.pathTestProperty=P_Path
+javax.jcr.tck.SerializationTest.referenceTestProperty=P_Reference
+javax.jcr.tck.SerializationTest.multiValueTestProperty=P_MultiValue
+
+# Test method: testVersioningExceptionSessionFileChild
+# specified nodetype must be versionable and allow child nodes of the same type.
+javax.jcr.tck.SerializationTest.testVersioningExceptionSessionFileChild.nodetype=test:versionable
+
+# Test method: testVersioningExceptionSessionFileParent
+# specified nodetype must be versionable and allow child nodes of the same type.
+javax.jcr.tck.SerializationTest.testVersioningExceptionSessionFileParent.nodetype=test:versionable
+
+# ==============================================================================
+# JAVAX.JCR.QUERY CONFIGURATION
+# ==============================================================================
+
+# Test class: SaveTest
+# Test method: testConstraintViolationException
+# Specified node type must not allow child nodes.
+javax.jcr.tck.SaveTest.testConstraintViolationException.nodetype=nt:query
+
+# Test class: XPathQueryLevel1Test
+javax.jcr.tck.XPathQueryLevel1Test.testroot=/testdata/query
+
+# Test class: XPathDocOrderTest
+javax.jcr.tck.XPathDocOrderTest.testroot=/testdata/query
+
+# Test class: XPathPosIndexTest
+javax.jcr.tck.XPathPosIndexTest.testroot=/testdata/query
+
+# Test class: XPathOrderByTest
+javax.jcr.tck.XPathOrderByTest.testroot=/testdata/query
+
+# Test class: XPathSyntaxTest
+javax.jcr.tck.XPathSyntaxTest.testroot=/testdata/query
+
+# Test class: SQLQueryLevel1Test
+javax.jcr.tck.SQLQueryLevel1Test.testroot=/testdata/query
+
+# Test class: SQLSyntaxTest
+javax.jcr.tck.SQLSyntaxTest.testroot=/testdata/query
+
+# Test class: SQLOrderByTest
+javax.jcr.tck.SQLOrderByTest.testroot=/testdata/query
+
+# ==============================================================================
+# JAVAX.JCR.VERSIONING CONFIGURATION
+# ==============================================================================
+
+# nodetye that is versionable. if it is not, an attempt is made to create versionable nodes
+# by adding a mix:versionable mixin-type.
+# NOTE: javax.jcr.tck.nodetype must define a non-versionable nodetype!
+javax.jcr.tck.version.versionableNodeType=test:versionable
+javax.jcr.tck.version.propertyValue=aPropertyValue
+
+# testroot for the version package
+# the test root must allow versionable and non-versionable nodes being created below
+javax.jcr.tck.version.testroot=/testroot
+
+# 3 nodes (nodeName1, nodeName2, nodeName3 with nt=versionableNodeType / nt=nonVersionableNodeType will be cloned to 2nd workspace
+# nodename1 > used to persistently create versionable node below testroot
+# nodename2 > used to create second versionable node below testroot (used for restore/workspace.restore with uuid-conflict)
+# nodename3 > used to persistently create non-versionable node below testroot
+javax.jcr.tck.version.nodename1=versionableNodeName1
+javax.jcr.tck.version.nodename2=versionableNodeName2
+javax.jcr.tck.version.nodename3=nonVersionableNodeName1
+
+# nodename 4: versionabel child-node of the first versionable node with nodeName1 and nodetype 'versionableNodeType'
+# used for:
+# + creation of a node in the 2nd workspace, that does not exist in the first workspace
+# + creation of a node in the 2nd workspace, in order to test uuid-conflicts with Workspace.restore.
+# + creation of a sub-node in the default workspace, in order to test uuid-conflicts with Node.restore.
+# + NOTE: the nodetype with 'versionableNodeType' must define its children nodes to either have COPY or VERSION
+#         OPV behaviour in order to successfully test Node.restore and Workspace.restore with uuid conflict.
+javax.jcr.tck.version.nodename4=childNodeName
+
+# path to existing String-properties and a new value for the property, that allows to test the indicated OPV behaviour
+javax.jcr.tck.OnParentVersionAbortTest.propertyname1=test:abortOnParentVersionProp
+javax.jcr.tck.OnParentVersionComputeTest.propertyname1=test:computeOnParentVersionProp
+javax.jcr.tck.OnParentVersionCopyTest.propertyname1=test:copyOnParentVersionProp
+javax.jcr.tck.OnParentVersionIgnoreTest.propertyname1=test:ignoreOnParentVersionProp
+javax.jcr.tck.OnParentVersionInitializeTest.propertyname1=test:initializeOnParentVersionProp
+
+# config for nodes that show the indicated OPV behaviour:
+# nodes are added in order to test the versioning behaviour indicated by the test-class name.
+# NOTE:
+# - nodename4 is uses as name for the childnode
+# - nodetype is used as nodetype name for the childnode
+# - the specified child node is created below nodename1 with versionableNodeType
+#   the versionableNodeType and/or nodename1 may be overwritten with the individual
+#   testclass below.
+javax.jcr.tck.OnParentVersionCopyTest.nodename4=test:copyOnParentVersion
+javax.jcr.tck.OnParentVersionCopyTest.nodetype=nt:unstructured
+javax.jcr.tck.OnParentVersionAbortTest.nodename4=test:abortOnParentVersion
+javax.jcr.tck.OnParentVersionAbortTest.nodetype=nt:unstructured
+
+# Test class: MergeNodeTest
+javax.jcr.tck.MergeNodeTest.nodetype=test:versionable

Modified: incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/content-repository/repository.xml
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/content-repository/repository.xml?view=diff&r1=156147&r2=156148
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/content-repository/repository.xml (original)
+++ incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/content-repository/repository.xml Fri Mar  4 02:01:30 2005
@@ -2,37 +2,65 @@
 <!-- <!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD Repository//EN" "file://config.dtd"> -->
 <!DOCTYPE Repository [
     <!--
-    the Repository element configures a repository instance;
-    individual workspaces of the repository are configured through
-    separate configuration files called workspace.xml which are
-    located in a subfolder of the workspaces root directory
-    (see Workspaces element).
+        the Repository element configures a repository instance;
+        individual workspaces of the repository are configured through
+        separate configuration files called workspace.xml which are
+        located in a subfolder of the workspaces root directory
+        (see Workspaces element).
 
-    it consists of
+        it consists of
 
-    a FileSystem element (the virtual file system
-    used by the repository to persist global state such as
-    registered namespaces, custom node types, etc..
+            a FileSystem element (the virtual file system
+            used by the repository to persist global state such as
+            registered namespaces, custom node types, etc..
 
-    a Workspaces element that specifies to the location of
-    workspaces root directory and the name of default workspace
+            a Security element that specifies the name of the app-entry
+            in the JAAS config and the access manager
 
-    a Workspace element that is used as a workspace configuration
-    template; it is used to create the initial workspace if there's
-    no workspace yet and for creating additional workspaces through
-    the api
+            a Workspaces element that specifies to the location of
+            workspaces root directory and the name of default workspace
+
+            a Workspace element that is used as a workspace configuration
+            template; it is used to create the initial workspace if there's
+            no workspace yet and for creating additional workspaces through
+            the api
+
+            a SearchIndex element that is used for configuring per workspace
+            Indexing-related settings
+
+            a Versioning element that is used for configuring
+            versioning-related settings
     -->
-    <!ELEMENT Repository (FileSystem,Workspaces,Workspace,Versioning)>
+    <!ELEMENT Repository (FileSystem,Security,Workspaces,Workspace,Versioning)>
 
     <!--
-    a virtual file system
+        a virtual file system
     -->
     <!ELEMENT FileSystem (param*)>
     <!ATTLIST FileSystem
       class CDATA #REQUIRED>
 
     <!--
-    generic parameter (name/value pair)
+        the Security element specifies the name (appName attribute)
+        of the JAAS configuration app-entry for this repository. 
+
+        it also specifies the access manager to be used (AccessManager element).
+    -->
+    <!ELEMENT Security (AccessManager)>
+    <!ATTLIST Security
+      appName CDATA #REQUIRED>
+
+    <!--
+        the AccessManager element configures the access manager to be used by
+        this repository instance; the class attribute specifies the FQN of the
+        class implementing the AccessManager interface
+    -->
+    <!ELEMENT AccessManager (param*)>
+    <!ATTLIST AccessManager
+      class CDATA #REQUIRED>
+
+    <!--
+        generic parameter (name/value pair)
     -->
     <!ELEMENT param EMPTY>
     <!ATTLIST param
@@ -40,12 +68,12 @@
       value CDATA #REQUIRED>
 
     <!--
-    the Workspaces element specifies the workspaces root directory
-    (rootPath attribute) and the name of the default workspace
-    (defaultWorkspace attribute).
+        the Workspaces element specifies the workspaces root directory
+        (rootPath attribute) and the name of the default workspace
+        (defaultWorkspace attribute).
 
-    individual workspaces are configured through individual workspace.xml
-    files located in a subfolder each of the workspaces root directory.
+        individual workspaces are configured through individual workspace.xml
+        files located in a subfolder each of the workspaces root directory.
     -->
     <!ELEMENT Workspaces EMPTY>
     <!ATTLIST Workspaces
@@ -53,96 +81,116 @@
       defaultWorkspace CDATA #REQUIRED>
 
     <!--
-    the Workspace element serves as a workspace configuration template;
-    it is used to create the initial workspace if there's no workspace yet
-    and for creating additional workspaces through the api
+        the Workspace element serves as a workspace configuration template;
+        it is used to create the initial workspace if there's no workspace yet
+        and for creating additional workspaces through the api
     -->
-    <!ELEMENT Workspace (FileSystem,PersistenceManager,SearchIndex)>
+    <!ELEMENT Workspace (FileSystem,PersistenceManager,SearchIndex?)>
     <!ATTLIST Workspace
       name CDATA #REQUIRED>
 
     <!--
-    the PersistenceManager element configures the persistence manager
-    to be used for the workspace; the class attribute specifies the
-    FQN of the class implementing PersistenceManager interface
+        the PersistenceManager element configures the persistence manager
+        to be used for the workspace; the class attribute specifies the
+        FQN of the class implementing the PersistenceManager interface
     -->
     <!ELEMENT PersistenceManager (param*)>
     <!ATTLIST PersistenceManager
       class CDATA #REQUIRED>
 
     <!--
-    the SearchIndex element specifies the locaction of the search index
-    (used by the QueryManager)
+        the SearchIndex element specifies the locaction of the search index
+        (used by the QueryHandler); the class attribute specifies the
+        FQN of the class implementing the QueryHandler interface.
     -->
-    <!ELEMENT SearchIndex (FileSystem)>
+    <!ELEMENT SearchIndex (param*,FileSystem)>
+    <!ATTLIST SearchIndex
+      class CDATA #REQUIRED>
 
     <!--
-    the Versioning element specifies the location and persistence manager
-    that is used to store versions
+        the Versioning element configures the persistence manager
+        to be used for persisting version state
     -->
     <!ELEMENT Versioning (FileSystem, PersistenceManager)>
     <!ATTLIST Versioning
       rootPath CDATA #REQUIRED
     >
-
 ]>
 <!-- Example Repository Configuration File -->
 <Repository>
     <!--
-    virtual file system where the repository stores global state
-    (e.g. registered namespaces, custom node types, etc.)
-    -->
-    <!--
-    <FileSystem class="com.day.jackrabbit.fs.cq.CQFileSystem">
-        <param name="path" value="${rep.home}/repStore.dat"/>
-        <param name="autoRepair" value="false"/>
-    </FileSystem>
+        virtual file system where the repository stores global state
+        (e.g. registered namespaces, custom node types, etc.)
     -->
     <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
         <param name="path" value="${rep.home}/repository"/>
     </FileSystem>
 
     <!--
-    location of workspaces root directory and name of default workspace
+        security configuration
+    -->
+    <Security appName="Jackrabbit">
+        <!--
+            access manager:
+            class: FQN of class implementing the AccessManager interface
+        -->
+        <AccessManager class="org.apache.jackrabbit.core.security.SimpleAccessManager">
+            <!-- <param name="config" value="${rep.home}/access.xml"/> -->
+        </AccessManager>
+    </Security>
+
+    <!--
+        location of workspaces root directory and name of default workspace
     -->
     <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="default"/>
     <!--
-    workspace configuration template:
-    used to create the initial workspace if there's no workspace yet
+        workspace configuration template:
+        used to create the initial workspace if there's no workspace yet
     -->
     <Workspace name="${wsp.name}">
         <!--
-        virtual file system of the workspace:
-        class: FQN of class implementing FileSystem interface
+            virtual file system of the workspace:
+            class: FQN of class implementing the FileSystem interface
         -->
+        <FileSystem class="com.day.jackrabbit.fs.cq.CQFileSystem">
+            <param name="path" value="${wsp.home}/wspStore.dat"/>
+            <param name="autoRepair" value="false"/>
+            <param name="blockSize" value="128"/>
+            <param name="autoSync" value="false"/>
+        </FileSystem>
         <!--
         <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
             <param name="path" value="${wsp.home}"/>
         </FileSystem>
         -->
-        <FileSystem class="com.day.jackrabbit.fs.cq.CQFileSystem">
-            <param name="path" value="${wsp.home}/repStore.dat"/>
-            <param name="autoRepair" value="false"/>
-            <param name="autoSync" value="false"/>
-        </FileSystem>
         <!--
-        persistence manager of the workspace:
-        class: FQN of class implementing PersistenceManager interface
+            persistence manager of the workspace:
+            class: FQN of class implementing the PersistenceManager interface
         -->
-        <PersistenceManager class="org.apache.jackrabbit.core.state.obj.ObjectPersistenceManager" />
         <!--
+        <PersistenceManager class="org.apache.jackrabbit.core.state.xml.XMLPersistenceManager"/>
         -->
         <!--
-        Search index and the file system it uses.
+        <PersistenceManager class="org.apache.jackrabbit.core.state.mem.InMemPersistenceManager">
+            <param name="initialCapacity" value="100000"/>
+            <param name="loadFactor" value="0.3"/>
+            <param name="persistent" value="true"/>
+        </PersistenceManager>
         -->
+        <PersistenceManager class="org.apache.jackrabbit.core.state.obj.ObjectPersistenceManager"/>
         <!--
-        <SearchIndex>
+            Search index and the file system it uses.
+        -->
+        <SearchIndex class="org.apache.jackrabbit.core.search.lucene.SearchIndex">
+            <param name="useCompoundFile" value="true"/>
+            <param name="minMergeDocs" value="1000"/>
+            <param name="maxMergeDocs" value="10000"/>
+            <param name="mergeFactor" value="10"/>
+
             <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
                 <param name="path" value="${wsp.home}/index"/>
             </FileSystem>
         </SearchIndex>
-        -->
-
     </Workspace>
 
     <!--
@@ -150,20 +198,29 @@
     -->
     <Versioning rootPath="${rep.home}/version">
         <!--
-            Configures the filesystem to use for versioning ofr the respective
+            Configures the filesystem to use for versioning for the respective
             persistence manager
         -->
-        <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
-            <param name="path" value="${rep.home}/version"/>
+        <FileSystem class="com.day.jackrabbit.fs.cq.CQFileSystem">
+            <param name="path" value="${rep.home}/version/version.dat"/>
+            <param name="autoRepair" value="false"/>
+            <param name="blockSize" value="128"/>
+            <param name="autoSync" value="false"/>
         </FileSystem>
-
+    
         <!--
-            Configures the perisistence manager to use for the versioning.
-            Please note, that the current versioning implementation is based on
+            <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+                <param name="path" value="${rep.home}/version"/>
+            </FileSystem>
+        -->
+        
+        <!--
+            Configures the perisistence manager to be used for persisting version state.
+            Please note that the current versioning implementation is based on
             a 'normal' persistence manager, but this could change in future
             implementations.
         -->
-        <PersistenceManager class="org.apache.jackrabbit.core.state.xml.XMLPersistenceManager" />
-    </Versioning>
+        <PersistenceManager class="org.apache.jackrabbit.core.state.obj.ObjectPersistenceManager"/>
 
-</Repository>
\ No newline at end of file
+    </Versioning>
+</Repository>

Modified: incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/web.xml?view=diff&r1=156147&r2=156148
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/web.xml (original)
+++ incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/web.xml Fri Mar  4 02:01:30 2005
@@ -15,25 +15,43 @@
         <init-param>
             <param-name>log4j-config</param-name>
             <param-value>/WEB-INF/content-repository/log4j.properties</param-value>
-                <description>initial log4j configuration</description>
+            <description>initial log4j configuration</description>
         </init-param>
 
         <init-param>
             <param-name>repository-config</param-name>
             <param-value>/WEB-INF/content-repository/repository.xml</param-value>
-                <description>the repository config location</description>
+            <description>the repository config location</description>
         </init-param>
 
         <init-param>
             <param-name>repository-home</param-name>
             <param-value>tck/content-repository</param-value>
-                <description>the repository home</description>
+            <description>the repository home</description>
         </init-param>
 
         <init-param>
             <param-name>repository-name</param-name>
             <param-value>tck.repository</param-value>
-                <description>Repository Name under which the repository is registered via JNDI</description>
+            <description>Repository Name under which the repository is registered via JNDI</description>
+        </init-param>
+
+        <init-param>
+            <param-name>jaas-config-file</param-name>
+            <param-value>etc/jaas.config</param-value>
+            <description>Path of the jaas config file</description>
+        </init-param>
+
+        <init-param>
+            <param-name>jcr-userid</param-name>
+            <param-value>superuser</param-value>
+            <description>User to read/write from the repository where test results and config is stored</description>
+        </init-param>
+
+        <init-param>
+            <param-name>jcr-password</param-name>
+            <param-value>superuser</param-value>
+            <description>User password</description>
         </init-param>
 
         <load-on-startup>1</load-on-startup>

Modified: incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/config.jsp
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/config.jsp?view=diff&r1=156147&r2=156148
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/config.jsp (original)
+++ incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/config.jsp Fri Mar  4 02:01:30 2005
@@ -21,10 +21,15 @@
                  org.apache.jackrabbit.tck.WebAppTestConfig,
                  org.apache.jackrabbit.test.JNDIRepositoryStub,
                  org.apache.jackrabbit.tck.WebAppTestConfig,
-                 org.apache.jackrabbit.tck.j2ee.RepositoryServlet"
+                 org.apache.jackrabbit.tck.j2ee.RepositoryServlet,
+                 org.apache.jackrabbit.tck.TestFinder,
+                 junit.framework.TestSuite"
 %><%@page session="false" %><%
 
-Session repSession = RepositoryServlet.getSession(request);
+// get path from jar where the test sources are stored
+String TEST_JCR_PATH = "/WEB-INF/lib/tck-webapp-0.1.jar";
+
+Session repSession = RepositoryServlet.getSession();
 if (repSession == null) {
     return;
 }
@@ -54,19 +59,43 @@
                 <td colspan="3">
                     <%
                     if (mode == null || !mode.equals("view")) {
-                        Map props = WebAppTestConfig.getOriConfig();
-                        props.putAll(WebAppTestConfig.getConfig());
+                        Map props = WebAppTestConfig.getCurrentConfig();
                         %>
-                        <form name="test" action="graph.jsp" target="graph">
-                            <table>
-                                <tr class="content"><td class="content">Repository Lookup Name</td><td class="content"><input name="<%= JNDIRepositoryStub.REPOSITORY_LOOKUP_PROP %>" value="<%= props.get(JNDIRepositoryStub.REPOSITORY_LOOKUP_PROP) %>"></td><td class="content">Workspace Name</td><td class="content"><input name="<%= JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_WORKSPACE_NAME %>" value="<%= props.get(JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_WORKSPACE_NAME) %>"></td><td class="content">Description</td><td class="content"><input name="desc"></td><td>&nbsp;</td><td><input class="submit" type="submit" value="start"></td><td><input type="hidden" name="mode" value="testnow"</td></tr>
-                                <tr><td class="content">Superuser Name</td><td class="content"><input name="<%= JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_SUPERUSER_NAME %>" value="<%= props.get(JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_SUPERUSER_NAME) %>"></td><td class="content">NodeType</td><td class="content"><input name="<%= JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_NODETYPE %>" value="<%= props.get(JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_NODETYPE) %>"></td></tr>
-                                <tr><td class="content">Superuser Password</td><td class="content"><input name="<%= JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_SUPERUSER_PWD %>" value="<%= props.get(JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_SUPERUSER_PWD) %>"></td><td class="content">Node Name 1</td><td class="content"><input name="<%= JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_NODE_NAME1 %>" value="<%= props.get(JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_NODE_NAME1) %>"></td></tr>
-                                <tr><td class="content">ReadWrite User Id</td><td class="content"><input name="<%= JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_READWRITE_NAME %>" value="<%= props.get(JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_READWRITE_NAME) %>"></td><td class="content">Node Name 2</td><td class="content"><input name="<%= JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_NODE_NAME2 %>" value="<%= props.get(JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_NODE_NAME2) %>"></td></tr>
-                                <tr><td class="content">ReadWrite User Password</td><td class="content"><input name="<%= JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_READWRITE_PWD %>" value="<%= props.get(JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_READWRITE_PWD) %>"></td><td class="content">Node Name 3</td><td class="content"><input name="<%= JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_NODE_NAME3 %>" value="<%= props.get(JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_NODE_NAME3) %>"></td></tr>
-                                <tr><td class="content">Readonly User Id</td><td class="content"><input name="<%= JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_READONLY_NAME %>" value="<%= props.get(JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_READONLY_NAME) %>"></td><td class="content">Naming Factory Name</td><td class="content"><input name="java.naming.factory.initial" value="<%= props.get("java.naming.factory.initial") %>"></td></tr>
-                                <tr><td class="content">Readonly User Password</td><td class="content"><input name="<%= JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_READONLY_PWD %>" value="<%= props.get(JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_READONLY_PWD) %>"></td><td class="content">Naming Provider Url</td><td class="content"><input name="java.naming.provider.url" value="<%= props.get("java.naming.provider.url") %>"></td></tr>
-                                <tr><td class="content">Test Root Path</td><td class="content"><input name="<%= JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_TESTROOT %>" value="<%= props.get(JNDIRepositoryStub.PROP_PREFIX + "." + JNDIRepositoryStub.PROP_TESTROOT) %>"></td></tr>
+                        <form name="test" action="graph.jsp?" target="graph" method="post">
+                            <table width="100%">
+                                <tr><th class="content" width="40%" >Default Configuration</td><td width="60%" class="content" align="right"><input type="submit" value="start" class="submit"><input type="hidden" name="mode" value="testnow"></td></tr>
+                                <%
+                                // display default config
+                                for (int i = 0; i < WebAppTestConfig.propNames.length; i++) {
+                                    String name = WebAppTestConfig.propNames[i];
+                                    String value = (String) props.get(name);
+                                    %><tr><td class="graph"><%= name %></td><td class="graph"><input class="input" name="<%= name %>" value="<%= value %>"></td></tr><%
+                                }
+
+                                // display test suite specific configs
+                                TestFinder tf = new TestFinder();
+                                tf.find(getServletConfig().getServletContext().getResource(TEST_JCR_PATH).openStream(),
+                                        "TestAll.java");
+                                Iterator  tests = tf.getSuites().keySet().iterator();
+                                tests = tf.getSuites().keySet().iterator();
+
+                                while (tests.hasNext()) {
+                                    String key = (String) tests.next();
+                                    TestSuite t = (TestSuite) tf.getSuites().get(key);
+                                    Map configs = WebAppTestConfig.getTestCaseSpecificConfigs(t);
+                                    if (configs.size() > 0) {
+                                        %><tr><th class="content" colspan="2"><a id="<%= key  %>"></a><%= key  %></td></tr><%
+
+                                        Iterator citr = configs.keySet().iterator();
+                                        while (citr.hasNext()) {
+                                            String ckey = (String) citr.next();
+                                            // split title if too long
+                                            String title = (ckey.length() > 80) ? ckey.substring(0, 80) + " " + ckey.substring(81) : ckey;
+                                            %><tr><td class="graph"><%= title %></td><td class="graph"><input class="input" name="<%= ckey %>" value="<%= configs.get(ckey) %>"></td><%
+                                        }
+                                    }
+                                }
+                                %>
                             </table>
                         </form>
                     <%

Modified: incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/imgs/banner_left.jpg
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/imgs/banner_left.jpg?view=diff&r1=156147&r2=156148
==============================================================================
Binary files - no diff available.

Modified: incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/imgs/banner_right.jpg
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/imgs/banner_right.jpg?view=diff&r1=156147&r2=156148
==============================================================================
Binary files - no diff available.

Modified: incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/ui/default.css
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/ui/default.css?view=diff&r1=156147&r2=156148
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/ui/default.css (original)
+++ incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/ui/default.css Fri Mar  4 02:01:30 2005
@@ -164,10 +164,10 @@
 	margin: 0px;
 	padding: 0px;
 	border: 0px solid #000000;
-	width: 718px;
+	width: 720px;
 	height: 100px;
-	background-image: url(../imgs/banner_left.jpg);
-	vertical-align: top;
+	background-image: url('../imgs/banner_left.jpg');
+	vertical-align: top
 	}
 
 .leadcelltext
@@ -186,8 +186,7 @@
 	{
 	border-left: 1px solid #000000;
 	width: 239px;
-	background-image: url(../imgs/banner_right.jpg);
-	align:right;
+	align:right
 	}
 
 #technavcell
@@ -431,13 +430,14 @@
 .input
 	{
 	font-family: Verdana, Arial, Helvetica, san-serif;
-	font-size: 8px;
+	font-size: 10px;
 	font-weight: normal;
 	color: #184054;
 	background-color: #f0f0f0;
 	border: 1px solid #999999;
 	border-bottom: 1px solid #cccccc;
 	border-right: 1px solid #cccccc;
+	width:400px;
 	}
 
 .submit
@@ -511,5 +511,4 @@
 	margin: 0px;
 	margin-top: 4px;
 	border: 0px solid #999999;
-	}
-
+	}
\ No newline at end of file

Modified: incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/graph.jsp
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/graph.jsp?view=diff&r1=156147&r2=156148
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/graph.jsp (original)
+++ incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/graph.jsp Fri Mar  4 02:01:30 2005
@@ -27,13 +27,13 @@
 %><%@page session="false" %><%
 
 // get the repository session for read(config and test results) and write (config and test results) access
-Session repSession = RepositoryServlet.getSession(request);
+Session repSession = RepositoryServlet.getSession();
 if (repSession == null) {
     return;
 }
 
 // get path from jar where the test sources are stored
-String testJarPath = "/WEB-INF/lib/tck-webapp-0.1.jar";
+String TEST_JCR_PATH = "/WEB-INF/lib/tck-webapp-0.1.jar";
 
 // display mode:
 // - testnow : new test
@@ -44,6 +44,11 @@
 %><html>
     <head>
         <link rel="stylesheet" href="docroot/ui/default.css" type="text/css" title="style" />
+        <script>
+            function showConfig(id) {
+                parent.config.document.location.href="config.jsp#" + id;
+            }
+        </script>
     </head>
     <body style="margin-top:0px;border-width:0px">
     <%
@@ -51,7 +56,7 @@
     if (mode == null || (mode != null && mode.equals("testnow"))) {
         // prepare test
         TestFinder tf = new TestFinder();
-        tf.find(getServletConfig().getServletContext().getResource(testJarPath).openStream(),
+        tf.find(getServletConfig().getServletContext().getResource(TEST_JCR_PATH).openStream(),
                 "TestAll.java");
         Iterator  tests = tf.getSuites().keySet().iterator();
 
@@ -62,20 +67,22 @@
             String key = (String) tests.next();
             TestSuite t = (TestSuite) tf.getSuites().get(key);
             Enumeration members = t.tests();
-            out.write("<tr><th colspan=\"3\" class=\"content\">" + t.toString() + "</th></tr>");
+            out.write("<tr><th class=\"content\">" + t.toString() + "</th><th style=\"text-align: right;\" colspan=\"2\" class=\"content\"><a href=\"javascript:showConfig('" + key + "');\">Config</a></th></tr>");
+
+            // list tests ordered by key (level1, level2, ....)
             while (members.hasMoreElements()) {
                 TestSuite aTest = (TestSuite) members.nextElement();
 
-                out.write("<tr><td class=\"graph\" width=\"35%\" valign=\"top\">" + aTest.toString() + "</td><td>&nbsp;</td><td>");
+                out.write("<tr><td class=\"graph\" width=\"35%\" valign=\"top\">" +
+                        aTest.toString() + "</td><td>&nbsp;</td><td>");
 
                 Enumeration testMethods = aTest.tests();
-                int numOfTests = aTest.testCount();
                 while (testMethods.hasMoreElements()) {
                     TestCase tc = (TestCase) testMethods.nextElement();
                     String methodname = tc.getName();
 
                     String id = methodname + "(" + aTest.getName() + ")";
-                    out.write("<img border=\"0\" id=\"" + id + "img" + "\" src=\"docroot/imgs/clear.png\"> ");
+                    out.write("<img border=\"0\" id=\"" + id + "img" + "\" src=\"docroot/imgs/clear.png\" title=\"" + methodname + "\"> ");
                 }
                 out.write("</td></tr>");
             }
@@ -94,7 +101,8 @@
 
         // start testing
         Node rootNode = repSession.getRootNode();
-        Node testResNode = (rootNode.hasNode("testing")) ? rootNode.getNode("testing") : rootNode.addNode("testing", "nt:unstructured");
+        Node testResNode = (rootNode.hasNode("testing")) ?
+                rootNode.getNode("testing") : rootNode.addNode("testing", "nt:unstructured");
         rootNode.save();
 
         out.write("<script>parent.statuswin.document.write(\"<html><head><title></title>\");");
@@ -102,7 +110,7 @@
         out.write("parent.statuswin.document.write('<body style=\"margin-top:5px;margin-left:10px;border-width:0px;font-size:11px;\">');");
         out.write("parent.statuswin.document.write(\"starting\");</script>");
         TestFinder testfinder = new TestFinder();
-        testfinder.find(getServletConfig().getServletContext().getResource(testJarPath).openStream(),
+        testfinder.find(getServletConfig().getServletContext().getResource(TEST_JCR_PATH).openStream(),
                 "TestAll.java");
         TckTestRunner runner = new TckTestRunner(out);
         String logStr = "<script>" +
@@ -113,19 +121,21 @@
         String interAStr = "<script>" +
                 "var cell=document.getElementById(\"{0}img\");" +
                 "cell.src=\"docroot/imgs/{1}.png\";" +
-                "window.scrollBy(0,20);" +
-                "cell=document.getElementById(\"{0}\");" +
-                "cell.setAttribute(\"title\",cell.getAttribute(\"title\")+\" time:{2}ms\");" +
+                "cell=document.getElementById(\"{0}img\");" +
+                "cell.setAttribute(\"title\",cell.getAttribute(\"title\")+\":{1} time:{2}ms\");" +
                 "</script>";
         runner.setInteractionString(interAStr);
-        Tester t = new Tester(testfinder, runner);
+        runner.setNewTestString("<script>window.scrollBy(0,21);</script>");
+        Tester t = new Tester(testfinder, runner, out);
+        t.setfinishedSuiteString("<script>parent.statuswin.document.write(\"finished {0} tests<br>\");window.scrollBy(0,40);</script>");
         long startMillies = System.currentTimeMillis();
         t.run();
         Node results = testResNode.addNode(String.valueOf(startMillies));
         testResNode.save();
         t.storeResults(results);
-        out.write("<script>parent.statuswin.document.write(\"...finished. Test took " + String.valueOf(System.currentTimeMillis() - startMillies) + "ms<br>\");</script>");
-        out.write("<script>parent.statuswin.scrollBy(0,20);</script>");
+        out.write("<script>parent.statuswin.document.write(\"...finished. Test took " +
+                String.valueOf(System.currentTimeMillis() - startMillies) + "ms<br>\");</script>");
+        out.write("<script>parent.statuswin.scrollBy(0,30);</script>");
         out.write("<script>parent.statuswin.document.write(\"</body></html>\");</script>");
     } else if (mode != null && mode.equals("view")) {
         out.write("<script>parent.statuswin.document.write(\"<html><head><title></title>\");");
@@ -134,7 +144,7 @@
         out.write("parent.statuswin.document.write(\"view test result<br>\");</script>");
 
         TestFinder tf = new TestFinder();
-        tf.find(getServletConfig().getServletContext().getResource(testJarPath).openStream(), "TestAll.java");
+        tf.find(getServletConfig().getServletContext().getResource(TEST_JCR_PATH).openStream(), "TestAll.java");
 
         // the test to be viewed is defined by the timestamp
         String testTimeInMs = request.getParameter("test");
@@ -168,7 +178,8 @@
             while (members.hasMoreElements()) {
                 TestSuite aTest = (TestSuite) members.nextElement();
 
-                out.write("<tr><td class=\"graph\" width=\"35%\" valign=\"top\">" + aTest.toString() + "</td><td>&nbsp;</td><td>");
+                out.write("<tr><td class=\"graph\" width=\"35%\" valign=\"top\">" +
+                        aTest.toString() + "</td><td>&nbsp;</td><td>");
 
                 Enumeration testMethods = aTest.tests();
                 while (testMethods.hasMoreElements()) {
@@ -206,7 +217,8 @@
                     String testTime = (testResultNode.hasProperty("testtime")) ?
                             String.valueOf(testResultNode.getProperty("testtime").getLong()) : "0";
 
-                    String errorMsg = (testResultNode.hasProperty("errrormsg")) ? "Error: " + testResultNode.getProperty("errrormsg").getString() : "";
+                    String errorMsg = (testResultNode.hasProperty("errrormsg")) ?
+                            "Error: " + testResultNode.getProperty("errrormsg").getString() : "";
                     errorMsg = errorMsg.replaceAll("'"," ");
                     errorMsg = errorMsg.replaceAll("\""," ");
                     errorMsg = errorMsg.replaceAll("\n"," ");
@@ -217,11 +229,9 @@
                             "Test name: " + methodname + "(" + aTest.getName() + ")<br>" +
                             "Time: " + testTime + "ms<br>" + errorMsg + "<br>";
 
-                    //out.write("<td  title=\"" + methodname + " time: " +
-                    //        testTime +"ms\" id=\"" + methodname + "(" + aTest.getName() + ")\" " +
-                    //        "onclick=\"parent.statuswin.document.write('" + testInfo + "');parent.statuswin.scrollBy(0,70);\">" +
-                    //        "<img src=\"docroot/imgs/" + color + ".png\" border=\"0\"></td>");
-                    out.write("<img src=\"docroot/imgs/" + color + ".png\" border=\"0\" onclick=\"parent.statuswin.document.write('" + testInfo + "');parent.statuswin.scrollBy(0,70);\"> ");
+                    out.write("<img src=\"docroot/imgs/" + color + ".png\" title=\"" + methodname + ": " + color + "\" border=\"0\" " +
+                            "onclick=\"parent.statuswin.document.write('" + testInfo + "');" +
+                            "parent.statuswin.scrollBy(0,70);\"> ");
                 }
                 out.write("</td></tr>");
             }

Modified: incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/index.jsp
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/index.jsp?view=diff&r1=156147&r2=156148
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/index.jsp (original)
+++ incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/index.jsp Fri Mar  4 02:01:30 2005
@@ -26,13 +26,27 @@
 %><html>
     <head><title>TCK for JSR170</title>
     <link rel="stylesheet" href="docroot/ui/default.css" type="text/css" title="style" />
+    <script>
+        function setImage(id, url) {
+		var logoImg = new Image();
+            logoImg.src = url;
+            var img = document.getElementById(id);
+
+            if (logoImg .width > 0) {
+                img.src= logoImg.src;
+            } else {
+                img.src = "docroot/imgs/banner_right.jpg";
+            }
+        }
+
+    </script>
     </head>
-    <body>
+    <body onload="setImage('logo', 'http://jsr170tools.day.com/crx/crx_main_files/banner_right.jpg');">
         <center>
             <table cellpadding="0" cellspacing="0" border="0" id="maintable">
                 <!-- banner -->
                 <tr>
-                    <td class="leadcell"><span class="leadcelltext">TCK for JSR 170<br>Content Repository Standard</span></td><td class="logocell"><a target="_blank" href="http://www.day.com" title="www.day.com"><img src="docroot/imgs/logo.png" width="238" height="100" border="0"></td>
+                    <td class="leadcell"><span class="leadcelltext">TCK for JSR 170<br>Content Repository Standard</span></td><td class="logocell"><a target="_blank" href="http://www.day.com" title="www.day.com"><img id="logo" border="0"></td>
                 </tr>
                 <tr>
                 <td colspan="2">



Mime
View raw message