Skip to content

Commit

Permalink
fix internal test race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
onsi committed May 3, 2023
1 parent df4693a commit e291129
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion internal/interrupt_handler/interrupt_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ var _ = Describe("InterruptHandler", func() {
var trigger func()
var interruptHandler *interrupt_handler.InterruptHandler
BeforeEach(func() {
interrupt_handler.ABORT_POLLING_INTERVAL = 50 * time.Millisecond
trigger = func() {
syscall.Kill(syscall.Getpid(), syscall.SIGUSR2)
}
Expand Down
3 changes: 3 additions & 0 deletions internal/interrupt_handler/interrupthandler_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@ package interrupt_handler_test

import (
"testing"
"time"

. "github.com/onsi/ginkgo/v2"
"github.com/onsi/ginkgo/v2/internal/interrupt_handler"
. "github.com/onsi/gomega"
)

func TestInterrupthandler(t *testing.T) {
interrupt_handler.ABORT_POLLING_INTERVAL = 50 * time.Millisecond
RegisterFailHandler(Fail)
RunSpecs(t, "Interrupthandler Suite")
}

0 comments on commit e291129

Please sign in to comment.