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() {
115
115
})
116
116
117
117
It ("should execute the Warmup function when Warmup group is started" , func () {
118
- warmupExecuted := false
118
+ var warmupExecuted atomic. Bool
119
119
120
120
warmupRunnable := WarmupRunnableFunc {
121
121
RunFunc : func (c context.Context ) error {
122
122
<- c .Done ()
123
123
return nil
124
124
},
125
125
WarmupFunc : func (c context.Context ) error {
126
- warmupExecuted = true
126
+ warmupExecuted . Store ( true )
127
127
return nil
128
128
},
129
129
}
@@ -138,7 +138,7 @@ var _ = Describe("runnables", func() {
138
138
Expect (r .Warmup .Start (ctx )).To (Succeed ())
139
139
140
140
// Verify warmup function was called
141
- Expect (warmupExecuted ).To (BeTrue ())
141
+ Expect (warmupExecuted . Load () ).To (BeTrue ())
142
142
})
143
143
144
144
It ("should propagate errors from Warmup function to error channel" , func () {
You can’t perform that action at this time.
0 commit comments