Skip to content

bug: intermittent test failure on event dispatcher #1662

@EnriqueL8

Description

@EnriqueL8

What happened?

Logs taken from a GitHub Action

2025-03-13T20:56:36.6499953Z     event_dispatcher_test.go:463: PASS:	Capabilities()
2025-03-13T20:56:36.6500920Z     event_dispatcher_test.go:463: PASS:	Name()
2025-03-13T20:56:36.6502046Z     event_dispatcher_test.go:463: PASS:	BatchDeliveryRequest(*context.valueCtx,string,string,string,string)
2025-03-13T20:56:36.6510289Z     event_dispatcher_test.go:464: PASS:	GetMessageWithDataCached(string,*fftypes.UUID)
2025-03-13T20:56:36.6511697Z     event_dispatcher_test.go:464: PASS:	GetMessageWithDataCached(string,*fftypes.UUID)
2025-03-13T20:56:36.6512811Z     event_dispatcher_test.go:464: PASS:	GetMessageWithDataCached(string,*fftypes.UUID)
2025-03-13T20:56:36.6513901Z     event_dispatcher_test.go:464: PASS:	GetMessageWithDataCached(string,*fftypes.UUID)
2025-03-13T20:56:36.6514856Z time="2025-03-13T20:56:32Z" level=debug msg="New event notifier loop ending (context cancelled)"
2025-03-13T20:56:36.6515633Z --- PASS: TestEventDispatcherBatchBased (0.00s)
2025-03-13T20:56:36.6516356Z === RUN   TestEventDispatcherBatchDispatchFail
2025-03-13T20:56:36.6517016Z panic: no return value specified for GetMessageWithDataCached
2025-03-13T20:56:36.6517441Z 
2025-03-13T20:56:36.6517601Z goroutine 610 [running]:
2025-03-13T20:56:36.6518686Z github.com/hyperledger/firefly/mocks/datamocks.(*Manager).GetMessageWithDataCached(0xc00091e960, {0xcc2708, 0xc00070c9f0}, 0x0, {0x0, 0x0, 0x0})
2025-03-13T20:56:36.6520052Z 	/home/runner/work/firefly/firefly/mocks/datamocks/manager.go:174 +0x70a
2025-03-13T20:56:36.6521812Z github.com/hyperledger/firefly/internal/events.(*eventEnricher).enrichEvent(0xc00091ecd0, {0xcc2708, 0xc00070c9f0}, 0xc0006bd560)
2025-03-13T20:56:36.6523167Z 	/home/runner/work/firefly/firefly/internal/events/event_enrich.go:72 +0x194
2025-03-13T20:56:36.6524468Z github.com/hyperledger/firefly/internal/events.(*eventDispatcher).enrichEvents(0xc0009ca5a0, {0xc000289fa0, 0x2, 0xc000478070?})
2025-03-13T20:56:36.6525842Z 	/home/runner/work/firefly/firefly/internal/events/event_dispatcher.go:197 +0x11b
2025-03-13T20:56:36.6527155Z github.com/hyperledger/firefly/internal/events.(*eventDispatcher).bufferedDelivery(0xc0009ca5a0, {0xc000533fa0, 0x2, 0x2})
2025-03-13T20:56:36.6528468Z 	/home/runner/work/firefly/firefly/internal/events/event_dispatcher.go:232 +0x119
2025-03-13T20:56:36.6529592Z github.com/hyperledger/firefly/internal/events.TestEventDispatcherBatchDispatchFail.func2()
2025-03-13T20:56:36.6530984Z 	/home/runner/work/firefly/firefly/internal/events/event_dispatcher_test.go:505 +0x15d
2025-03-13T20:56:36.6532267Z created by github.com/hyperledger/firefly/internal/events.TestEventDispatcherBatchDispatchFail in goroutine 606
2025-03-13T20:56:36.6533573Z 	/home/runner/work/firefly/firefly/internal/events/event_dispatcher_test.go:504 +0x5b3
2025-03-13T20:56:36.6534466Z FAIL	github.com/hyperledger/firefly/internal/events	3.159s

What did you expect to happen?

Test to pass successfully every time, I think there is a race condition

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions