mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Matthew Swift
23.35.2011 0c01f3d3ee3608a2be9aa350bfcb2213de5e7c7d
opendj-sdk/opendj3/opendj-client-tools/src/test/java/com/sun/opends/sdk/tools/ToolsTestCase.java
@@ -39,7 +39,7 @@
 * the classes found directly under the package com.sun.opends.sdk.tools.
 */
@Test(groups = { "precommit", "tools", "sdk" }, sequential = true)
@Test(groups = { "precommit", "tools", "sdk" })
public abstract class ToolsTestCase extends OpenDJTestCase
{
}
opendj-sdk/opendj3/opendj-sdk/src/test/java/com/sun/opends/sdk/ldap/LDAPTestCase.java
@@ -39,7 +39,7 @@
 * classes found directly under the package com.sun.opends.sdk.ldap.
 */
@Test(groups = { "precommit", "ldap", "sdk" }, sequential = true)
@Test(groups = { "precommit", "ldap", "sdk" })
public abstract class LDAPTestCase extends OpenDJTestCase
{
}
opendj-sdk/opendj3/opendj-sdk/src/test/java/com/sun/opends/sdk/util/UtilTestCase.java
@@ -38,7 +38,7 @@
 * An abstract class that all util unit tests should extend. Util represents the
 * classes found directly under the package org.opends.sdk.util.
 */
@Test(groups = { "precommit", "util", "sdk" }, sequential = true)
@Test(groups = { "precommit", "util", "sdk" })
public abstract class UtilTestCase extends OpenDJTestCase
{
}
opendj-sdk/opendj3/opendj-sdk/src/test/java/org/opends/sdk/ByteSequenceTestCase.java
@@ -34,7 +34,6 @@
import java.util.Arrays;
import org.testng.Assert;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
@@ -44,20 +43,6 @@
 */
public abstract class ByteSequenceTestCase extends SdkTestCase
{
  /**
   * ByteSequence data provider that gets the ByteSequence implementation from
   * the abstract method.
   *
   * @return The array of ByteStrings and the bytes it should contain.
   */
  @DataProvider(name = "byteSequenceProvider")
  public Object[][] concreteByteSequenceProvider() throws Exception
  {
    return byteSequenceProvider();
  }
  @Test(dataProvider = "byteSequenceProvider")
  public void testByteAt(final ByteSequence bs, final byte[] ba)
  {
@@ -240,8 +225,4 @@
    Assert.assertTrue(bs.toString().equals(str));
  }
  protected abstract Object[][] byteSequenceProvider() throws Exception;
}
opendj-sdk/opendj3/opendj-sdk/src/test/java/org/opends/sdk/ByteStringBuilderTestCase.java
@@ -56,7 +56,6 @@
   *
   * @return The array of ByteStrings and the bytes it should contain.
   */
  @Override
  @DataProvider(name = "byteSequenceProvider")
  public Object[][] byteSequenceProvider() throws Exception
  {
opendj-sdk/opendj3/opendj-sdk/src/test/java/org/opends/sdk/ByteStringTestCase.java
@@ -48,7 +48,6 @@
   *
   * @return The array of ByteStrings and the bytes it should contain.
   */
  @Override
  @DataProvider(name = "byteSequenceProvider")
  public Object[][] byteSequenceProvider() throws Exception
  {
opendj-sdk/opendj3/opendj-sdk/src/test/java/org/opends/sdk/SdkTestCase.java
@@ -38,7 +38,7 @@
 * the classes found directly under the package org.opends.sdk.
 */
@Test(groups = { "precommit", "types", "sdk" }, sequential = true)
@Test(groups = { "precommit", "types", "sdk" })
public abstract class SdkTestCase extends OpenDJTestCase
{
}
opendj-sdk/opendj3/opendj-sdk/src/test/java/org/opends/sdk/TypesTestCase.java
@@ -41,7 +41,7 @@
 * the classes found directly under the package org.opends.sdk.
 */
@Test(groups = { "precommit", "types", "sdk" }, sequential = true)
@Test(groups = { "precommit", "types", "sdk" })
public class TypesTestCase extends SdkTestCase
{
  /**
opendj-sdk/opendj3/opendj-sdk/src/test/java/org/opends/sdk/asn1/ASN1ReaderTestCase.java
@@ -46,7 +46,7 @@
/**
 * An abstract base class for all ASN1Reader test cases.
 */
@Test(groups = { "precommit", "asn1", "sdk" }, sequential = true)
@Test(groups = { "precommit", "asn1", "sdk" })
public abstract class ASN1ReaderTestCase extends OpenDJTestCase
{
opendj-sdk/opendj3/opendj-sdk/src/test/java/org/opends/sdk/asn1/ASN1WriterTestCase.java
@@ -49,7 +49,7 @@
/**
 * An abstract base class for all ASN1Writer test cases.
 */
@Test(groups = { "precommit", "asn1", "sdk" }, sequential = true)
@Test(groups = { "precommit", "asn1", "sdk" })
public abstract class ASN1WriterTestCase extends OpenDJTestCase
{
opendj-sdk/opendj3/opendj-sdk/src/test/java/org/opends/sdk/controls/ControlsTestCase.java
@@ -42,7 +42,7 @@
 * org.opends.sdk.controls.
 */
@Test(groups = { "precommit", "controls", "sdk" }, sequential = true)
@Test(groups = { "precommit", "controls", "sdk" })
public abstract class ControlsTestCase extends OpenDJTestCase
{
  /**
opendj-sdk/opendj3/opendj-sdk/src/test/java/org/opends/sdk/ldif/LDIFTestCase.java
@@ -38,7 +38,7 @@
 * classes found directly under the package org.opends.sdk.ldif.
 */
@Test(groups = { "precommit", "types", "sdk" }, sequential = true)
@Test(groups = { "precommit", "types", "sdk" })
public abstract class LDIFTestCase extends OpenDJTestCase
{
}
opendj-sdk/opendj3/opendj-sdk/src/test/java/org/opends/sdk/requests/RequestsTestCase.java
@@ -40,7 +40,7 @@
 * org.opends.sdk.requests.
 */
@Test(groups = { "precommit", "requests", "sdk" }, sequential = true)
@Test(groups = { "precommit", "requests", "sdk" })
public abstract class RequestsTestCase extends OpenDJTestCase
{
}
opendj-sdk/opendj3/opendj-sdk/src/test/java/org/opends/sdk/responses/ResponsesTestCase.java
@@ -40,7 +40,7 @@
 * org.opends.sdk.responses.
 */
@Test(groups = { "precommit", "responses", "sdk" }, sequential = true)
@Test(groups = { "precommit", "responses", "sdk" })
public abstract class ResponsesTestCase extends OpenDJTestCase
{
}
opendj-sdk/opendj3/opendj-sdk/src/test/java/org/opends/sdk/schema/SchemaTestCase.java
@@ -36,7 +36,7 @@
/**
 * An abstract class that all schema unit test should extend.
 */
@Test(groups = { "precommit", "schema", "sdk" }, sequential = true)
@Test(groups = { "precommit", "schema", "sdk" })
public abstract class SchemaTestCase extends OpenDJTestCase
{
}
opendj-sdk/opendj3/opendj-testng-support/src/main/java/org/opendj/buildtools/testng/OpenDJTestCase.java
@@ -47,7 +47,7 @@
 * This class adds the ability to print error messages and automatically have
 * them include the class name.
 */
@Test(sequential = true)
@Test
public abstract class OpenDJTestCase
{
opendj-sdk/opendj3/opendj-testng-support/src/main/java/org/opendj/buildtools/testng/OpenDJTestListener.java
@@ -719,7 +719,8 @@
  private void enforceMethodHasAnnotation(final ITestResult tr)
  {
    // Only warn once per method.
    final Method testMethod = tr.getMethod().getMethod();
    final Method testMethod = tr.getMethod().getConstructorOrMethod()
        .getMethod();
    if (_checkedForAnnotation.contains(testMethod))
    {
      return;
@@ -772,23 +773,7 @@
      final String errorMessage = "The test class "
          + testClass.getName()
          + " does not have a @Test annotation.  "
          + "All test classes must have a @Test annotation, and this annotation must have "
          + "sequential=true set to ensure that tests for a single class are run together.";
      System.err.println("\n\nERROR: " + errorMessage + "\n\n");
      throw new RuntimeException(errorMessage);
    }
    final Test testAnnotation = classWithTestAnnotation
        .getAnnotation(Test.class);
    if (!testAnnotation.sequential())
    {
      // Give an error message that is as specific as possible.
      final String errorMessage = "The @Test annotation for class "
          + testClass.getName()
          + (classWithTestAnnotation.equals(testClass) ? " "
              : (", which is declared by class "
                  + classWithTestAnnotation.getName() + ", "))
          + "must include sequential=true to ensure that tests for a single class are run together.";
          + "All test classes must have a @Test annotation";
      System.err.println("\n\nERROR: " + errorMessage + "\n\n");
      throw new RuntimeException(errorMessage);
    }
@@ -1419,14 +1404,5 @@
    {
      System.err.print(threadStacksToString());
    }
    if (_classesWithTestsRunInterleaved.size() > 0)
    {
      System.err
          .println("WARNING:  Some of the test methods for multiple classes "
              + "were run out of order (i.e. interleaved with other classes).  Either "
              + "a class doesn't have the sequential=true annotation, which should "
              + "have been reported already or there has been a regression with TestNG.");
    }
  }
}