Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions controller/cache/cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,17 +172,14 @@ 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{
testCluster.Server: gitopsEngineClusterCache,
},
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
Expand Down
Loading