From f0dfc7fb8cc2214da0eaa9f36a5fd858793cb4af Mon Sep 17 00:00:00 2001
From: boli <boli@localhost>
Date: Thu, 18 Jan 2007 23:21:48 +0000
Subject: [PATCH] Added logError methods to the task class that will add the messages to the log-messages attribute as well as writing it to the error log. Enabled test in TasksTestCase to make sure log-messages attribute is not empty when the task fails.

---
 opends/tests/unit-tests-testng/src/server/org/opends/server/tasks/TasksTestCase.java |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/tasks/TasksTestCase.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/tasks/TasksTestCase.java
index 75b85dc..e77193d 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/tasks/TasksTestCase.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/tasks/TasksTestCase.java
@@ -147,10 +147,10 @@
     resultEntry.getAttributeValues(logMessagesType,
                                    DirectoryStringSyntax.DECODER,
                                    logMessages);
-    if (logMessages.size() == 0)
+    if (taskState != TaskState.COMPLETED_SUCCESSFULLY &&
+        logMessages.size() == 0)
     {
-      // NYI see issue 647.
-//      fail("No log messages were written to the task entry");
+      fail("No log messages were written to the task entry on a failed task");
     }
   }
 

--
Gitblit v1.10.0