You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2008/07/29 08:02:10 UTC
svn commit: r680629 [2/2] - in /directory/apacheds/branches/bigbang: ./
server-integ/ server-integ/.settings/ server-integ/src/
server-integ/src/main/ server-integ/src/main/java/
server-integ/src/main/java/org/ server-integ/src/main/java/org/apache/ se...
Added: directory/apacheds/branches/bigbang/server-integ/src/main/java/org/apache/directory/server/integ/state/TestServerState.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-integ/src/main/java/org/apache/directory/server/integ/state/TestServerState.java?rev=680629&view=auto
==============================================================================
--- directory/apacheds/branches/bigbang/server-integ/src/main/java/org/apache/directory/server/integ/state/TestServerState.java (added)
+++ directory/apacheds/branches/bigbang/server-integ/src/main/java/org/apache/directory/server/integ/state/TestServerState.java Mon Jul 28 23:02:08 2008
@@ -0,0 +1,110 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.directory.server.integ.state;
+
+
+import java.io.IOException;
+import javax.naming.NamingException;
+
+import org.apache.directory.server.integ.InheritableServerSettings;
+import org.junit.internal.runners.TestClass;
+import org.junit.internal.runners.TestMethod;
+import org.junit.runner.notification.RunNotifier;
+
+
+/**
+ * The interface representing a state in the lifecycle of a service
+ * during integration testing.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface TestServerState
+{
+ /**
+ * Action where an attempt is made to create the service. Service
+ * creation in this system is the combined instantiation and
+ * configuration which takes place when the factory is used to get
+ * a new instance of the service.
+ *
+ * @param settings The inherited settings
+ * @throws NamingException if we can't create the service
+ */
+ void create( InheritableServerSettings settings ) throws NamingException;
+
+
+ /**
+ * Action where an attempt is made to destroy the service. This
+ * entails nulling out reference to it and triggering garbage
+ * collection.
+ */
+ void destroy();
+
+
+ /**
+ * Action where an attempt is made to erase the contents of the
+ * working directory used by the service for various files including
+ * partition database files.
+ *
+ * @throws IOException on errors while deleting the working directory
+ */
+ void cleanup() throws IOException;
+
+
+ /**
+ * Action where an attempt is made to start up the service.
+ *
+ * @throws Exception on failures to start the core directory service
+ */
+ void startup() throws Exception;
+
+
+ /**
+ * Action where an attempt is made to shutdown the service.
+ *
+ * @throws Exception on failures to stop the core directory service
+ */
+ void shutdown() throws Exception;
+
+
+ /**
+ * Action where an attempt is made to run a test against the service.
+ *
+ * All annotations should have already been processed for
+ * InheritableServerSettings yet they and others can be processed since we have
+ * access to the method annotations below
+ *
+ * @param testClass the class whose test method is to be run
+ * @param testMethod the test method which is to be run
+ * @param notifier a notifier to report failures to
+ * @param settings the inherited settings and annotations associated with
+ * the test method
+ */
+ void test( TestClass testClass, TestMethod testMethod, RunNotifier notifier, InheritableServerSettings settings );
+
+
+ /**
+ * Action where an attempt is made to revert the service to it's
+ * initial start up state by using a previous snapshot.
+ *
+ * @throws Exception on failures to revert the state of the core
+ * directory service
+ */
+ void revert() throws Exception;
+}
Propchange: directory/apacheds/branches/bigbang/server-integ/src/main/java/org/apache/directory/server/integ/state/TestServerState.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: directory/apacheds/branches/bigbang/server-integ/src/site/site.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-integ/src/site/site.xml?rev=680629&view=auto
==============================================================================
--- directory/apacheds/branches/bigbang/server-integ/src/site/site.xml (added)
+++ directory/apacheds/branches/bigbang/server-integ/src/site/site.xml Mon Jul 28 23:02:08 2008
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!--
+ @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+-->
+<project name="${project.name}">
+ <bannerLeft>
+ <name>${project.name}</name>
+ </bannerLeft>
+ <publishDate position="navigation-bottom" format="dd-MM-yyyy HH:mm" />
+ <body>
+ <menu name="Parent">
+ <item name="Apache Directory ApacheDS" href="../index.html" />
+ </menu>
+ <menu ref="reports" />
+ </body>
+</project>
Propchange: directory/apacheds/branches/bigbang/server-integ/src/site/site.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: directory/apacheds/branches/bigbang/server-integ/src/test/resources/log4j.properties
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-integ/src/test/resources/log4j.properties?rev=680629&view=auto
==============================================================================
--- directory/apacheds/branches/bigbang/server-integ/src/test/resources/log4j.properties (added)
+++ directory/apacheds/branches/bigbang/server-integ/src/test/resources/log4j.properties Mon Jul 28 23:02:08 2008
@@ -0,0 +1,24 @@
+#############################################################################
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#############################################################################
+log4j.rootCategory=OFF, stdout
+
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=[%d{HH:mm:ss}] %p [%c] - %m%n
+log4j.logger.org.apache.directory.server.core.integ=ERROR
+
+#log4j.logger.org.apache.directory.server.core.partition.PartitionIT=DEBUG
Propchange: directory/apacheds/branches/bigbang/server-integ/src/test/resources/log4j.properties
------------------------------------------------------------------------------
svn:eol-style = native
Added: directory/apacheds/branches/bigbang/server-integ/src/test/resources/org/apache/directory/server/core/normalization/testDireve308Example.ldif
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-integ/src/test/resources/org/apache/directory/server/core/normalization/testDireve308Example.ldif?rev=680629&view=auto
==============================================================================
--- directory/apacheds/branches/bigbang/server-integ/src/test/resources/org/apache/directory/server/core/normalization/testDireve308Example.ldif (added)
+++ directory/apacheds/branches/bigbang/server-integ/src/test/resources/org/apache/directory/server/core/normalization/testDireve308Example.ldif Mon Jul 28 23:02:08 2008
@@ -0,0 +1,30 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# EXAMPLE.COM is reserved for testing according to this RFC:
+#
+# http://www.rfc-editor.org/rfc/rfc2606.txt
+#
+
+dn: ou=direct report view,ou=system
+objectClass: organizationalUnit
+ou: direct report view
+
+dn: ou=corporate category\, operations,ou=direct report view,ou=system
+objectClass: organizationalUnit
+ou: corporate category\, operations
Added: directory/apacheds/branches/bigbang/server-integ/src/test/resources/org/apache/directory/server/core/schema/DummyComparator.bytecode
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-integ/src/test/resources/org/apache/directory/server/core/schema/DummyComparator.bytecode?rev=680629&view=auto
==============================================================================
Binary file - no diff available.
Propchange: directory/apacheds/branches/bigbang/server-integ/src/test/resources/org/apache/directory/server/core/schema/DummyComparator.bytecode
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/apacheds/branches/bigbang/server-integ/src/test/resources/org/apache/directory/server/core/schema/DummyNormalizer.bytecode
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-integ/src/test/resources/org/apache/directory/server/core/schema/DummyNormalizer.bytecode?rev=680629&view=auto
==============================================================================
Binary file - no diff available.
Propchange: directory/apacheds/branches/bigbang/server-integ/src/test/resources/org/apache/directory/server/core/schema/DummyNormalizer.bytecode
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/apacheds/branches/bigbang/server-integ/src/test/resources/org/apache/directory/server/core/schema/DummySyntaxChecker.bytecode
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-integ/src/test/resources/org/apache/directory/server/core/schema/DummySyntaxChecker.bytecode?rev=680629&view=auto
==============================================================================
Binary file - no diff available.
Propchange: directory/apacheds/branches/bigbang/server-integ/src/test/resources/org/apache/directory/server/core/schema/DummySyntaxChecker.bytecode
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/apacheds/branches/bigbang/server-integ/src/test/resources/org/apache/directory/server/core/schema/nonspecific.ldif
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-integ/src/test/resources/org/apache/directory/server/core/schema/nonspecific.ldif?rev=680629&view=auto
==============================================================================
--- directory/apacheds/branches/bigbang/server-integ/src/test/resources/org/apache/directory/server/core/schema/nonspecific.ldif (added)
+++ directory/apacheds/branches/bigbang/server-integ/src/test/resources/org/apache/directory/server/core/schema/nonspecific.ldif Mon Jul 28 23:02:08 2008
@@ -0,0 +1,40 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# EXAMPLE.COM is reserved for testing according to this RFC:
+#
+# http://www.rfc-editor.org/rfc/rfc2606.txt
+#
+
+dn: cn=person0,ou=system
+objectClass: person
+cn: person0
+sn: sn_person0
+
+dn: cn=person1,ou=system
+objectClass: organizationalPerson
+cn: person1
+sn: sn_person1
+seealso: cn=Good One,ou=people,o=sevenSeas
+seealso:: Y249QmFkIEXDqWvDoCxvdT1wZW9wbGUsbz1zZXZlblNlYXM=
+
+
+dn: cn=person2,ou=system
+objectClass: inetOrgPerson
+cn: person2
+sn: sn_person2