Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.infinispan.api.tree;
 
import static org.testng.AssertJUnit.*;

Author(s):
Manik Surtani (manik AT jboss DOT org)
@Test(groups = "functional", testName = "api.tree.SyncReplTxTest")
public class SyncReplTxTest extends MultipleCacheManagersTest {
   private TreeCache<ObjectObjectcache1cache2;
   protected void createCacheManagers() throws Throwable {
      cb.invocationBatching().enable();
      createClusteredCaches(2, "replSync"cb);
      Cache c1 = cache(0, "replSync");
      Cache c2 = cache(1, "replSync");
       = new TreeCacheImpl<ObjectObject>(c1);
       = new TreeCacheImpl<ObjectObject>(c2);
   }
      mgr.begin();
      return mgr;
   }
      assertClusterSize("Should only be 2  caches in the cluster!!!", 2);
      Fqn f = Fqn.fromString("/test/data");
      String k = "key"v = "value";
      assertNull("Should be null".getRoot().getChild(f));
      assertNull("Should be null".getRoot().getChild(f));
      Node<ObjectObjectnode = .getRoot().addChild(f);
      assertNotNull("Should not be null"node);
      node.put(kv);
      tm.commit();
      assertEquals(vnode.get(k));
      assertEquals(v.get(fk));
      assertEquals("Should have replicated"v.get(fk));
   }
New to GrepCode? Check out our FAQ X