hopper should maintain a FIFO ordering of inputs. This is something we've not been explicitly (!) testing. This ordering was broken by the optimizations that landed in 0.1.1. In particular, consider that the following test will fail:
mod integration {
extern crate tempdir;
extern crate hopper;
use self::hopper::channel_with_max_bytes;
#[test]
fn large_sequence_comes_back_exactly() {
let dir = tempdir::TempDir::new("hopper").unwrap();
let (mut snd, mut rcv) =
channel_with_max_bytes("zero_item_round_trip", dir.path(), 1_048_576).unwrap();
assert_eq!(None, rcv.next());
let max = 10_000;
for i in 0..max {
snd.send(i);
}
let mut nxt = 0;
loop {
match rcv.next() {
Some(i) => {
assert_eq!(i, nxt);
nxt += 1;
}
None => break,
}
}
}
}
hopper should maintain a FIFO ordering of inputs. This is something we've not been explicitly (!) testing. This ordering was broken by the optimizations that landed in 0.1.1. In particular, consider that the following test will fail:
I will yank 0.1.1.
/cc @pulltab @tsantero