public void Initialize() { servers = "10.10.10.10:6379,20.20.20.20:6379,30.30.30.30:6379,40.40.40.40:6379"; ketamaContinuum = new KetamaContinuum(servers); serverList = ketamaContinuum.ServerToString(); Console.WriteLine(serverList); }
//Confirms that the sync server function is working public void ConfirmSyncKetamaServerWorks() { string servers = "10.10.10.10:6379"; KetamaContinuum ketamaContinuum = new KetamaContinuum(servers); serverList = ketamaContinuum.ServerToString(); Assert.AreEqual("10.10.10.10:6379", serverList); ketamaContinuum.SyncServerConections("10.10.10.10:6379,20.20.20.20:6379"); serverList = ketamaContinuum.ServerToString(); Assert.AreEqual("10.10.10.10:6379,20.20.20.20:6379", serverList); ketamaContinuum.SyncServerConections("10.10.10.10:6379,20.20.20.20:6379,30.30.30.30:6379,40.40.40.40:6379"); serverList = ketamaContinuum.ServerToString(); Assert.AreEqual("10.10.10.10:6379,20.20.20.20:6379,30.30.30.30:6379,40.40.40.40:6379", serverList); ketamaContinuum.SyncServerConections("10.10.10.10:6379"); serverList = ketamaContinuum.ServerToString(); Assert.AreEqual("10.10.10.10:6379", serverList); }