From e1cc3de403b42ef84bf5bd91af4e32cc40185a81 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Tue, 26 Sep 2006 20:30:39 +0000
Subject: [PATCH] Add several changes related to testing:

---
 opends/tests/unit-tests-testng/src/server/org/opends/server/TestCaseUtils.java |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/TestCaseUtils.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/TestCaseUtils.java
index 952e055..5d9e7bf 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/TestCaseUtils.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/TestCaseUtils.java
@@ -43,10 +43,13 @@
 import org.opends.server.core.InitializationException;
 import org.opends.server.loggers.Error;
 import org.opends.server.loggers.Debug;
+import org.opends.server.plugins.InvocationCounterPlugin;
 import org.opends.server.types.DN;
 import org.opends.server.types.FilePermission;
 import org.opends.server.types.OperatingSystem;
 
+import static org.testng.Assert.*;
+
 import static org.opends.server.util.ServerConstants.*;
 import static org.opends.server.util.StaticUtils.*;
 
@@ -118,6 +121,8 @@
       return;
     }
 
+    InvocationCounterPlugin.resetStartupCalled();
+
     // Get the build root and use it to create a test package directory.
     String buildRoot = System.getProperty(PROPERTY_BUILD_ROOT);
     File   testRoot  = new File(buildRoot + File.separator + "build" +
@@ -252,6 +257,9 @@
     Error.removeAllErrorLoggers(false);
     Debug.removeAllDebugLoggers(false);
     directoryServer.startServer();
+
+    assertTrue(InvocationCounterPlugin.startupCalled());
+
     SERVER_STARTED = true;
   }
 
@@ -263,7 +271,9 @@
   {
     if (SERVER_STARTED)
     {
+      InvocationCounterPlugin.resetShutdownCalled();
       DirectoryServer.shutDown("org.opends.server.TestCaseUtils", reason);
+      assertTrue(InvocationCounterPlugin.shutdownCalled());
       SERVER_STARTED = false;
     }
   }

--
Gitblit v1.10.0