File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -115,15 +115,15 @@ var _ = Describe("runnables", func() {
115115 })
116116
117117 It ("should execute the Warmup function when Warmup group is started" , func () {
118- warmupExecuted := false
118+ var warmupExecuted atomic. Bool
119119
120120 warmupRunnable := WarmupRunnableFunc {
121121 RunFunc : func (c context.Context ) error {
122122 <- c .Done ()
123123 return nil
124124 },
125125 WarmupFunc : func (c context.Context ) error {
126- warmupExecuted = true
126+ warmupExecuted . Store ( true )
127127 return nil
128128 },
129129 }
@@ -138,7 +138,7 @@ var _ = Describe("runnables", func() {
138138 Expect (r .Warmup .Start (ctx )).To (Succeed ())
139139
140140 // Verify warmup function was called
141- Expect (warmupExecuted ).To (BeTrue ())
141+ Expect (warmupExecuted . Load () ).To (BeTrue ())
142142 })
143143
144144 It ("should propagate errors from Warmup function to error channel" , func () {
You can’t perform that action at this time.
0 commit comments