From 6c7fa214b88ce9ad2d0ab03029ee38a8ab0e22f8 Mon Sep 17 00:00:00 2001
From: gbellato <gbellato@localhost>
Date: Tue, 27 Oct 2009 11:31:26 +0000
Subject: [PATCH] Fix some random failure in ReplicationServerTest where the tests are opening repetitively broker sessions to the Replication Server which can cause some normal failure.
---
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/ReplicationTestCase.java | 5 ++++-
1 files changed, 4 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 64eabd1..9e1aae1 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
@@ -372,6 +372,7 @@
try
{
Thread.sleep(1000);
+ rb.start();
} catch (InterruptedException ex)
{
fail("Error sleeping " + stackTraceToSingleLineString(ex));
@@ -382,7 +383,7 @@
{
// Timeout reached, end with error
fail("checkConnection: DS " + rb.getServerId() + " is not connected to "
- + "the RS port " + rsPort + " after " + secTimeout + " seconds.");
+ + "the RS port " + rsPort + " after " + secTimeout + " seconds.");
}
}
}
@@ -416,6 +417,7 @@
ArrayList<String> servers = new ArrayList<String>(1);
servers.add("localhost:" + port);
broker.start(servers);
+ checkConnection(30, broker, port);
if (timeout != 0)
broker.setSoTimeout(timeout);
@@ -455,6 +457,7 @@
ArrayList<String> servers = new ArrayList<String>(1);
servers.add("localhost:" + port);
broker.start(servers);
+ checkConnection(30, broker, port);
if (timeout != 0)
broker.setSoTimeout(timeout);
if (emptyOldChanges)
--
Gitblit v1.10.0