From 8adf997cf38a400dadc645de7735f4449a8b7870 Mon Sep 17 00:00:00 2001 From: Haoming Meng Date: Tue, 26 Mar 2024 16:39:13 +0000 Subject: [PATCH] Fix duplicated mock server --- director/director_ui_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/director/director_ui_test.go b/director/director_ui_test.go index 470bddea8..3e1ad5415 100644 --- a/director/director_ui_test.go +++ b/director/director_ui_test.go @@ -38,6 +38,7 @@ func TestListServers(t *testing.T) { func() { serverAdMutex.Lock() defer serverAdMutex.Unlock() + serverAds.DeleteAll() serverAds.Set(mockOriginServerAd, mockNamespaceAds(5, "origin1"), ttlcache.DefaultTTL) serverAds.Set(mockCacheServerAd, mockNamespaceAds(4, "cache1"), ttlcache.DefaultTTL) require.True(t, serverAds.Has(mockOriginServerAd))