From c1c96a177ed78de8eded9d6a244db5e3b812517c Mon Sep 17 00:00:00 2001
From: Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Wed, 01 Jun 2016 10:07:13 +0000
Subject: [PATCH] Removed calls to TestCaseUtils.startFakeServer()
---
opendj-server-legacy/src/test/java/org/opends/server/replication/server/changelog/file/ECLMultiDomainDBCursorTest.java | 3 ---
opendj-server-legacy/src/test/java/org/opends/server/replication/server/changelog/file/ReplicationEnvironmentTest.java | 12 +-----------
opendj-server-legacy/src/test/java/org/opends/server/replication/protocol/ByteArrayTest.java | 23 ++---------------------
3 files changed, 3 insertions(+), 35 deletions(-)
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/replication/protocol/ByteArrayTest.java b/opendj-server-legacy/src/test/java/org/opends/server/replication/protocol/ByteArrayTest.java
index c85a532..a10c53f 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/replication/protocol/ByteArrayTest.java
+++ b/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();
}
-
}
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/replication/server/changelog/file/ECLMultiDomainDBCursorTest.java b/opendj-server-legacy/src/test/java/org/opends/server/replication/server/changelog/file/ECLMultiDomainDBCursorTest.java
index db6392e..6ef8d2f 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/replication/server/changelog/file/ECLMultiDomainDBCursorTest.java
+++ b/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();
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/replication/server/changelog/file/ReplicationEnvironmentTest.java b/opendj-server-legacy/src/test/java/org/opends/server/replication/server/changelog/file/ReplicationEnvironmentTest.java
index 26dd93f..5f882e6 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/replication/server/changelog/file/ReplicationEnvironmentTest.java
+++ b/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);
}
-
}
--
Gitblit v1.10.0