-
Notifications
You must be signed in to change notification settings - Fork 17
FLAKY TEST: panic during SubscribeEvents call #301
Copy link
Copy link
Open
Description
[1754609256] UnitTests - System APIs Handler - 10/10 specs •••••••panic: Your Test Panicked
eventCh, errCh := h.service.SubscribeEvents(r.Context(), filters.ToLegacyFormat())
/home/runner/work/finch-daemon/finch-daemon/api/handlers/system/events.go:23
When you, or your assertion library, calls Ginkgo's Fail(),
Ginkgo panics to prevent subsequent assertions from running.
Normally Ginkgo rescues this panic so you shouldn't see it.
However, if you make an assertion in a goroutine, Ginkgo can't capture the
panic.
To circumvent this, you should call
defer GinkgoRecover()
at the top of the goroutine that caused this panic.
Alternatively, you may have made an assertion outside of a Ginkgo
leaf node (e.g. in a container node or some out-of-band function) - please
move your assertion to
an appropriate Ginkgo node (e.g. a BeforeSuite, BeforeEach, It, etc...).
Learn more at:
http://onsi.github.io/ginkgo/#mental-model-how-ginkgo-handles-failure
goroutine 57 [running]:
github.com/onsi/ginkgo/v2.Fail({0xc00015ec00, 0x1f8}, {0xc000124848, 0x1, 0x5?})
/home/runner/go/pkg/mod/github.com/onsi/ginkgo/v2@v2.23.4/core_dsl.go:427 +0x265
github.com/onsi/ginkgo/v2/internal/testingtproxy.(*ginkgoTestingTProxy).Fatalf(0xc000462bd0, {0x17d0fba, 0x2e}, {0xc0003afa90, 0x5, 0x5})
/home/runner/go/pkg/mod/github.com/onsi/ginkgo/v2@v2.23.4/internal/testingtproxy/testing_t_proxy.go:129 +0xe4
go.uber.org/mock/gomock.(*Controller).Call.func1(0xc000121ef0, {0x1699fe0, 0xc0003ed3b0}, {0x17a6bc2, 0xf}, {0xc00039f160, 0x2, 0x2})
/home/runner/go/pkg/mod/go.uber.org/mock@v0.5.2/gomock/controller.go:214 +0x616
go.uber.org/mock/gomock.(*Controller).Call(0xc000121ef0, {0x1699fe0, 0xc0003ed3b0}, {0x17a6bc2, 0xf}, {0xc00039f160, 0x2, 0x2})
/home/runner/go/pkg/mod/go.uber.org/mock@v0.5.2/gomock/controller.go:230 +0xc7
github.com/runfinch/finch-daemon/mocks/mocks_system.(*MockService).SubscribeEvents(0xc0003ed3b0, {0x199de70, 0x31e6420}, 0xc000436660)
/home/runner/work/finch-daemon/finch-daemon/mocks/mocks_system/systemsvc.go:95 +0x18a
github.com/runfinch/finch-daemon/api/handlers/system.(*handler).events(0xc0004a9c80, {0x199b138, 0xc0004a9cc0}, 0xc000427180)
/home/runner/work/finch-daemon/finch-daemon/api/handlers/system/events.go:23 +0x4a2
github.com/runfinch/finch-daemon/api/handlers/system.init.func1.6.1()
/home/runner/work/finch-daemon/finch-daemon/api/handlers/system/events_test.go:198 +0xdd
created by github.com/runfinch/finch-daemon/api/handlers/system.init.func1.6 in goroutine 56
/home/runner/work/finch-daemon/finch-daemon/api/handlers/system/events_test.go:196 +0xa88
Ginkgo ran 26 suites in 2m7.078520783s
There were failures detected in the following suites:
system ./api/handlers/system
Test Suite Failed
exit status 1
make: *** [Makefile:129: test-unit] Error 1
Error: Process completed with exit code 2.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels