I have written tests for similar situations by creating a bunch of children, having them write as quickly as they can for a while (say 1000 messages), then checking to make sure nothing was garbled and everything showed up. This test is probabilistic, so it's not guaranteed to find problems, but it's likely to, and more likely the longer you run it.