-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test according to design doc with Redis 8.0-M03
- Loading branch information
Showing
8 changed files
with
99 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 72 additions & 0 deletions
72
...t/java/redis/clients/jedis/modules/RedisModulesConsolidatedConfigurationCommandsTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
package redis.clients.jedis.modules; | ||
|
||
import static org.hamcrest.MatcherAssert.assertThat; | ||
import static org.hamcrest.Matchers.aMapWithSize; | ||
import static org.junit.Assert.assertEquals; | ||
import static org.junit.Assert.assertThrows; | ||
|
||
import java.util.Collections; | ||
import org.hamcrest.Matchers; | ||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
import org.junit.runners.Parameterized; | ||
import redis.clients.jedis.RedisProtocol; | ||
import redis.clients.jedis.commands.jedis.JedisCommandsTestBase; | ||
import redis.clients.jedis.exceptions.JedisDataException; | ||
|
||
@RunWith(Parameterized.class) | ||
public class RedisModulesConsolidatedConfigurationCommandsTest extends JedisCommandsTestBase { | ||
|
||
public RedisModulesConsolidatedConfigurationCommandsTest(RedisProtocol redisProtocol) { | ||
super(redisProtocol); | ||
} | ||
|
||
@org.junit.Ignore(value = "failing") | ||
@Test | ||
public void setSearchConfigGloballyTest() { | ||
final String configParam = "search-default-dialect"; | ||
// confirm default - Redis 8.0-M03 has no default dialect | ||
//assertEquals(Collections.singletonMap(configParam, "1"), jedis.configGet(configParam)); | ||
assertEquals(Collections.emptyMap(), jedis.configGet(configParam)); | ||
|
||
try { | ||
assertEquals("OK", jedis.configSet(configParam, "2")); | ||
assertEquals(Collections.singletonMap(configParam, "2"), jedis.configGet(configParam)); | ||
|
||
} finally { | ||
// restore to default | ||
assertEquals("OK", jedis.configSet(configParam, "1")); | ||
} | ||
} | ||
|
||
@Test | ||
public void setReadOnlySearchConfigTest() { | ||
JedisDataException de = assertThrows(JedisDataException.class, () -> jedis.configSet("search-max-doctablesize", "10")); | ||
assertThat(de.getMessage(), Matchers.not(Matchers.emptyOrNullString())); | ||
} | ||
|
||
@Test | ||
public void getSearchConfigSettingTest() { | ||
assertThat(jedis.configGet("search-timeout"), aMapWithSize(0)); // Redis 8.0-M03 has no default value | ||
} | ||
|
||
@Test | ||
public void getTSConfigSettingTest() { | ||
assertThat(jedis.configGet("ts-retention-policy"), aMapWithSize(1)); | ||
} | ||
|
||
@Test | ||
public void getBFConfigSettingTest() { | ||
assertThat(jedis.configGet("bf-error-rate"), aMapWithSize(1)); | ||
} | ||
|
||
@Test | ||
public void getCFConfigSettingTest() { | ||
assertThat(jedis.configGet("cf-initial-size"), aMapWithSize(1)); | ||
} | ||
|
||
@Test | ||
public void getAllConigSettings() { | ||
assertThat(jedis.configGet("*").size(), Matchers.greaterThan(0)); | ||
} | ||
} |
34 changes: 0 additions & 34 deletions
34
src/test/java/redis/clients/jedis/modules/RedisModulesControlCommandsTest.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
{ | ||
"standalone0": { | ||
"password": "foobared", | ||
"tls": false, | ||
"endpoints": [ | ||
"redis://localhost:6379" | ||
|