This is an automated email from the ASF dual-hosted git repository.
huxing pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.git
The following commit(s) were added to refs/heads/master by this push:
new 576a413 Bring back redis auth UT (#3278)
576a413 is described below
commit 576a4139adf8185f01c3c722742dbd980ea75fbe
Author: Yuhao Bi <[email protected]>
AuthorDate: Sun Jan 20 09:04:31 2019 +0800
Bring back redis auth UT (#3278)
---
.../org/apache/dubbo/rpc/protocol/redis/RedisProtocolTest.java | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git
a/dubbo-rpc/dubbo-rpc-redis/src/test/java/org/apache/dubbo/rpc/protocol/redis/RedisProtocolTest.java
b/dubbo-rpc/dubbo-rpc-redis/src/test/java/org/apache/dubbo/rpc/protocol/redis/RedisProtocolTest.java
index 720f4f6..fd87e40 100644
---
a/dubbo-rpc/dubbo-rpc-redis/src/test/java/org/apache/dubbo/rpc/protocol/redis/RedisProtocolTest.java
+++
b/dubbo-rpc/dubbo-rpc-redis/src/test/java/org/apache/dubbo/rpc/protocol/redis/RedisProtocolTest.java
@@ -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))) {
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");
@@ -135,7 +136,7 @@ public class RedisProtocolTest {
public void testExport() {
Assertions.assertThrows(UnsupportedOperationException.class, () ->
protocol.export(protocol.refer(IDemoService.class, registryUrl)));
}
- @Disabled
+
@Test
public void testAuthRedis() {
// default db.index=0
@@ -197,8 +198,8 @@ public class RedisProtocolTest {
refer.destroy();
}
- @Disabled
- //@Test
+
+ @Test
public void testWrongAuthRedis() {
String password = "1234567";
this.registryUrl = this.registryUrl.setPassword(password);