Search in sources :

Example 11 with LenEofType

use of com.ctrip.xpipe.redis.core.protocal.protocal.LenEofType in project x-pipe by ctripcorp.

the class DefaultRedisSlaveTest method testWaitRdbNormal.

@SuppressWarnings("resource")
@Test
public void testWaitRdbNormal() {
    redisSlave.waitForRdbDumping();
    sleep(waitDumpMilli / 2);
    redisSlave.beginWriteRdb(new LenEofType(1000), 2);
    sleep(waitDumpMilli);
    Assert.assertTrue(redisSlave.isOpen());
}
Also used : LenEofType(com.ctrip.xpipe.redis.core.protocal.protocal.LenEofType) Test(org.junit.Test) AbstractRedisKeeperTest(com.ctrip.xpipe.redis.keeper.AbstractRedisKeeperTest)

Aggregations

LenEofType (com.ctrip.xpipe.redis.core.protocal.protocal.LenEofType)11 AbstractRedisKeeperTest (com.ctrip.xpipe.redis.keeper.AbstractRedisKeeperTest)9 Test (org.junit.Test)9 DefaultKeeperConfig (com.ctrip.xpipe.redis.keeper.config.DefaultKeeperConfig)3 RdbStore (com.ctrip.xpipe.redis.core.store.RdbStore)2 ByteBuf (io.netty.buffer.ByteBuf)2 File (java.io.File)2 FileSize (com.ctrip.xpipe.api.utils.FileSize)1 AbstractExceptionLogTask (com.ctrip.xpipe.concurrent.AbstractExceptionLogTask)1 DefaultEndPoint (com.ctrip.xpipe.endpoint.DefaultEndPoint)1 ReferenceFileRegion (com.ctrip.xpipe.netty.filechannel.ReferenceFileRegion)1 EofMarkType (com.ctrip.xpipe.redis.core.protocal.protocal.EofMarkType)1 EofType (com.ctrip.xpipe.redis.core.protocal.protocal.EofType)1 FullSyncListener (com.ctrip.xpipe.redis.core.store.FullSyncListener)1 MetaStore (com.ctrip.xpipe.redis.core.store.MetaStore)1 ReplicationStore (com.ctrip.xpipe.redis.core.store.ReplicationStore)1 DefaultControllableFile (com.ctrip.xpipe.utils.DefaultControllableFile)1 SizeControllableFile (com.ctrip.xpipe.utils.SizeControllableFile)1 IOException (java.io.IOException)1 CountDownLatch (java.util.concurrent.CountDownLatch)1