コード例 #1
0
 @Test
 public void testInvokeAllOperationSuccessfulWhenQuorumSizeMet() {
   HashSet<Integer> hashSet = new HashSet<Integer>();
   hashSet.add(123);
   EntryProcessorResult epr = cache1.invokeAll(hashSet, new SimpleEntryProcessor()).get(123);
   assertNull(epr);
 }
コード例 #2
0
 @Test(expected = EntryProcessorException.class)
 public void testInvokeAllOperationThrowsExceptionWhenQuorumSizeNotMet() {
   HashSet<Integer> hashSet = new HashSet<Integer>();
   hashSet.add(123);
   cache4.invokeAll(hashSet, new SimpleEntryProcessor()).get(123).get();
 }