From 7d8a5959f17b8358931542ce090ce28b7042a4b7 Mon Sep 17 00:00:00 2001
From: pgamba <pgamba@localhost>
Date: Wed, 03 Oct 2007 13:49:46 +0000
Subject: [PATCH] Fix for Init On lIne unit test failure. After adding a task, the task state is tested and can be already successfully completed
---
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/ReplicationTestCase.java | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/ReplicationTestCase.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/ReplicationTestCase.java
index 566dda4..7359563 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/ReplicationTestCase.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/ReplicationTestCase.java
@@ -867,8 +867,18 @@
}
}
- assertEquals(taskState, expectedTaskState, "Task State:" + taskState +
+ if ((expectedTaskState == TaskState.RUNNING)
+ && (taskState == TaskState.COMPLETED_SUCCESSFULLY))
+ {
+ // We usually wait the running state after adding the task
+ // and if the task is fast enough then it may be already done
+ // and we can go on.
+ }
+ else
+ {
+ assertEquals(taskState, expectedTaskState, "Task State:" + taskState +
" Expected task state:" + expectedTaskState);
+ }
}
catch(Exception e)
{
--
Gitblit v1.10.0