Skip to content

Commit 1aad1a8

Browse files
further fix up acl, and later will create a PR for it
1 parent f30a3d6 commit 1aad1a8

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/test/java/io/lettuce/core/commands/AclCommandIntegrationTests.java

+7-3
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424

2525
import javax.inject.Inject;
2626

27+
import io.lettuce.core.api.StatefulRedisConnection;
28+
import io.lettuce.test.resource.DefaultRedisClient;
2729
import org.junit.jupiter.api.BeforeEach;
2830
import org.junit.jupiter.api.Tag;
2931
import org.junit.jupiter.api.Test;
@@ -66,9 +68,11 @@ protected AclCommandIntegrationTests(RedisCommands<String, String> redis) {
6668

6769
@BeforeEach
6870
void setUp() {
69-
redis.flushall();
70-
redis.aclUsers().stream().filter(o -> !"default".equals(o)).forEach(redis::aclDeluser);
71-
redis.aclLogReset();
71+
try ( StatefulRedisConnection<String,String> conn = DefaultRedisClient.get().connect(StringCodec.ASCII)) {
72+
conn.sync().flushall();
73+
conn.sync().aclUsers().stream().filter(o -> !"default".equals(o)).forEach(redis::aclDeluser);
74+
conn.sync().aclLogReset();
75+
}
7276
}
7377

7478
@Test

0 commit comments

Comments
 (0)