mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 09:23:48 +00:00
add panic log
This commit is contained in:
parent
be62c3ce27
commit
58989b7ef9
1 changed files with 3 additions and 1 deletions
|
|
@ -32,7 +32,9 @@ func TestClosableMutex_MustLock(t *testing.T) {
|
|||
cm := NewClosableMutex()
|
||||
cm.MustLock()
|
||||
defer func() {
|
||||
if r := recover(); r == nil {
|
||||
if r := recover(); r != nil {
|
||||
t.Log("panic detected:", r) // Log the panic message
|
||||
} else {
|
||||
t.Fatal("expected MustLock to panic when already locked")
|
||||
}
|
||||
}()
|
||||
|
|
|
|||
Loading…
Reference in a new issue