Commit 3d56e20
These ones were the ones testing Open scenarios. The issue is that Op… (#57)
* These ones were the ones testing Open scenarios. The issue is that Open and Close, rwc.Open and rwc.Close can at the same time write on:
c.allocator = newAllocator(1, c.Config.ChannelMax)
connection.go line 444 and
connection.go line 849
while shutdown is protected by the structure mutex m, OpenComplete() is not causing the race.
While it's not clear if the library should protect this eventuality, the tests are testing the Open function, so I think the close can be put in the main thread avoiding the race and not affecting the test validity
* adding t.Cleanup
Co-authored-by: Daniele Palaia <dpalaia@dpalaia-a02.vmware.com>1 parent 34f6f31 commit 3d56e20
1 file changed
+17
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
| 218 | + | |
218 | 219 | | |
219 | 220 | | |
220 | 221 | | |
221 | | - | |
| 222 | + | |
222 | 223 | | |
223 | 224 | | |
224 | 225 | | |
| |||
236 | 237 | | |
237 | 238 | | |
238 | 239 | | |
| 240 | + | |
239 | 241 | | |
240 | 242 | | |
241 | 243 | | |
242 | 244 | | |
| 245 | + | |
243 | 246 | | |
244 | 247 | | |
245 | 248 | | |
| |||
249 | 252 | | |
250 | 253 | | |
251 | 254 | | |
252 | | - | |
| 255 | + | |
253 | 256 | | |
254 | 257 | | |
255 | 258 | | |
| |||
263 | 266 | | |
264 | 267 | | |
265 | 268 | | |
| 269 | + | |
266 | 270 | | |
267 | 271 | | |
268 | 272 | | |
269 | 273 | | |
| 274 | + | |
270 | 275 | | |
271 | 276 | | |
272 | | - | |
| 277 | + | |
273 | 278 | | |
274 | 279 | | |
275 | 280 | | |
276 | 281 | | |
277 | 282 | | |
| 283 | + | |
278 | 284 | | |
279 | 285 | | |
280 | 286 | | |
281 | 287 | | |
| 288 | + | |
282 | 289 | | |
283 | 290 | | |
284 | 291 | | |
285 | 292 | | |
286 | 293 | | |
287 | | - | |
288 | 294 | | |
289 | 295 | | |
290 | 296 | | |
| |||
296 | 302 | | |
297 | 303 | | |
298 | 304 | | |
| 305 | + | |
299 | 306 | | |
300 | 307 | | |
301 | 308 | | |
302 | 309 | | |
| 310 | + | |
303 | 311 | | |
304 | 312 | | |
305 | 313 | | |
| |||
310 | 318 | | |
311 | 319 | | |
312 | 320 | | |
| 321 | + | |
313 | 322 | | |
314 | 323 | | |
315 | 324 | | |
316 | 325 | | |
317 | 326 | | |
| 327 | + | |
318 | 328 | | |
319 | 329 | | |
320 | 330 | | |
| |||
326 | 336 | | |
327 | 337 | | |
328 | 338 | | |
329 | | - | |
| 339 | + | |
330 | 340 | | |
331 | 341 | | |
332 | 342 | | |
| |||
340 | 350 | | |
341 | 351 | | |
342 | 352 | | |
| 353 | + | |
343 | 354 | | |
344 | 355 | | |
345 | 356 | | |
| |||
356 | 367 | | |
357 | 368 | | |
358 | 369 | | |
| 370 | + | |
359 | 371 | | |
360 | 372 | | |
361 | 373 | | |
| |||
0 commit comments