You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
package com.fanruan.api.cluster.state;
|
|
|
|
|
|
|
|
import com.fanruan.api.Prepare;
|
|
|
|
import com.fr.store.impl.redis.RedisConfig;
|
|
|
|
import org.junit.Assert;
|
|
|
|
import org.junit.Test;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @author Dylan.Liu
|
|
|
|
* @version 10.0
|
|
|
|
* Created by Dylan.Liu on 2019/12/3
|
|
|
|
*/
|
|
|
|
public class RedisConfigKitTest extends Prepare {
|
|
|
|
|
|
|
|
@Test
|
|
|
|
public void testGetTableNamePrefix() {
|
|
|
|
|
|
|
|
RedisConfig.getInstance().setTableNamePrefix("test_table name_prefix");
|
|
|
|
Assert.assertEquals("test_table name_prefix", RedisConfigKit.getTableNamePrefix());
|
|
|
|
|
|
|
|
RedisConfig.getInstance().setTableNamePrefix("test_table name_prefix2");
|
|
|
|
Assert.assertEquals("test_table name_prefix2", RedisConfigKit.getTableNamePrefix());
|
|
|
|
}
|
|
|
|
|
|
|
|
@Test
|
|
|
|
public void testGetExpireStateRemoveInterval() {
|
|
|
|
|
|
|
|
RedisConfig.getInstance().setExpireStateRemoveInterval(111);
|
|
|
|
Assert.assertEquals(111, RedisConfig.getInstance().getExpireStateRemoveInterval());
|
|
|
|
|
|
|
|
RedisConfig.getInstance().setExpireStateRemoveInterval(222);
|
|
|
|
Assert.assertEquals(222, RedisConfig.getInstance().getExpireStateRemoveInterval());
|
|
|
|
}
|
|
|
|
}
|