mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-30 15:10:40 +00:00
* Fix TestStart race TestStart does 3 tests test1 = Start() with no error test2 = Start() on an already started struct test3 = Start() on nil Previously, test1 and test2 were on the same struct. Depending on the go scheduler, we could have test2 fail because the field "started" could go from 1 to 0 just after the atomic compare and swap. So we would Start() a second time on the same struct but the field "started" would already be back to 0. * Divide TestStart in 3 tests * Resolve comments --------- Co-authored-by: mathieu cesbron <mathieucesbron@mathieus-MacBook-Pro.local>
13 KiB
13 KiB