public static RemoteCacheManager getRemoteCacheManager() { ConfigurationBuilder conf = new ConfigurationBuilder(); conf.AddServer().Host("127.0.0.1").Port(11222); conf.AddServer().Host("127.0.0.1").Port(11322) .ConnectionTimeout(90000).SocketTimeout(6000) .NearCache().Mode(NearCacheMode.INVALIDATED).MaxEntries(10); conf.BalancingStrategyProducer(d); marshaller = new JBasicMarshaller(); conf.Marshaller(marshaller); return(ClusterTestSuite.getRemoteCacheManager(conf.Build())); }
public void permanentCacheTest() { String cacheName = "cache4PermanentTest"; var flags = new HashSet <AdminFlag>(); flags.Add(AdminFlag.PERMANENT); remoteManager.Administration().WithFlags(flags).CreateCache <string, string>(cacheName, "template"); remoteManager.Stop(); ClusterTestSuite.server1.ShutDownHotrodServer(); ClusterTestSuite.server2.ShutDownHotrodServer(); ClusterTestSuite.server1.StartHotRodServer(); ClusterTestSuite.server2.StartHotRodServer(); remoteManager = ClusterTestSuite.getRemoteCacheManager(); var ex = Assert.Throws <Infinispan.HotRod.Exceptions.HotRodClientException>(() => { remoteManager.Administration().CreateCache <string, string>(cacheName, "template"); }); StringAssert.Contains("ISPN000507:", ex.Message); }
public void BeforeAnyTest() { ClusterTestSuite.EnsureServersUp(); remoteManager = getRemoteCacheManager(); }