Commit 4a44c0a0 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 4e33314f
......@@ -141,5 +141,22 @@ func Test2ThreadsOK(t *testing.T) {
// XXX
func TestDeadlock(t *testing.T) {
verify(t, func(t *tracetest.T) {
var wg sync.WaitGroup
defer wg.Wait()
wg.Add(2)
go func() { // thread1
defer wg.Done()
hi("T1·A")
}()
go func() { // thread2
defer wg.Done()
hi("T2·B")
}()
// the checker expects something on stream "t3", but there is
// no event sent there -> deadlock.
t.Expect("t3", eventHi("zzz"))
})
}
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