|
From: <tob...@us...> - 2014-06-16 22:10:34
|
Revision: 8491
http://sourceforge.net/p/bigdata/code/8491
Author: tobycraig
Date: 2014-06-16 22:10:27 +0000 (Mon, 16 Jun 2014)
Log Message:
-----------
Added test for HA1 with LBS
Modified Paths:
--------------
branches/BIGDATA_RELEASE_1_3_0/bigdata-jini/src/test/com/bigdata/journal/jini/ha/AbstractHA3JournalServerTestCase.java
branches/BIGDATA_RELEASE_1_3_0/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA1JournalServer.java
Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-jini/src/test/com/bigdata/journal/jini/ha/AbstractHA3JournalServerTestCase.java
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-jini/src/test/com/bigdata/journal/jini/ha/AbstractHA3JournalServerTestCase.java 2014-06-16 21:12:25 UTC (rev 8490)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-jini/src/test/com/bigdata/journal/jini/ha/AbstractHA3JournalServerTestCase.java 2014-06-16 22:10:27 UTC (rev 8491)
@@ -2807,6 +2807,25 @@
}
/**
+ * Commits update transaction with LBS after awaiting quorum.
+ */
+ protected void simpleTransactionLBS() throws IOException, Exception {
+
+ // Await quorum meet.
+ final long token = quorum.awaitQuorum(awaitQuorumTimeout,
+ TimeUnit.MILLISECONDS);
+
+ // Figure out which service is the leader.
+ final HAGlue leader = quorum.getClient().getLeader(token);
+
+ // Wait until that service is ready to act as the leader.
+ assertEquals(HAStatusEnum.Leader, awaitNSSAndHAReady(leader));
+
+ simpleTransaction_noQuorumCheckLBS(leader);
+
+ }
+
+ /**
* Immediately issues a simple transaction against the service.
*
* @param leader
@@ -2823,6 +2842,22 @@
}
/**
+ * Immediately issues a simple transaction against the service with LBS.
+ *
+ * @param leader
+ * The service (must be the leader to succeed).
+ *
+ * @throws IOException
+ * @throws Exception
+ */
+ protected void simpleTransaction_noQuorumCheckLBS(final HAGlue leader)
+ throws IOException, Exception {
+
+ simpleTransaction_noQuorumCheck(leader, true/* useLoadBalancer */);
+
+ }
+
+ /**
* Immediately issues a simple transaction against the service.
*
* @param haGlue
Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA1JournalServer.java
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA1JournalServer.java 2014-06-16 21:12:25 UTC (rev 8490)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA1JournalServer.java 2014-06-16 22:10:27 UTC (rev 8491)
@@ -123,6 +123,19 @@
}
+ public void testSimpleTransactionLBS() throws Exception {
+
+ doStartA();
+
+ serverA.awaitHAReady(2, TimeUnit.SECONDS);
+
+ awaitCommitCounter(1, new HAGlue[] { serverA });
+
+ simpleTransactionLBS();
+
+ awaitCommitCounter(2, new HAGlue[] { serverA });
+ }
+
public void testMultiTransaction() throws Exception {
doStartA();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|