protected void failOptimistic(){
  IgniteCache<Object,Object> cache=jcache(0);
  try (Transaction tx=grid(0).transactions().txStart(OPTIMISTIC,REPEATABLE_READ)){
    cache.put(new TestKey(String.valueOf(++key)),"");
    tx.commit();
    assert false : "p2p marshalling failed, but error response was not sent";
  }
 catch (  IgniteException e) {
    assert X.hasCause(e,IOException.class);
  }
  assert readCnt.get() == 0;
}

protected void failOptimistic ( ) { IgniteCache < Object , Object > cache = jcache ( 0 ) ; try ( Transaction tx = grid ( 0 ) . transactions ( ) . txStart ( OPTIMISTIC , REPEATABLE_READ ) ) { cache . put ( new TestKey ( String . valueOf ( ++ key ) ) , "" ) ; tx . commit ( ) ; assert false : "p2p marshalling failed, but error response was not sent" ; } catch ( IgniteException e ) { assert X . hasCause ( e , IOException . class ) ; } assert readCnt . get ( ) == 0 ; }
sends put with optimistic lock and handles fail .
