Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Yeuoly committed Sep 3, 2024
1 parent dc402cd commit c8f699c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions internal/cluster/clutser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func createSimulationCluster(nums int) ([]*Cluster, error) {
return result, nil
}

func launchSimulationCluster(clusters []*Cluster, t *testing.T) {
func launchSimulationCluster(clusters []*Cluster) {
for _, cluster := range clusters {
cluster.Launch()
}
Expand All @@ -61,7 +61,7 @@ func TestSingleClusterLifetime(t *testing.T) {
t.Errorf("create simulation cluster failed: %v", err)
return
}
launchSimulationCluster(clusters, t)
launchSimulationCluster(clusters)
defer closeSimulationCluster(clusters, t)

<-clusters[0].NotifyBecomeMaster()
Expand All @@ -79,7 +79,7 @@ func TestMultipleClusterLifetime(t *testing.T) {
t.Errorf("create simulation cluster failed: %v", err)
return
}
launchSimulationCluster(clusters, t)
launchSimulationCluster(clusters)
defer closeSimulationCluster(clusters, t)

select {
Expand Down Expand Up @@ -118,7 +118,7 @@ func TestClusterSubstituteMaster(t *testing.T) {
t.Errorf("create simulation cluster failed: %v", err)
return
}
launchSimulationCluster(clusters, t)
launchSimulationCluster(clusters)
defer closeSimulationCluster(clusters, t)

select {
Expand Down Expand Up @@ -176,7 +176,7 @@ func TestClusterAutoGCNoLongerActiveNode(t *testing.T) {
t.Errorf("create simulation cluster failed: %v", err)
return
}
launchSimulationCluster(clusters, t)
launchSimulationCluster(clusters)
defer closeSimulationCluster(clusters, t)

select {
Expand Down
4 changes: 2 additions & 2 deletions internal/cluster/plugin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func TestPluginScheduleLifetime(t *testing.T) {
return
}

launchSimulationCluster(cluster, t)
launchSimulationCluster(cluster)
defer closeSimulationCluster(cluster, t)

time.Sleep(time.Second * 1)
Expand Down Expand Up @@ -131,7 +131,7 @@ func TestPluginScheduleWhenMasterClusterShutdown(t *testing.T) {
return
}

launchSimulationCluster(cluster, t)
launchSimulationCluster(cluster)
defer closeSimulationCluster(cluster, t)

// add plugin to the cluster
Expand Down
2 changes: 1 addition & 1 deletion internal/cluster/redirect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func TestRedirectTraffic(t *testing.T) {
}

// launch cluster
launchSimulationCluster(cluster, t)
launchSimulationCluster(cluster)
defer closeSimulationCluster(cluster, t)

// wait for all nodes to be ready
Expand Down
2 changes: 1 addition & 1 deletion internal/cluster/vote_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func TestVoteAddresses(t *testing.T) {
}()
}

launchSimulationCluster(cluster, t)
launchSimulationCluster(cluster)
defer closeSimulationCluster(cluster, t)

// wait for all nodes to be ready
Expand Down

0 comments on commit c8f699c

Please sign in to comment.