public void BgRewriteAofTest() { using(var mock = new MockConnector("localhost", 9999, "+OK\r\n")) using(var redis = new RedisClient(mock)) { Assert.True(redis.BgRewriteAof()); Assert.Equal("*1\r\n$12\r\nBGREWRITEAOF\r\n", mock.GetMessage()); } }
public void BgRewriteAofTest() { using (var mock = new FakeRedisSocket("+OK\r\n")) using (var redis = new RedisClient(mock, new DnsEndPoint("fakehost", 9999))) { Assert.AreEqual("OK", redis.BgRewriteAof()); Assert.AreEqual("*1\r\n$12\r\nBGREWRITEAOF\r\n", mock.GetMessage()); } }
public void BgRewriteAofTest() { using (var mock = new MockConnector("MockHost", 9999, "+OK\r\n")) using (var redis = new RedisClient(mock)) { Assert.AreEqual("OK", redis.BgRewriteAof()); Assert.AreEqual("*1\r\n$12\r\nBGREWRITEAOF\r\n", mock.GetMessage()); } }
public void BgRewriteAofTest() { using (var mock = new FakeRedisSocket("+OK\r\n")) using (var redis = new RedisClient(mock, new DnsEndPoint("fakehost", 9999))) { Assert.AreEqual("OK", redis.BgRewriteAof()); Assert.AreEqual("*1\r\n$12\r\nBGREWRITEAOF\r\n", mock.GetMessage()); } }
public void AOFSave() { redisClient.BgRewriteAof(); }