From 6c2c61151b8b33d37960ad0d729b6390afc42120 Mon Sep 17 00:00:00 2001 From: ty-dc Date: Thu, 6 Jul 2023 14:45:08 +0800 Subject: [PATCH] fix: results report exited unexpectedly before the parallel process ended Signed-off-by: ty-dc --- pkg/lock/lock_debug_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkg/lock/lock_debug_test.go b/pkg/lock/lock_debug_test.go index f5f21e4ae1..372ee7ad66 100644 --- a/pkg/lock/lock_debug_test.go +++ b/pkg/lock/lock_debug_test.go @@ -40,6 +40,8 @@ var _ = Describe("Debug lock", Label("unitest", "lock_test"), func() { It("holds the lock timeout", func() { go func() { + defer GinkgoRecover() + mutex.Lock() time.Sleep(selfishTimeout) mutex.Unlock() @@ -50,6 +52,8 @@ var _ = Describe("Debug lock", Label("unitest", "lock_test"), func() { It("ignores the timeout when unlocking", func() { go func() { + defer GinkgoRecover() + mutex.Lock() time.Sleep(selfishTimeout) mutex.UnlockIgnoreTime() @@ -76,6 +80,8 @@ var _ = Describe("Debug lock", Label("unitest", "lock_test"), func() { It("holds the lock timeout", func() { go func() { + defer GinkgoRecover() + rwMutex.Lock() time.Sleep(selfishTimeout) rwMutex.Unlock() @@ -86,6 +92,8 @@ var _ = Describe("Debug lock", Label("unitest", "lock_test"), func() { It("ignores the timeout when unlocking", func() { go func() { + defer GinkgoRecover() + rwMutex.Lock() time.Sleep(selfishTimeout) rwMutex.UnlockIgnoreTime()