tosc-rs / mgnp

MnemOS Global Networking Protocol
Creative Commons Attribution Share Alike 4.0 International
15 stars 1 forks source link

test(tricky-pipe): fix assertion in `mpsc_send` #6

Closed hawkw closed 11 months ago

hawkw commented 11 months ago

Currently, the numbers of items sent by the second sender are determined incorrectly in the mpsc_send test, resulting in the receiver seeing a bunch of messages it doesn't expect and missing some that it does. This doesn't break the test in loom, because we send substantially fewer messages, and the multiplication happens to be the same as what we intended (as the second tx only sends one message under loom). However, the test fails incorrectly when running normal tests with real threads.

This commit fixes that.