+ expectMessage(t, &messages[0], at2, id2, say2)
+ expectMessage(t, &messages[1], at3, id3, say3)
+ close(store.Get)
+ close(store.Add)
+}
+
+func TestPrecisePartialRetreive(t *testing.T) {
+ start_speak_count := atoi(speak_count.String())
+ id1 := "7"
+ id2 := "8"
+ id3 := "9"
+ say1 := "Well, he's...he's, ah...probably pining for the fjords."
+ say2 := "PININ' for the FJORDS?!?!?!?"
+ say3 := "look, why did he fall flat on his back the moment I got 'im home?"
+ base := time.Now()
+ at1 := base.Add(parseDuration("-3m"))
+ at2 := base.Add(parseDuration("-2m"))
+ at3 := base.Add(parseDuration("-1m"))
+ since := at2
+ store := start_store()
+ store.Add <- &Message{at1, id1, say1}
+ store.Add <- &Message{at2, id2, say2}
+ store.Add <- &Message{at3, id3, say3}
+ for atoi(speak_count.String()) != start_speak_count+3 {
+ runtime.Gosched()