You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by se...@apache.org on 2015/03/29 01:09:44 UTC
svn commit: r1669848 - in /directory/studio/trunk: ./ tests/
tests/test.integration.core/
tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/
Author: seelmann
Date: Sun Mar 29 00:09:43 2015
New Revision: 1669848
URL: http://svn.apache.org/r1669848
Log:
Migrate core integration tests (DIRSTUDIO-1021)
Added:
directory/studio/trunk/tests/pom-first.xml
directory/studio/trunk/tests/test.integration.core/build.properties
directory/studio/trunk/tests/test.integration.core/pom-first.xml
directory/studio/trunk/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/Activator.java
Removed:
directory/studio/trunk/tests/test.integration.core/Studio-Integration-Test-Core.launch
directory/studio/trunk/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/AutomatedSuite.java
Modified:
directory/studio/trunk/pom-first.xml
directory/studio/trunk/pom.xml
directory/studio/trunk/tests/pom.xml
directory/studio/trunk/tests/test.integration.core/pom.xml
directory/studio/trunk/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/JNDIConnectionWrapperTest.java
Modified: directory/studio/trunk/pom-first.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/pom-first.xml?rev=1669848&r1=1669847&r2=1669848&view=diff
==============================================================================
--- directory/studio/trunk/pom-first.xml (original)
+++ directory/studio/trunk/pom-first.xml Sun Mar 29 00:09:43 2015
@@ -36,6 +36,7 @@
<module>eclipse-target-platform/pom.xml</module>
<module>plugins/pom-first.xml</module>
<module>helps/pom-first.xml</module>
+ <module>tests/pom-first.xml</module>
</modules>
<build>
Modified: directory/studio/trunk/pom.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/pom.xml?rev=1669848&r1=1669847&r2=1669848&view=diff
==============================================================================
--- directory/studio/trunk/pom.xml (original)
+++ directory/studio/trunk/pom.xml Sun Mar 29 00:09:43 2015
@@ -113,6 +113,7 @@
<module>plugins</module>
<module>helps</module>
<module>features</module>
+ <module>tests</module>
<module>product</module>
</modules>
Added: directory/studio/trunk/tests/pom-first.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/tests/pom-first.xml?rev=1669848&view=auto
==============================================================================
--- directory/studio/trunk/tests/pom-first.xml (added)
+++ directory/studio/trunk/tests/pom-first.xml Sun Mar 29 00:09:43 2015
@@ -0,0 +1,159 @@
+<?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 xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.directory.studio</groupId>
+ <artifactId>parent-setup</artifactId>
+ <version>1-SNAPSHOT</version>
+ <relativePath>../pom-first.xml</relativePath>
+ </parent>
+
+ <artifactId>parent-tests</artifactId>
+ <name>Apache Directory Studio Test Plugins</name>
+ <version>2.0.0.qualifier</version>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>test.integration.core/pom-first.xml</module>
+<!-- <module>test.integration.ui</module> -->
+ </modules>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>default-resources</id>
+ <phase>none</phase>
+ <goals>
+ <goal>resources</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>default-testResources</id>
+ <phase>none</phase>
+ <goals>
+ <goal>testResources</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>default-compile</id>
+ <phase>none</phase>
+ <goals>
+ <goal>compile</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>default-testCompile</id>
+ <phase>none</phase>
+ <goals>
+ <goal>testCompile</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>default-test</id>
+ <phase>none</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>default-jar</id>
+ <phase>none</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-install-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>default-install</id>
+ <phase>none</phase>
+ <goals>
+ <goal>install</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>default-deploy</id>
+ <phase>none</phase>
+ <goals>
+ <goal>deploy</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>default-bundle</id>
+ <phase>none</phase>
+ <goals>
+ <goal>bundle</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>default-install</id>
+ <phase>none</phase>
+ <goals>
+ <goal>install</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>default-deploy</id>
+ <phase>none</phase>
+ <goals>
+ <goal>deploy</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
+
Modified: directory/studio/trunk/tests/pom.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/tests/pom.xml?rev=1669848&r1=1669847&r2=1669848&view=diff
==============================================================================
--- directory/studio/trunk/tests/pom.xml (original)
+++ directory/studio/trunk/tests/pom.xml Sun Mar 29 00:09:43 2015
@@ -24,6 +24,7 @@
<groupId>org.apache.directory.studio</groupId>
<artifactId>parent</artifactId>
<version>2.0.0-SNAPSHOT</version>
+ <relativePath>../</relativePath>
</parent>
<artifactId>parent-tests</artifactId>
@@ -32,7 +33,7 @@
<modules>
<module>test.integration.core</module>
- <module>test.integration.ui</module>
+<!-- <module>test.integration.ui</module> -->
</modules>
</project>
Added: directory/studio/trunk/tests/test.integration.core/build.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/tests/test.integration.core/build.properties?rev=1669848&view=auto
==============================================================================
--- directory/studio/trunk/tests/test.integration.core/build.properties (added)
+++ directory/studio/trunk/tests/test.integration.core/build.properties Sun Mar 29 00:09:43 2015
@@ -0,0 +1,3 @@
+source.. = src/main/java/
+bin.includes = META-INF/,\
+ .
Added: directory/studio/trunk/tests/test.integration.core/pom-first.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/tests/test.integration.core/pom-first.xml?rev=1669848&view=auto
==============================================================================
--- directory/studio/trunk/tests/test.integration.core/pom-first.xml (added)
+++ directory/studio/trunk/tests/test.integration.core/pom-first.xml Sun Mar 29 00:09:43 2015
@@ -0,0 +1,91 @@
+<?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 xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.directory.studio</groupId>
+ <artifactId>parent-tests</artifactId>
+ <version>2.0.0.qualifier</version>
+ <relativePath>../pom-first.xml</relativePath>
+ </parent>
+
+ <name>Apache Directory Studio Core Integration Tests</name>
+ <artifactId>org.apache.directory.studio.test.integration.core</artifactId>
+ <description/>
+ <packaging>bundle</packaging>
+
+ <build>
+ <!-- MANIFEST.MF Generation -->
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <manifestLocation>META-INF</manifestLocation>
+ <instructions>
+ <Bundle-SymbolicName>${project.artifactId};singleton:=true</Bundle-SymbolicName>
+ <Bundle-Localization>plugin</Bundle-Localization>
+ <Eclipse-LazyStart>true</Eclipse-LazyStart>
+ <Bundle-Activator>org.apache.directory.studio.test.integration.core.Activator</Bundle-Activator>
+
+ <Require-Bundle>org.junit;bundle-version="4.11.0",
+ org.apache.directory.server.apacheds-test-framework;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.server.annotations;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.server.core.annotations;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.server.protocol.ldap;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.asn1.api;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.ldap.client.api;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.ldap.codec.core;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.ldap.model;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.ldap.net.mina;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.util;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.mina.core;bundle-version="${org.apache.mina.bundleversion}",
+ org.apache.directory.studio.connection.core,
+ org.apache.directory.studio.common.core,
+ org.apache.directory.studio.ldifparser,
+ org.eclipse.core.runtime,
+ org.eclipse.ui</Require-Bundle>
+
+ <Import-Package>org.apache.commons.lang,
+ org.apache.commons.io,
+ org.apache.commons.codec.digest,
+ org.apache.http.conn.ssl,
+ org.dom4j,
+ org.dom4j.io</Import-Package>
+
+ </instructions>
+ </configuration>
+ <executions>
+ <execution>
+ <id>generate-manifest</id>
+ <phase>process-classes</phase>
+ <goals>
+ <goal>manifest</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
+
Modified: directory/studio/trunk/tests/test.integration.core/pom.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/tests/test.integration.core/pom.xml?rev=1669848&r1=1669847&r2=1669848&view=diff
==============================================================================
--- directory/studio/trunk/tests/test.integration.core/pom.xml (original)
+++ directory/studio/trunk/tests/test.integration.core/pom.xml Sun Mar 29 00:09:43 2015
@@ -24,344 +24,11 @@
<groupId>org.apache.directory.studio</groupId>
<artifactId>parent-tests</artifactId>
<version>2.0.0-SNAPSHOT</version>
+ <relativePath>../</relativePath>
</parent>
- <artifactId>test.integration.core</artifactId>
+ <artifactId>org.apache.directory.studio.test.integration.core</artifactId>
<name>Apache Directory Studio Core Integration Tests</name>
- <packaging>jar</packaging>
-
- <description></description>
-
- <profiles>
-
- <!--linux-x86 -->
- <profile>
- <id>linux-x86</id>
- <activation>
- <os>
- <arch>i386</arch>
- <family>unix</family>
- <name>linux</name>
- </os>
- </activation>
- <properties>
- <integration-regexp>^(ApacheDirectoryStudio-[^/]*)/(.*)$$</integration-regexp>
- <integration-cmdline-params>-os linux -ws gtk -arch x86</integration-cmdline-params>
- <integration-plugins-folder>plugins</integration-plugins-folder>
- </properties>
- </profile>
-
- <!-- linux-x86_64 -->
- <profile>
- <id>linux-x86_64</id>
- <activation>
- <os>
- <arch>amd64</arch>
- <family>unix</family>
- <name>linux</name>
- </os>
- </activation>
- <properties>
- <integration-regexp>^(ApacheDirectoryStudio-[^/]*)/(.*)$$</integration-regexp>
- <integration-cmdline-params>-os linux -ws gtk -arch x86_64</integration-cmdline-params>
- <integration-plugins-folder>plugins</integration-plugins-folder>
- </properties>
- </profile>
-
- <!-- linux-ppc -->
- <profile>
- <id>linux-ppc</id>
- <activation>
- <os>
- <arch>ppc</arch>
- <family>unix</family>
- <name>linux</name>
- </os>
- </activation>
- <properties>
- <integration-regexp>^(ApacheDirectoryStudio-[^/]*)/(.*)$$</integration-regexp>
- <integration-cmdline-params>-os linux -ws gtk -arch ppc</integration-cmdline-params>
- <integration-plugins-folder>plugins</integration-plugins-folder>
- </properties>
- </profile>
-
- <!--win32 -->
- <profile>
- <id>win32</id>
- <activation>
- <os>
- <arch>x86</arch>
- <family>windows</family>
- </os>
- </activation>
- <properties>
- <integration-regexp>^(ApacheDirectoryStudio-[^\\]*)\\(.*)$$</integration-regexp>
- <integration-cmdline-params>-os win32 -ws win32 -arch x86</integration-cmdline-params>
- <integration-plugins-folder>plugins</integration-plugins-folder>
- </properties>
- </profile>
-
- <!-- macosx -->
- <profile>
- <id>macosx</id>
- <activation>
- <os>
- <family>unix</family>
- <name>mac os x</name>
- </os>
- </activation>
- <properties>
- <integration-regexp>^(ApacheDirectoryStudio-[^/]*)/(.*)$$</integration-regexp>
- <integration-cmdline-params>-os macosx -ws carbon -arch x86</integration-cmdline-params>
- <integration-plugins-folder>Apache Directory Studio.app/Contents/Resources/Java/plugins</integration-plugins-folder>
- </properties>
- </profile>
-
- <!-- launch core tests using eclipse test framework -->
- <profile>
- <id>integration-core</id>
- <build>
- <plugins>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>integration-core</id>
- <phase>test</phase>
- <configuration>
- <tasks>
-
- <!-- cleanup and recreate test-sandbox -->
- <delete dir="target/test-sandbox"/>
- <mkdir dir="target/test-sandbox"/>
- <mkdir dir="target/test-sandbox/workspace"/>
-
- <!-- copy complete eclipse distribution to test-sandbox -->
- <copy todir="target/test-sandbox">
- <fileset dir="${eclipse-home}">
- </fileset>
- </copy>
-
- <!-- copy apache directory studio plugins to test-sandbox -->
- <copy todir="target/test-sandbox">
- <fileset dir="../target/distributions">
- <include name="ApacheDirectoryStudio-*/**/plugins/org.apache.directory*"/>
- </fileset>
- <regexpmapper from="${integration-regexp}" to="\2"/>
- </copy>
-
- <!-- copy SWTbot and eclipse testing plugins to test-sandbox -->
- <copy todir="target/test-sandbox/${integration-plugins-folder}">
- <fileset dir="resources/test-plugins">
- <include name="**/*" />
- </fileset>
- </copy>
-
- <!-- copy test-integration-core plugin to test-sandbox -->
- <copy todir="target/test-sandbox/${integration-plugins-folder}">
- <fileset dir="target">
- <include name="test.integration.core-*.jar" />
- </fileset>
- </copy>
-
- <!-- launch the tests -->
- <java fork="true" failonerror="true" classname="org.eclipse.core.launcher.Main">
- <arg line="${integration-cmdline-params} -application org.eclipse.test.coretestapplication -data target/test-sandbox/workspace formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,target/test-sandbox/workspace/test-result.xml -testPluginName org.apache.directory.studio.test.integration.core -className org.apache.directory.studio.test.integration.core.AutomatedSuite"/>
- <classpath>
- <fileset dir="target/test-sandbox">
- <include name="**/org.eclipse.equinox.launcher_*.jar"/>
- </fileset>
- </classpath>
- </java>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- </plugins>
- </build>
- </profile>
- </profiles>
-
- <build>
- <resources>
- <resource>
- <directory>.</directory>
- <includes>
- <include>plugin.xml</include>
- </includes>
- </resource>
- <resource>
- <directory>src/main/resources</directory>
- </resource>
- </resources>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-eclipse-plugin</artifactId>
- <configuration>
- <skip>false</skip>
- <pde>true</pde>
- <additionalProjectnatures>
- <projectnature>org.eclipse.pde.PluginNature</projectnature>
- <projectnature>org.eclipse.jdt.core.javanature</projectnature>
- </additionalProjectnatures>
- <classpathContainers>
- <classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER</classpathContainer>
- <classpathContainer>org.eclipse.pde.core.requiredPlugins</classpathContainer>
- </classpathContainers>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.directory.studio</groupId>
- <artifactId>studio-maven-plugin</artifactId>
- <configuration>
- <skip>false</skip>
- <createManifest>true</createManifest>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>prepare-jar-package</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <manifestFile>META-INF/MANIFEST.MF</manifestFile>
- <addMavenDescriptor>false</addMavenDescriptor>
- </archive>
- </configuration>
- </plugin>
- <!-- MANIFEST.MF Generation -->
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
- <configuration>
- <manifestLocation>META-INF</manifestLocation>
- <instructions>
- <Bundle-SymbolicName>${project.groupId}.${project.artifactId};singleton:=true</Bundle-SymbolicName>
- <Bundle-Localization>plugin</Bundle-Localization>
- <Require-Bundle>org.eclipse.core.runtime,
- org.apache.directory.studio.common.core,
- org.apache.directory.studio.connection.core,
- org.junit
- </Require-Bundle>
- <Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
- <Embed-Directory>lib</Embed-Directory>
- <Embed-StripGroup>true</Embed-StripGroup>
- <Embed-Transitive>true</Embed-Transitive>
- <_exportcontents>!*</_exportcontents>
- <Import-Package>!</Import-Package>
- <Private-Package>!</Private-Package>
- </instructions>
- </configuration>
- <executions>
- <execution>
- <phase>process-classes</phase>
- <goals>
- <goal>manifest</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <!-- No tests to run -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <skip>false</skip>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.directory.server</groupId>
- <artifactId>apacheds-server-unit</artifactId>
- <version>1.5.5</version>
- </dependency>
- <dependency>
- <groupId>org.apache.directory.server</groupId>
- <artifactId>apacheds-core-integ</artifactId>
- <version>1.5.5</version>
- </dependency>
- <dependency>
- <groupId>org.apache.directory.api</groupId>
- <artifactId>shared-ldap</artifactId>
- <version>0.9.15</version>
- </dependency>
- <dependency>
- <groupId>org.apache.directory.api</groupId>
- <artifactId>shared-asn1</artifactId>
- <version>0.9.15</version>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.directory.studio</groupId>
- <artifactId>common.core</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.directory.studio</groupId>
- <artifactId>connection.core</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>org.eclipse</groupId>
- <artifactId>osgi</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.eclipse.equinox</groupId>
- <artifactId>common</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.eclipse.equinox</groupId>
- <artifactId>registry</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.eclipse.core</groupId>
- <artifactId>runtime</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.eclipse.equinox</groupId>
- <artifactId>preferences</artifactId>
- <scope>provided</scope>
- </dependency>
-
- </dependencies>
+ <packaging>eclipse-test-plugin</packaging>
+ <description />
</project>
Added: directory/studio/trunk/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/Activator.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/Activator.java?rev=1669848&view=auto
==============================================================================
--- directory/studio/trunk/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/Activator.java (added)
+++ directory/studio/trunk/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/Activator.java Sun Mar 29 00:09:43 2015
@@ -0,0 +1,51 @@
+/*
+ * 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.studio.test.integration.core;
+
+
+import org.apache.directory.api.ldap.codec.protocol.mina.LdapProtocolCodecActivator;
+import org.eclipse.core.runtime.Plugin;
+import org.osgi.framework.BundleContext;
+
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends Plugin
+{
+
+ /**
+ * @see org.eclipse.core.runtime.Plugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start( BundleContext context ) throws Exception
+ {
+ super.start( context );
+ LdapProtocolCodecActivator.lazyStart();
+ }
+
+
+ /**
+ * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop( BundleContext context ) throws Exception
+ {
+ }
+
+}
Modified: directory/studio/trunk/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/JNDIConnectionWrapperTest.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/JNDIConnectionWrapperTest.java?rev=1669848&r1=1669847&r2=1669848&view=diff
==============================================================================
--- directory/studio/trunk/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/JNDIConnectionWrapperTest.java (original)
+++ directory/studio/trunk/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/JNDIConnectionWrapperTest.java Sun Mar 29 00:09:43 2015
@@ -21,6 +21,11 @@
package org.apache.directory.studio.test.integration.core;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
import java.net.ConnectException;
import java.net.UnknownHostException;
@@ -31,7 +36,10 @@ import javax.naming.NamingException;
import javax.naming.directory.SearchControls;
import javax.naming.directory.SearchResult;
-import org.apache.directory.server.unit.AbstractServerTest;
+import org.apache.directory.server.annotations.CreateLdapServer;
+import org.apache.directory.server.annotations.CreateTransport;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
import org.apache.directory.studio.common.core.jobs.StudioProgressMonitor;
import org.apache.directory.studio.connection.core.Connection;
import org.apache.directory.studio.connection.core.Connection.AliasDereferencingMethod;
@@ -43,6 +51,8 @@ import org.apache.directory.studio.conne
import org.apache.directory.studio.connection.core.io.ConnectionWrapper;
import org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper;
import org.eclipse.core.runtime.NullProgressMonitor;
+import org.junit.Test;
+import org.junit.runner.RunWith;
/**
@@ -51,20 +61,16 @@ import org.eclipse.core.runtime.NullProg
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
* @version $Rev$, $Date$
*/
-public class JNDIConnectionWrapperTest extends AbstractServerTest
+@RunWith(FrameworkRunner.class)
+@CreateLdapServer(transports =
+ { @CreateTransport(protocol = "LDAP"), @CreateTransport(protocol = "LDAPS") })
+public class JNDIConnectionWrapperTest extends AbstractLdapTestUnit
{
- /**
- * Initialize the server.
- */
- public void setUp() throws Exception
- {
- super.setUp();
- }
-
/**
* Tests connecting to the server.
*/
+ @Test
public void testConnect()
{
StudioProgressMonitor monitor = getProgressMonitor();
@@ -89,6 +95,7 @@ public class JNDIConnectionWrapperTest e
/**
* Test failed connections to the server.
*/
+ @Test
public void testConnectFailures()
{
StudioProgressMonitor monitor = null;
@@ -129,6 +136,7 @@ public class JNDIConnectionWrapperTest e
/**
* Test binding to the server.
*/
+ @Test
public void testBind()
{
StudioProgressMonitor monitor = getProgressMonitor();
@@ -155,6 +163,7 @@ public class JNDIConnectionWrapperTest e
/**
* Test failed binds to the server.
*/
+ @Test
public void testBindFailures()
{
StudioProgressMonitor monitor = null;
@@ -164,9 +173,8 @@ public class JNDIConnectionWrapperTest e
// simple auth without principal and credential
monitor = getProgressMonitor();
- connectionParameter = new ConnectionParameter( null, "localhost", ldapServer.getPort(),
- EncryptionMethod.NONE, NetworkProvider.JNDI, AuthenticationMethod.SIMPLE, "uid=admin", "invalid", null,
- true, null );
+ connectionParameter = new ConnectionParameter( null, "localhost", ldapServer.getPort(), EncryptionMethod.NONE,
+ NetworkProvider.JNDI, AuthenticationMethod.SIMPLE, "uid=admin", "invalid", null, true, null );
connection = new Connection( connectionParameter );
connectionWrapper = connection.getConnectionWrapper();
connectionWrapper.connect( monitor );
@@ -177,9 +185,8 @@ public class JNDIConnectionWrapperTest e
// simple auth with invalid principal and credential
monitor = getProgressMonitor();
- connectionParameter = new ConnectionParameter( null, "localhost", ldapServer.getPort(),
- EncryptionMethod.NONE, NetworkProvider.JNDI, AuthenticationMethod.SIMPLE, "uid=admin,ou=system", "bar",
- null, true, null );
+ connectionParameter = new ConnectionParameter( null, "localhost", ldapServer.getPort(), EncryptionMethod.NONE,
+ NetworkProvider.JNDI, AuthenticationMethod.SIMPLE, "uid=admin,ou=system", "bar", null, true, null );
connection = new Connection( connectionParameter );
connectionWrapper = connection.getConnectionWrapper();
connectionWrapper.connect( monitor );
@@ -193,6 +200,7 @@ public class JNDIConnectionWrapperTest e
/**
* Test searching.
*/
+ @Test
public void testSearch()
{
StudioProgressMonitor monitor = null;
@@ -202,9 +210,8 @@ public class JNDIConnectionWrapperTest e
// simple auth without principal and credential
monitor = getProgressMonitor();
- connectionParameter = new ConnectionParameter( null, "localhost", ldapServer.getPort(),
- EncryptionMethod.NONE, NetworkProvider.JNDI, AuthenticationMethod.SIMPLE, "uid=admin,ou=system", "secret",
- null, true, null );
+ connectionParameter = new ConnectionParameter( null, "localhost", ldapServer.getPort(), EncryptionMethod.NONE,
+ NetworkProvider.JNDI, AuthenticationMethod.SIMPLE, "uid=admin,ou=system", "secret", null, true, null );
connection = new Connection( connectionParameter );
connectionWrapper = connection.getConnectionWrapper();
connectionWrapper.connect( monitor );
@@ -219,15 +226,6 @@ public class JNDIConnectionWrapperTest e
}
- /**
- * Shutdown the server.
- */
- public void tearDown() throws Exception
- {
- super.tearDown();
- }
-
-
private StudioProgressMonitor getProgressMonitor()
{
StudioProgressMonitor monitor = new StudioProgressMonitor( new NullProgressMonitor() );