From ff15b17400dc579bdb7b9d9ebcea6465453a64b2 Mon Sep 17 00:00:00 2001 From: sellskin Date: Mon, 25 Mar 2024 12:18:33 +0800 Subject: [PATCH] remove code that will not be executed Signed-off-by: sellskin --- discovery/file/file_test.go | 1 - discovery/legacymanager/manager_test.go | 1 - discovery/manager_test.go | 1 - 3 files changed, 3 deletions(-) diff --git a/discovery/file/file_test.go b/discovery/file/file_test.go index 521a3c0f1..179ac5cd1 100644 --- a/discovery/file/file_test.go +++ b/discovery/file/file_test.go @@ -208,7 +208,6 @@ func (t *testRunner) requireUpdate(ref time.Time, expected []*targetgroup.Group) select { case <-timeout: t.Fatalf("Expected update but got none") - return case <-time.After(defaultWait / 10): if ref.Equal(t.lastReceive()) { // No update received. diff --git a/discovery/legacymanager/manager_test.go b/discovery/legacymanager/manager_test.go index 6fbecabc2..1ed699645 100644 --- a/discovery/legacymanager/manager_test.go +++ b/discovery/legacymanager/manager_test.go @@ -733,7 +733,6 @@ func verifyPresence(t *testing.T, tSets map[poolKey]map[string]*targetgroup.Grou t.Helper() if _, ok := tSets[poolKey]; !ok { t.Fatalf("'%s' should be present in Pool keys: %v", poolKey, tSets) - return } match := false diff --git a/discovery/manager_test.go b/discovery/manager_test.go index 52159d94f..8f2345911 100644 --- a/discovery/manager_test.go +++ b/discovery/manager_test.go @@ -733,7 +733,6 @@ func verifySyncedPresence(t *testing.T, tGroups map[string][]*targetgroup.Group, t.Helper() if _, ok := tGroups[key]; !ok { t.Fatalf("'%s' should be present in Group map keys: %v", key, tGroups) - return } match := false var mergedTargets string