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

Jean-Noël Rouvignac
01.49.2016 c1c96a177ed78de8eded9d6a244db5e3b812517c
Removed calls to TestCaseUtils.startFakeServer()
3 files modified
38 ■■■■■ changed files
opendj-server-legacy/src/test/java/org/opends/server/replication/protocol/ByteArrayTest.java 23 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/replication/server/changelog/file/ECLMultiDomainDBCursorTest.java 3 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/replication/server/changelog/file/ReplicationEnvironmentTest.java 12 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/replication/protocol/ByteArrayTest.java
@@ -21,25 +21,19 @@
import java.util.Iterator;
import java.util.zip.DataFormatException;
import org.forgerock.opendj.ldap.DN;
import org.opends.server.DirectoryServerTestCase;
import org.opends.server.TestCaseUtils;
import org.opends.server.replication.common.CSN;
import org.opends.server.replication.common.ServerState;
import org.forgerock.opendj.ldap.DN;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import static org.testng.Assert.*;
/**
 * Test for {@link ByteArrayBuilder} and {@link ByteArrayScanner} classes.
 */
/** Test for {@link ByteArrayBuilder} and {@link ByteArrayScanner} classes. */
@SuppressWarnings("javadoc")
public class ByteArrayTest extends DirectoryServerTestCase
{
  private static final class IntegerRange implements Iterator<Object[]>
  {
    private int next;
@@ -67,18 +61,6 @@
    public void remove() { /* unused */ }
  }
  @BeforeClass
  public void setup() throws Exception
  {
    TestCaseUtils.startFakeServer();
  }
  @AfterClass
  public void teardown() throws Exception
  {
    TestCaseUtils.shutdownFakeServer();
  }
  private final byte[] byteArray = new byte[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, };
  @Test
@@ -232,5 +214,4 @@
    final byte[] bytes = new ByteArrayBuilder().appendString("this is not a valid DN").toByteArray();
    new ByteArrayScanner(bytes).nextDN();
  }
}
opendj-server-legacy/src/test/java/org/opends/server/replication/server/changelog/file/ECLMultiDomainDBCursorTest.java
@@ -22,7 +22,6 @@
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.opends.server.DirectoryServerTestCase;
import org.opends.server.TestCaseUtils;
import org.opends.server.replication.common.ServerState;
import org.opends.server.replication.protocol.UpdateMsg;
import org.opends.server.replication.server.changelog.api.ChangelogException;
@@ -58,7 +57,6 @@
  @BeforeMethod
  public void setup() throws Exception
  {
    TestCaseUtils.startFakeServer();
    MockitoAnnotations.initMocks(this);
    options = new CursorOptions(GREATER_THAN_OR_EQUAL_TO_KEY, ON_MATCHING_KEY);
    multiDomainCursor = new MultiDomainDBCursor(domainDB, options);
@@ -68,7 +66,6 @@
  @AfterMethod
  public void teardown() throws Exception
  {
    TestCaseUtils.shutdownFakeServer();
    domainDB = null;
    multiDomainCursor = null;
    eclCursor.close();
opendj-server-legacy/src/test/java/org/opends/server/replication/server/changelog/file/ReplicationEnvironmentTest.java
@@ -21,9 +21,9 @@
import java.util.List;
import org.assertj.core.data.MapEntry;
import org.forgerock.opendj.ldap.DN;
import org.forgerock.util.time.TimeService;
import org.opends.server.DirectoryServerTestCase;
import org.opends.server.TestCaseUtils;
import org.opends.server.crypto.CryptoSuite;
import org.opends.server.replication.common.CSN;
import org.opends.server.replication.common.CSNGenerator;
@@ -32,10 +32,8 @@
import org.opends.server.replication.server.ReplicationServer;
import org.opends.server.replication.server.changelog.api.ChangeNumberIndexRecord;
import org.opends.server.replication.server.changelog.api.ChangelogException;
import org.forgerock.opendj.ldap.DN;
import org.opends.server.util.StaticUtils;
import org.opends.server.util.TimeThread;
import org.testng.annotations.AfterClass;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
@@ -61,16 +59,9 @@
  public void setUp() throws Exception
  {
    // This test suite depends on having the schema available for DN decoding.
    TestCaseUtils.startFakeServer();
    when(cryptoSuite.isEncrypted()).thenReturn(false);
  }
  @AfterClass
  public void tearDown() throws Exception
  {
    TestCaseUtils.shutdownFakeServer();
  }
  @AfterMethod
  public void cleanTestChangelogDirectory()
  {
@@ -366,5 +357,4 @@
    environment = new ReplicationEnvironment(rootPath.getAbsolutePath(), null, time);
    assertThat(environment.getCnIndexDBLastRotationTime()).isEqualTo(200L);
  }
}