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
7 changes: 4 additions & 3 deletions go/inst/instance_dao_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,10 @@ func fmtArgs(args []interface{}) string {
}

func TestInitializeInstanceDaoCaches(t *testing.T) {
// The configuration is never marked loaded in unit tests, so the background
// initializeInstanceDao() goroutine never creates the caches; only the
// synchronous call can.
// The synchronous initializer must create the caches by itself, and calling it
// more than once must be harmless. (Other test files in this package mark the
// configuration as loaded, so the background initializeInstanceDao() goroutine
// may also run and call it concurrently; sync.Once makes that safe.)
InitializeInstanceDaoCaches()
InitializeInstanceDaoCaches()
test.S(t).ExpectTrue(forgetInstanceKeys != nil)
Expand Down
Loading