From 7d6ad91eab5e9396ef35df6fa00af320de1777ee Mon Sep 17 00:00:00 2001
From: pgamba <pgamba@localhost>
Date: Thu, 24 Dec 2009 18:46:54 +0000
Subject: [PATCH] 

---
 opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/server/ReplicationServerTest.java |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/server/ReplicationServerTest.java b/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/server/ReplicationServerTest.java
index 5bfe689..d677524 100644
--- a/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/server/ReplicationServerTest.java
+++ b/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/server/ReplicationServerTest.java
@@ -642,6 +642,9 @@
           clientBroker[i].stop();
       }
 
+      assertTrue(reader.errDetails==null,
+          reader.exc + " " + reader.errDetails);
+
       replicationServer.clearDb();
       TestCaseUtils.initializeTestBackend(true);
     }
@@ -658,7 +661,7 @@
    * This test is configured for a relatively low stress
    * but can be changed using TOTAL_MSG and THREADS consts.
    */
-  @Test(dependsOnMethods = { "searchBackend"})
+  @Test(enabled=true, dependsOnMethods = { "searchBackend"})
   public void multipleWriterMultipleReader() throws Exception
   {
     debugInfo("Starting multipleWriterMultipleReader");
@@ -723,8 +726,6 @@
         if (reader[i] != null)
           reader[i].join(10000);
         // kill the thread in case it is not yet stopped.
-        assertTrue(reader[i].exc==null,
-            reader[i].exc + " " + reader[i].errDetails);
         reader[i].interrupt();
       }
       debugInfo("multipleWriterMultipleReader reader's ended, now stop brokers");
@@ -737,6 +738,13 @@
 
       replicationServer.clearDb();
       TestCaseUtils.initializeTestBackend(true);
+
+      for (int i = 0; i< THREADS; i++)
+      {
+        if (reader[i] != null)
+          assertTrue(reader[i].errDetails==null,
+            reader[i].exc + " " + reader[i].errDetails);
+      }
     }
     debugInfo("Ending multipleWriterMultipleReader");
   }
@@ -1136,7 +1144,7 @@
     private int numMsgRcv = 0;
     private final int numMsgExpected;
     public Exception exc;
-    public String errDetails;
+    public String errDetails = null;
 
     /**
      * Creates a new Stress Test Reader
@@ -1192,7 +1200,6 @@
             "a BrokerReader received an Exception" + e.getMessage()
             + stackTraceToSingleLineString(e);
       }
-      assert(numMsgRcv >= numMsgExpected);
     }
   }
 

--
Gitblit v1.10.0