Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ public class RedisProtocolTest {
@BeforeEach
public void setUp(TestInfo testInfo) {
int redisPort = NetUtils.getAvailablePort();
if (testInfo.getTestMethod().equals("testAuthRedis") || testInfo.getTestMethod().equals("testWrongAuthRedis")) {
String methodName = testInfo.getTestMethod().get().getName();
if ("testAuthRedis".equals(methodName) || ("testWrongAuthRedis".equals(methodName))) {
Comment thread
ralf0131 marked this conversation as resolved.
String password = "123456";
this.redisServer = RedisServer.builder().port(redisPort).setting("requirepass " + password).build();
this.registryUrl = URL.valueOf("redis://username:" + password + "@localhost:" + redisPort + "?db.index=0");
Expand Down Expand Up @@ -135,7 +136,7 @@ public void testWrongRedis() {
public void testExport() {
Assertions.assertThrows(UnsupportedOperationException.class, () -> protocol.export(protocol.refer(IDemoService.class, registryUrl)));
}
@Disabled

@Test
public void testAuthRedis() {
// default db.index=0
Expand Down Expand Up @@ -197,8 +198,8 @@ public void testAuthRedis() {

refer.destroy();
}
@Disabled
//@Test

@Test
public void testWrongAuthRedis() {
String password = "1234567";
this.registryUrl = this.registryUrl.setPassword(password);
Expand Down