use of com.hazelcast.transaction.TransactionContext in project hazelcast by hazelcast.
the class ClientTransactionalMapQuorumTest method testTxRemoveValueSucceedsWhenQuorumSizeMet.
@Test
public void testTxRemoveValueSucceedsWhenQuorumSizeMet() {
TransactionContext transaction = getTransactionFromMajority();
TransactionalMap<Object, Object> map = getMap(transaction);
map.remove("foo", "bar");
transaction.commitTransaction();
}
use of com.hazelcast.transaction.TransactionContext in project hazelcast by hazelcast.
the class ClientTransactionalMapQuorumTest method testTxSetThrowsExceptionWhenQuorumSizeNotMet.
@Test
public void testTxSetThrowsExceptionWhenQuorumSizeNotMet() {
TransactionContext transaction = getTransactionFromMinority();
TransactionalMap<Object, Object> map = getMap(transaction);
expectedException.expect(QuorumException.class);
map.set("foo", "bar");
}
use of com.hazelcast.transaction.TransactionContext in project hazelcast by hazelcast.
the class ClientTransactionalMapQuorumTest method testTxPutSucceedsWhenQuorumSizeMet.
@Test
public void testTxPutSucceedsWhenQuorumSizeMet() {
TransactionContext transaction = getTransactionFromMajority();
TransactionalMap<Object, Object> map = getMap(transaction);
map.put("foo", "bar");
transaction.commitTransaction();
}
use of com.hazelcast.transaction.TransactionContext in project hazelcast by hazelcast.
the class ClientTransactionalMapQuorumTest method testTxPutWithTTLThrowsExceptionWhenQuorumSizeNotMet.
@Test
public void testTxPutWithTTLThrowsExceptionWhenQuorumSizeNotMet() {
TransactionContext transaction = getTransactionFromMinority();
TransactionalMap<Object, Object> map = getMap(transaction);
expectedException.expect(QuorumException.class);
map.put("foo", "bar", 10, TimeUnit.SECONDS);
}
use of com.hazelcast.transaction.TransactionContext in project hazelcast by hazelcast.
the class ClientTransactionalMapQuorumTest method testTxGetSucceedsWhenQuorumSizeMet.
@Test
public void testTxGetSucceedsWhenQuorumSizeMet() {
TransactionContext transaction = getTransactionFromMajority();
TransactionalMap<Object, Object> map = getMap(transaction);
map.get("foo");
transaction.commitTransaction();
}
Aggregations