File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -170,18 +170,19 @@ struct APIExpectation
170170 }
171171}
172172
173- APIExpectation[] apiExpectations;
173+ __gshared APIExpectation[] apiExpectations;
174174
175175void setAPIExpectations (Args... )(Args args)
176176{
177177 import std.functional : toDelegate;
178178 import std.traits : Parameters;
179+ synchronized {
179180 apiExpectations.length = 0 ;
180181 foreach (i, arg; args)
181182 {
182183 static if (is (Args[i] : string ))
183184 {
184- apiExpectations ~= APIExpectation(arg);
185+ apiExpectations ~= APIExpectation(arg);
185186 }
186187 else
187188 {
@@ -202,6 +203,7 @@ void setAPIExpectations(Args...)(Args args)
202203 apiExpectations[$ - 1 ].reqHandler is null , " Either provide a reqHandler or a jsonHandler" );
203204 }
204205 }
206+ }
205207}
206208
207209void postGitHubHook (string payload, string eventType = " pull_request" ,
You can’t perform that action at this time.
0 commit comments