use of com.hazelcast.transaction.TransactionContext in project hazelcast by hazelcast.
the class ClientTransactionalMapQuorumTest method testTxRemoveThrowsExceptionWhenQuorumSizeNotMet.
@Test
public void testTxRemoveThrowsExceptionWhenQuorumSizeNotMet() {
TransactionContext transaction = getTransactionFromMinority();
TransactionalMap<Object, Object> map = getMap(transaction);
expectedException.expect(QuorumException.class);
map.remove("foo");
}
use of com.hazelcast.transaction.TransactionContext in project hazelcast by hazelcast.
the class ClientTransactionalMapQuorumTest method testTxContainsKeyThrowsExceptionWhenQuorumSizeNotMet.
@Test
public void testTxContainsKeyThrowsExceptionWhenQuorumSizeNotMet() {
TransactionContext transaction = getTransactionFromMinority();
TransactionalMap<Object, Object> map = getMap(transaction);
expectedException.expect(QuorumException.class);
map.containsKey("foo");
}
use of com.hazelcast.transaction.TransactionContext in project hazelcast by hazelcast.
the class ClientTransactionalMapQuorumTest method testTxReplaceExpectedValueSucceedsWhenQuorumSizeMet.
@Test
public void testTxReplaceExpectedValueSucceedsWhenQuorumSizeMet() {
TransactionContext transaction = getTransactionFromMajority();
TransactionalMap<Object, Object> map = getMap(transaction);
map.replace("foo", "bar", "baz");
transaction.commitTransaction();
}
use of com.hazelcast.transaction.TransactionContext in project hazelcast by hazelcast.
the class ClientTransactionalMapQuorumTest method testTxKeySetWithPredicateSucceedsWhenQuorumSizeMet.
@Test
public void testTxKeySetWithPredicateSucceedsWhenQuorumSizeMet() {
TransactionContext transaction = getTransactionFromMajority();
TransactionalMap<Object, Object> map = getMap(transaction);
map.keySet(TruePredicate.INSTANCE);
transaction.commitTransaction();
}
use of com.hazelcast.transaction.TransactionContext in project hazelcast by hazelcast.
the class ClientTransactionalMapQuorumTest method testTxRemoveSucceedsWhenQuorumSizeMet.
@Test
public void testTxRemoveSucceedsWhenQuorumSizeMet() {
TransactionContext transaction = getTransactionFromMajority();
TransactionalMap<Object, Object> map = getMap(transaction);
map.remove("foo");
transaction.commitTransaction();
}
Aggregations