Fix tests with new host lifecycle handling
This commit is contained in:
parent
ab46f233e7
commit
a1d95f5637
|
@ -705,6 +705,7 @@ func TestClustersStatusAllWithErrors(t *testing.T) {
|
||||||
|
|
||||||
// shutdown 1 cluster peer
|
// shutdown 1 cluster peer
|
||||||
clusters[1].Shutdown(ctx)
|
clusters[1].Shutdown(ctx)
|
||||||
|
clusters[1].host.Close()
|
||||||
delay()
|
delay()
|
||||||
|
|
||||||
f := func(t *testing.T, c *Cluster) {
|
f := func(t *testing.T, c *Cluster) {
|
||||||
|
@ -740,7 +741,7 @@ func TestClustersStatusAllWithErrors(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if errst.Status != api.TrackerStatusClusterError {
|
if errst.Status != api.TrackerStatusClusterError {
|
||||||
t.Error("erroring status should be set to ClusterError")
|
t.Error("erroring status should be set to ClusterError:", errst.Status)
|
||||||
}
|
}
|
||||||
|
|
||||||
// now check with Cid status
|
// now check with Cid status
|
||||||
|
@ -752,7 +753,7 @@ func TestClustersStatusAllWithErrors(t *testing.T) {
|
||||||
pinfo := status.PeerMap[pid]
|
pinfo := status.PeerMap[pid]
|
||||||
|
|
||||||
if pinfo.Status != api.TrackerStatusClusterError {
|
if pinfo.Status != api.TrackerStatusClusterError {
|
||||||
t.Error("erroring status should be ClusterError")
|
t.Error("erroring status should be ClusterError:", pinfo.Status)
|
||||||
}
|
}
|
||||||
|
|
||||||
if !pinfo.Cid.Equals(h) {
|
if !pinfo.Cid.Equals(h) {
|
||||||
|
@ -1817,7 +1818,9 @@ func TestClustersGraphUnhealthy(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
clusters[discon1].Shutdown(ctx)
|
clusters[discon1].Shutdown(ctx)
|
||||||
|
clusters[discon1].host.Close()
|
||||||
clusters[discon2].Shutdown(ctx)
|
clusters[discon2].Shutdown(ctx)
|
||||||
|
clusters[discon2].host.Close()
|
||||||
|
|
||||||
waitForLeaderAndMetrics(t, clusters)
|
waitForLeaderAndMetrics(t, clusters)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user