Skip to content

Commit 3c205de

Browse files
committed
fix ports in monitor test
1 parent d45f3e5 commit 3c205de

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

.github/workflows/test-redis-enterprise.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ jobs:
4747
- name: Test
4848
env:
4949
RE_CLUSTER: true
50-
USE_CONTAINERIZED_REDIS: true
5150
run: |
5251
go test \
5352
--ginkgo.skip-file="ring_test.go" \

main_test.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,15 +128,17 @@ var _ = BeforeSuite(func() {
128128
redisPort = redisStackPort
129129
redisAddr = redisStackAddr
130130

131-
// populate cluster node information
132-
Expect(configureClusterTopology(ctx, cluster)).NotTo(HaveOccurred())
131+
if !RECluster {
132+
// populate cluster node information
133+
Expect(configureClusterTopology(ctx, cluster)).NotTo(HaveOccurred())
134+
}
133135
}
134136
})
135137

136138
var _ = AfterSuite(func() {
137-
// This should result in no errors when there were no processes started from the tests
138139
Expect(cluster.Close()).NotTo(HaveOccurred())
139140

141+
// NOOP if there are no processes registered
140142
for _, p := range processes {
141143
Expect(p.Close()).NotTo(HaveOccurred())
142144
}

monitor_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ var _ = Describe("Monitor command", Label("monitor"), func() {
2222
if os.Getenv("RUN_MONITOR_TEST") != "true" {
2323
Skip("Skipping Monitor command test. Set RUN_MONITOR_TEST=true to run it.")
2424
}
25-
client = redis.NewClient(&redis.Options{Addr: ":6379"})
25+
client = redis.NewClient(&redis.Options{Addr: redisPort})
2626
Expect(client.FlushDB(ctx).Err()).NotTo(HaveOccurred())
2727

2828
})
@@ -61,7 +61,7 @@ func TestMonitorCommand(t *testing.T) {
6161
}
6262

6363
ctx := context.TODO()
64-
client := redis.NewClient(&redis.Options{Addr: ":6379"})
64+
client := redis.NewClient(&redis.Options{Addr: redisPort})
6565
if err := client.FlushDB(ctx).Err(); err != nil {
6666
t.Fatalf("FlushDB failed: %v", err)
6767
}
@@ -72,8 +72,8 @@ func TestMonitorCommand(t *testing.T) {
7272
}
7373
}()
7474

75-
ress := make(chan string, 10) // Buffer to prevent blocking
76-
client1 := redis.NewClient(&redis.Options{Addr: ":6379"}) // Adjust the Addr field as necessary
75+
ress := make(chan string, 10) // Buffer to prevent blocking
76+
client1 := redis.NewClient(&redis.Options{Addr: redisPort}) // Adjust the Addr field as necessary
7777
mn := client1.Monitor(ctx, ress)
7878
mn.Start()
7979
// Wait for the Redis server to be in monitoring mode.

osscluster_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ func (s *clusterScenario) Close() error {
9393
if err != nil {
9494
return err
9595
}
96+
9697
// since 7.2 forget calls should be propagated, calling only master
9798
// nodes should be sufficient.
9899
for _, nID := range s.nodeIDs {

0 commit comments

Comments
 (0)