Commit 74f8ffcd authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent b129267b
......@@ -19,6 +19,7 @@
package tracetest
// synchronous channels.
// XXX move back to tracetest.go ? -> likely yes
import (
"errors"
......@@ -81,7 +82,7 @@ func (ch *_chan) Close() {
//
// The consumer, after dealing with the message, must send back an ack.
func (ch *_chan) Recv() *_Msg {
msg := <-ch.msgq
msg := <-ch.msgq // XXX detect deadlock
return msg
}
......
......@@ -160,7 +160,7 @@ func (t *T) SetEventRouter(routeEvent func(event interface{}) (stream string)) {
//
// The sequential process of the test system where event originated should be
// paused until RxEvent returns. This requirement can be usually met via
// inserting t.RxEvent() call into the code the produces the event.
// inserting t.RxEvent() call into the code that produces the event.
//
// XXX naming; NewEvent? IncomingEvent? OnEvent?
func (t *T) RxEvent(event interface{}) {
......@@ -223,9 +223,13 @@ func (t *T) Expect(stream string, eventOK interface{}) {
msg.Ack()
}
// XXX ExpectNoACK
// XXX Recv
// XXX Select? (e.g. Select("a", "b") to fetch from either "a" or "b")
// TODO ExpectNoACK? (then it would be possible to receive events from 2
// streams; have those 2 processes paused and inspect their state. After
// inspection unpause both)
// TODO Recv? (to receive an event for which we don't know type or value yet)
// TODO Select? (e.g. Select("a", "b") to fetch from either "a" or "b")
// expect1 receives next event on stream and verifies it to be equal to eventOK (both type and value).
//
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment