public void GlobalCleanup() { _client.DestroyCache(_cacheA.Name); _client.DestroyCache(_cacheB.Name); _client.DestroyCache(_cacheC.Name); _client.DestroyCache(_cacheD.Name); _client.DestroyCache(_cacheE.Name); _client.DestroyCache(_cacheF.Name); _client.DestroyCache(_cacheG.Name); _client.DestroyCache(_cacheH.Name); _client.DestroyCache(_cacheI.Name); _client.DestroyCache(_cacheJ.Name); _client.Dispose(); }
public void TestReconnectToOldNodeDisablesPartitionAwareness() { IIgniteClient client = null; var clientConfiguration = new IgniteClientConfiguration(JavaServer.GetClientConfiguration()) { EnablePartitionAwareness = true, Logger = new ListLogger(new ConsoleLogger { MinLevel = LogLevel.Trace }) }; try { using (StartNewServer()) { client = Ignition.StartClient(clientConfiguration); var cache = client.GetOrCreateCache <int, int>(TestContext.CurrentContext.Test.Name); cache.Put(1, 42); Assert.AreEqual(42, cache.Get(1)); Assert.IsTrue(client.GetConfiguration().EnablePartitionAwareness); } Assert.Catch(() => client.GetCacheNames()); using (StartOldServer()) { var cache = client.GetOrCreateCache <int, int>(TestContext.CurrentContext.Test.Name); cache.Put(1, 42); Assert.AreEqual(42, cache.Get(1)); Assert.IsFalse(client.GetConfiguration().EnablePartitionAwareness); var log = ((ListLogger)client.GetConfiguration().Logger).Entries .FirstOrDefault(e => e.Message.StartsWith("Partition")); Assert.IsNotNull(log); Assert.AreEqual("Partition awareness has been disabled: " + "server protocol version 1.0.0 is lower than required 1.4.0", log.Message); } } finally { if (client != null) { client.Dispose(); } } }
public void GlobalCleanup() { _client?.Dispose(); _javaServer?.Dispose(); }
public void GlobalCleanup() { Client.DestroyCache(Cache.Name); Client.Dispose(); }