Skip to content

Some Watermill internal tests are written with null payloads #565

@dkotik

Description

@dkotik

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions