Skip to content

Commit

Permalink
Merge pull request spidernet-io#2009 from ty-dc/pr/fix_2005
Browse files Browse the repository at this point in the history
fix: results report exited unexpectedly before the parallel process e…
  • Loading branch information
weizhoublue committed Jul 14, 2023
2 parents 954b539 + 6c2c611 commit 1114121
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/lock/lock_debug_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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()
Expand All @@ -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()
Expand All @@ -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()
Expand Down

0 comments on commit 1114121

Please sign in to comment.