Skip to content

Commit 7b90ec7

Browse files
committed
was using the global cluster scenario instead of the argument
1 parent 3c205de commit 7b90ec7

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

osscluster_test.go

+7-4
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ func (s *clusterScenario) newClusterClient(
8787
}
8888

8989
func (s *clusterScenario) Close() error {
90-
90+
ctx := context.TODO()
9191
for _, master := range s.masters() {
9292
err := master.FlushAll(ctx).Err()
9393
if err != nil {
@@ -103,15 +103,18 @@ func (s *clusterScenario) Close() error {
103103

104104
for _, port := range s.ports {
105105
if process, ok := processes[port]; ok {
106-
process.Close()
106+
if process != nil {
107+
process.Close()
108+
}
109+
107110
delete(processes, port)
108111
}
109112
}
113+
110114
return nil
111115
}
112116

113117
func configureClusterTopology(ctx context.Context, scenario *clusterScenario) error {
114-
fmt.Println("Configuring cluster topology, please wait...")
115118
err := collectNodeInformation(ctx, scenario)
116119
if err != nil {
117120
return err
@@ -233,7 +236,7 @@ func startCluster(ctx context.Context, scenario *clusterScenario) error {
233236
scenario.processes[port] = process
234237
}
235238

236-
return configureClusterTopology(ctx, cluster)
239+
return configureClusterTopology(ctx, scenario)
237240
}
238241

239242
func assertSlotsEqual(slots, wanted []redis.ClusterSlot) error {

0 commit comments

Comments
 (0)