From 6b1e5bb8307072f97456360ef7d07409cbabd557 Mon Sep 17 00:00:00 2001
From: coulbeck <coulbeck@localhost>
Date: Fri, 15 Sep 2006 16:53:05 +0000
Subject: [PATCH] Add a @AfterSuite annotated method to the DirectoryServerTestCase to shut down the server after tests have been run. This eleiminates a problem running tests from within IDEA where the test process had to be stopped manually after the tests had completed.
---
opends/tests/unit-tests-testng/src/server/org/opends/server/DirectoryServerTestCase.java | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/DirectoryServerTestCase.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/DirectoryServerTestCase.java
index dd8a53d..3fc04d8 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/DirectoryServerTestCase.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/DirectoryServerTestCase.java
@@ -26,7 +26,7 @@
*/
package org.opends.server;
-import org.testng.annotations.Test;
+import org.testng.annotations.AfterSuite;
import java.io.PrintStream;
@@ -41,6 +41,11 @@
// The print stream to use for printing error messages.
private PrintStream errorStream;
+ @AfterSuite
+ public final void shutdownServer() {
+ TestCaseUtils.shutdownServer("The current test suite has finished.");
+ }
+
/**
* Creates a new instance of this test case with the provided name.
*/
--
Gitblit v1.10.0