Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CA: Fix a data race in framework.NewHandle
Multiple tests can call NewHandle() concurrently, because of t.Parallel(). NewHandle calls schedulermetrics.InitMetrics() which modifies global variables, so there's a race. Wrapped the schedulermetrics.InitMetrics() call in a sync.Once.Do() so that it's only done once, in a thread-safe manner.
- Loading branch information