From 5472633f0e28951b492d3ed61e30977cd7bb3feb Mon Sep 17 00:00:00 2001 From: Forrest <30576607+fspmarshall@users.noreply.github.com> Date: Mon, 29 Jul 2024 17:24:21 -0700 Subject: [PATCH] Revert "fix access request cache test race (#44653)" (#44787) This reverts commit a422be4a91d6727c1ddc942fd40d6bbeaea72097. --- lib/services/access_request_cache.go | 7 ------- lib/services/access_request_cache_test.go | 6 ------ 2 files changed, 13 deletions(-) diff --git a/lib/services/access_request_cache.go b/lib/services/access_request_cache.go index 277358414f415..1c23bce55d921 100644 --- a/lib/services/access_request_cache.go +++ b/lib/services/access_request_cache.go @@ -352,7 +352,6 @@ func (c *AccessRequestCache) getResourcesAndUpdateCurrent(ctx context.Context) e c.rw.Lock() defer c.rw.Unlock() c.primaryCache = cache - close(c.initC) return nil } @@ -405,12 +404,6 @@ func (c *AccessRequestCache) initializationChan() <-chan struct{} { return c.initC } -// InitializationChan is part of the resourceCollector interface and gets the channel -// used to signal that the accessRequestCache has been initialized. -func (c *AccessRequestCache) InitializationChan() <-chan struct{} { - return c.initializationChan() -} - // Close terminates the background process that keeps the access request cache up to // date, and terminates any inflight load operations. func (c *AccessRequestCache) Close() error { diff --git a/lib/services/access_request_cache_test.go b/lib/services/access_request_cache_test.go index 5308c8898bb2b..08dd5be1d519f 100644 --- a/lib/services/access_request_cache_test.go +++ b/lib/services/access_request_cache_test.go @@ -51,12 +51,6 @@ func newAccessRequestPack(t *testing.T) (accessRequestServices, *services.Access }) require.NoError(t, err) - select { - case <-cache.InitializationChan(): - case <-time.After(time.Second * 30): - require.FailNow(t, "timeout waiting for access request cache to initialize") - } - return svcs, cache }