Add Unlock before Fatal

This commit is contained in:
BurtonQin 2020-03-24 09:10:21 +08:00 committed by Felix Lange
parent 08bf1f243c
commit 5da0694ede

View file

@ -106,6 +106,7 @@ func TestLazyQueue(t *testing.T) {
if p.p != maxPri {
stop := make(chan struct{})
stopCh <- stop // No need to wait for `<-stop`. test failed anyway
lock.Unlock()
t.Fatalf("incorrect item (best known priority %d, popped %d)", maxPri, p.p)
}
q.Push(p)