Commit 886fdce3 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 2855a6d5
...@@ -790,6 +790,7 @@ func Verify(t testing.TB, f func(t *T)) { ...@@ -790,6 +790,7 @@ func Verify(t testing.TB, f func(t *T)) {
tT := &T{_testing_TB: t, streamTab: make(map[string]Chan)} tT := &T{_testing_TB: t, streamTab: make(map[string]Chan)}
// XXX // XXX
func() {
// verify in the end that no events are left unchecked / unconsumed, // verify in the end that no events are left unchecked / unconsumed,
// e.g. sent to RxEvent, but not received. Nak them if they are and fail. // e.g. sent to RxEvent, but not received. Nak them if they are and fail.
// //
...@@ -803,17 +804,20 @@ func Verify(t testing.TB, f func(t *T)) { ...@@ -803,17 +804,20 @@ func Verify(t testing.TB, f func(t *T)) {
}() }()
f(tT) f(tT)
}()
// now, if f succeeds, verify f with injected delays.
if tT.Failed() {
return
}
/*
// now verify f with injected delays.
trace0 := tT.tracev trace0 := tT.tracev
// sort trace0 by time just in case - events migth come from multiple // sort trace0 by time just in case - events migth come from multiple
// CPUs simultaneously, and so for close events they might be added to // CPUs simultaneously, and so for close events they might be added to
// tracev not in time order. // tracev not in time order.
sort.Slice(trace0, func(i, j int) bool { sort.Slice(trace0, func(i, j int) bool {
return trace0[i].t.Before(trace[j].t) return trace0[i].t.Before(trace0[j].t)
} })
*/
// XXX in the end: verify that streams are the same from run to run (if completed successfully). // XXX in the end: verify that streams are the same from run to run (if completed successfully).
......
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