Yeuoly 1 年間 前
コミット
21d930b4b7
共有1 個のファイルを変更した3 個の追加1 個の削除を含む
  1. 3 1
      internal/cluster/clutser_test.go

+ 3 - 1
internal/cluster/clutser_test.go

@@ -43,6 +43,9 @@ func TestSingleClusterLifetime(t *testing.T) {
 	}
 	clusters[0].Launch()
 	defer func() {
+		clusters[0].Close()
+		// wait for the cluster to close
+		time.Sleep(time.Second * 1)
 		// check if the cluster is closed
 		_, err := cache.GetMapField[node](CLUSTER_STATUS_HASH_MAP_KEY, clusters[0].id)
 		if err == nil {
@@ -50,7 +53,6 @@ func TestSingleClusterLifetime(t *testing.T) {
 			return
 		}
 	}()
-	defer clusters[0].Close()
 
 	time.Sleep(time.Second * 1)