summaryrefslogtreecommitdiff
path: root/qpid/java/bdbstore/systests
diff options
context:
space:
mode:
authorAlex Rudyy <orudyy@apache.org>2014-06-03 08:25:16 +0000
committerAlex Rudyy <orudyy@apache.org>2014-06-03 08:25:16 +0000
commitf418f3407dd6e080d2c4234e75ab6813f2ace4ea (patch)
treebd7069626e803a3432812f447e08b05a801e44f0 /qpid/java/bdbstore/systests
parent0cf0c4e013554eff08e542f6f5ce64cc062ada2e (diff)
downloadqpid-python-f418f3407dd6e080d2c4234e75ab6813f2ace4ea.tar.gz
QPID-5715: Use coalescing sync committer for message store transactions only when syncronization policy SYNC is set for local transactions in BDB HA virtual host
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1599445 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/bdbstore/systests')
-rw-r--r--qpid/java/bdbstore/systests/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHostRestTest.java20
1 files changed, 11 insertions, 9 deletions
diff --git a/qpid/java/bdbstore/systests/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHostRestTest.java b/qpid/java/bdbstore/systests/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHostRestTest.java
index c120a3d63c..ca762cd86d 100644
--- a/qpid/java/bdbstore/systests/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHostRestTest.java
+++ b/qpid/java/bdbstore/systests/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHostRestTest.java
@@ -95,23 +95,25 @@ public class BDBHAVirtualHostRestTest extends QpidRestTestCase
public void testSetLocalTransactionSynchronizationPolicy() throws Exception
{
- assertSetTransactionSynchronizationPolicy(LOCAL_TRANSACTION_SYNCRONIZATION_POLICY);
- }
+ Map<String, Object> hostAttributes = waitForAttributeChanged(_virtualhostUrl, VirtualHost.STATE, State.ACTIVE.name());
+ assertEquals("Unexpected synchronization policy before change", "SYNC", hostAttributes.get(LOCAL_TRANSACTION_SYNCRONIZATION_POLICY));
- public void testSetRemoteTransactionSynchronizationPolicy() throws Exception
- {
- assertSetTransactionSynchronizationPolicy(REMOTE_TRANSACTION_SYNCRONIZATION_POLICY);
+ Map<String, Object> newPolicy = Collections.<String, Object>singletonMap(LOCAL_TRANSACTION_SYNCRONIZATION_POLICY, "NO_SYNC");
+ getRestTestHelper().submitRequest(_virtualhostUrl, "PUT", newPolicy, 200);
+
+ hostAttributes = getRestTestHelper().getJsonAsSingletonList(_virtualhostUrl);
+ assertEquals("Unexpected synchronization policy after change", "NO_SYNC", hostAttributes.get(LOCAL_TRANSACTION_SYNCRONIZATION_POLICY));
}
- private void assertSetTransactionSynchronizationPolicy(String policyAttribute) throws Exception, IOException
+ public void testSetRemoteTransactionSynchronizationPolicy() throws Exception
{
Map<String, Object> hostAttributes = waitForAttributeChanged(_virtualhostUrl, VirtualHost.STATE, State.ACTIVE.name());
- assertEquals("Unexpected synchronization policy before change", "NO_SYNC", hostAttributes.get(policyAttribute));
+ assertEquals("Unexpected synchronization policy before change", "NO_SYNC", hostAttributes.get(REMOTE_TRANSACTION_SYNCRONIZATION_POLICY));
- Map<String, Object> newPolicy = Collections.<String, Object>singletonMap(policyAttribute, "SYNC");
+ Map<String, Object> newPolicy = Collections.<String, Object>singletonMap(REMOTE_TRANSACTION_SYNCRONIZATION_POLICY, "SYNC");
getRestTestHelper().submitRequest(_virtualhostUrl, "PUT", newPolicy, 200);
hostAttributes = getRestTestHelper().getJsonAsSingletonList(_virtualhostUrl);
- assertEquals("Unexpected synchronization policy after change", "SYNC", hostAttributes.get(policyAttribute));
+ assertEquals("Unexpected synchronization policy after change", "SYNC", hostAttributes.get(REMOTE_TRANSACTION_SYNCRONIZATION_POLICY));
}
}