mirror of
https://github.com/argoproj/argo-cd.git
synced 2026-02-20 01:28:45 +01:00
chore: remove unnecessary lock value copy in test (#24939)
Signed-off-by: shota3506 <s.shota.710.3506@gmail.com>
This commit is contained in:
5
controller/cache/cache_test.go
vendored
5
controller/cache/cache_test.go
vendored
@@ -172,7 +172,6 @@ func TestHandleDeleteEvent_CacheDeadlock(t *testing.T) {
|
||||
db.On("GetApplicationControllerReplicas").Return(1)
|
||||
fakeClient := fake.NewClientset()
|
||||
settingsMgr := argosettings.NewSettingsManager(t.Context(), fakeClient, "argocd")
|
||||
liveStateCacheLock := sync.RWMutex{}
|
||||
gitopsEngineClusterCache := &mocks.ClusterCache{}
|
||||
clustersCache := liveStateCache{
|
||||
clusters: map[string]cache.ClusterCache{
|
||||
@@ -180,9 +179,7 @@ func TestHandleDeleteEvent_CacheDeadlock(t *testing.T) {
|
||||
},
|
||||
clusterSharding: sharding.NewClusterSharding(db, 0, 1, common.DefaultShardingAlgorithm),
|
||||
settingsMgr: settingsMgr,
|
||||
// Set the lock here so we can reference it later
|
||||
//nolint:govet // We need to overwrite here to have access to the lock
|
||||
lock: liveStateCacheLock,
|
||||
lock: sync.RWMutex{},
|
||||
}
|
||||
channel := make(chan string)
|
||||
// Mocked lock held by the gitops-engine cluster cache
|
||||
|
||||
Reference in New Issue
Block a user