Commit 7394278b authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent b2cec010
......@@ -130,21 +130,15 @@ func Test2ThreadsOK(t *testing.T) {
}()
// assert that events come as expected
// in checks t2 vs t1 order does not matter
// NOTE in checks t2 vs t1 order does not matter
t.Expect("t2", eventHello("T2·C"))
t.Expect("t2", eventHi("T2·D"))
t.Expect("t1", eventHi("T1·A"))
t.Expect("t1", eventHello("T1·B"))
// XXX also t.Recv, t.ExpectNoAck ?
//t1 := t.OnStream("t1")
//t1.Expect(eventHi("X·A"))
})
}
// TestDeadlock demonstrates deadlock scenario hit by the checker.
// TestDeadlock demonstrates deadlock scenario.
func TestDeadlock(t *testing.T) {
verify(t, func(t *tracetest.T) {
var wg sync.WaitGroup
......@@ -239,20 +233,11 @@ var testExpectMap = map[string]testExpect{
"Test2ThreadsOK": {0, ""},
"TestDeadlock": {1,
`--- FAIL: TestDeadlock (<TIME>)
example_test.go:161: t2: recv: deadlock waiting for *tracetest_test.eventHi
example_test.go:161: test shutdown: #streams: 2, #(pending events): 1
example_test.go:155: t2: recv: deadlock waiting for *tracetest_test.eventHi
example_test.go:155: test shutdown: #streams: 2, #(pending events): 1
t1 <- tracetest_test.eventHi T1·A
# t2
tracetest.go:<LINE>: t1: send: canceled (test failed)
`},
"TestDeadlockQQQ": {1, `
--- FAIL: TestDeadlock \(.+s\)
example_test.go:161: t2: recv: deadlock waiting for *tracetest_test.eventHi
example_test.go:161: test shutdown: #streams: 2, #(pending events): 1
t1 <- tracetest_test.eventHi T1·A
# t2
tracetest.go:175: t1: send: canceled (test failed)
`},
}
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