From c0a5d19fa897c532ced3e13e01f18f869270e9a0 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Thu, 26 Mar 2015 16:01:25 +0000
Subject: [PATCH] Pass ServerContext object down method calls to the pluggable backend Importer class.

---
 opendj-server-legacy/src/test/java/org/opends/server/backends/SchemaBackendTestCase.java |   22 +++++++++-------------
 1 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/opendj-server-legacy/src/test/java/org/opends/server/backends/SchemaBackendTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/backends/SchemaBackendTestCase.java
index aaf884e..e20c71d 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/backends/SchemaBackendTestCase.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/backends/SchemaBackendTestCase.java
@@ -26,6 +26,11 @@
  */
 package org.opends.server.backends;
 
+import static org.opends.server.protocols.internal.InternalClientConnection.*;
+import static org.opends.server.protocols.internal.Requests.*;
+import static org.opends.server.util.StaticUtils.*;
+import static org.testng.Assert.*;
+
 import java.io.File;
 import java.util.Map;
 
@@ -47,11 +52,6 @@
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
-import static org.opends.server.protocols.internal.InternalClientConnection.*;
-import static org.opends.server.protocols.internal.Requests.*;
-import static org.opends.server.util.StaticUtils.*;
-import static org.testng.Assert.*;
-
 /**
  * A set of test cases for the schema backend.
  */
@@ -5401,8 +5401,7 @@
    * @throws  Exception  If an unexpected problem occurs.
    */
   @Test
-  public void testImportLDIF()
-         throws Exception
+  public void testImportLDIF() throws Exception
   {
     File tempFile = File.createTempFile("schema", "testImportLDIF");
     tempFile.deleteOnExit();
@@ -5413,10 +5412,8 @@
 
     schemaBackend.exportLDIF(exportConfig);
 
-    LDIFImportConfig importConfig =
-         new LDIFImportConfig(tempFile.getAbsolutePath());
-
-    schemaBackend.importLDIF(importConfig);
+    LDIFImportConfig importConfig = new LDIFImportConfig(tempFile.getAbsolutePath());
+    schemaBackend.importLDIF(importConfig, DirectoryServer.getInstance().getServerContext());
   }
 
 
@@ -5427,8 +5424,7 @@
    * @throws  Exception  If an unexpected problem occurs.
    */
   @Test
-  public void testGetComponentEntryDN()
-         throws Exception
+  public void testGetComponentEntryDN() throws Exception
   {
     DN configEntryDN =
             DN.valueOf("ds-cfg-backend-id=schema,cn=Backends,cn=config");

--
Gitblit v1.10.0