Skip to content

Commit

Permalink
Revert "fix access request cache test race (#44653)" (#44787)
Browse files Browse the repository at this point in the history
This reverts commit a422be4.
  • Loading branch information
fspmarshall authored Jul 30, 2024
1 parent b6b420f commit 5472633
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
7 changes: 0 additions & 7 deletions lib/services/access_request_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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 {
Expand Down
6 changes: 0 additions & 6 deletions lib/services/access_request_cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 5472633

Please sign in to comment.