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.
34 lines
1.1 KiB
34 lines
1.1 KiB
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()); |
|
} |
|
} |