watermill icon indicating copy to clipboard operation
watermill copied to clipboard

Some Watermill internal tests are written with null payloads

Open dkotik opened this issue 6 months ago • 3 comments

https://github.com/ThreeDotsLabs/watermill-sql/blob/master/pkg/sql/pubsub_test.go#L466 has null payloads:

messagesToPublish := []*message.Message{
	message.NewMessage("0", nil),
	message.NewMessage("1", nil),
	message.NewMessage("2", nil),
}

The acceptance tests never run a scenario with a NULL payload. Using that test sample caused SQLite driver tests to fail.

Currently, I filled in the samples with some data for testing. But this left me with a question: are empty payloads for messages correct behavior?

I believe the answer to this question should be "no" and that the answer must be codified in the official implementation tests.

dkotik avatar May 15 '25 05:05 dkotik