Strictly speaking, this doesn't have anything to do with macOS per se, it's just the bug hasn't been reproducing on Linux, so perhaps something like "test: fix race condition in connection-handshake" might be a better commit message.
Aside from that, the fact that it was only failing on macOS consistently makes it apparent that we need better platform coverage in CI, i.e., we should add macOS to the Travis configuration matrix and start using AppVeyor to test code on Windows.
Strictly speaking, this doesn't have anything to do with macOS per se, it's just the bug hasn't been reproducing on Linux, so perhaps something like "test: fix race condition in connection-handshake" might be a better commit message.
Aside from that, the fact that it was only failing on macOS consistently makes it apparent that we need better platform coverage in CI, i.e., we should add macOS to the Travis configuration matrix and start using AppVeyor to test code on Windows.