Skip to content

feat: add webhook integration test #1474

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

feat: add webhook integration test #1474

wants to merge 8 commits into from

Conversation

abc3
Copy link
Contributor

@abc3 abc3 commented May 14, 2025

About

Initial implementation for #1359 that validates transaction consistency through webhook events. The system performs multiple row updates in a table, generating update events that are received and validated for correct sequencing via webhooks.

Running Tests

JEPSEN_TRANSACTIONS_COUNT="100" mix test --only jepsen

Environment Variables

Variable Default Description
JEPSEN_HTTP_HOST "127.0.0.1" HTTP server host
JEPSEN_HTTP_PORT "4040" HTTP server port
JEPSEN_TRANSACTIONS_COUNT 20 Number of transactions to run
JEPSEN_TRANSACTION_QUERIES_COUNT 10 Number of queries per transaction

@abc3 abc3 marked this pull request as ready for review May 14, 2025 18:38
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. sink-webhook labels May 14, 2025
@fazzone
Copy link
Contributor

fazzone commented May 14, 2025

Looking good! One thing I am curious about - maybe it's not worth it - what do you think about listening on port 0 and asking the socket what port you got assigned by the OS? The HTTP endpoint can be created in setup with a nonsense port and then there would be a step in the test which does a genserver call to ask for the real port and updates the endpoint accordingly. Or, the creation of the endpoint&sink could be done in a helper function rather than setup and be "private" to the individual test

@abc3
Copy link
Contributor Author

abc3 commented May 14, 2025

@fazzone This is a great suggestion, but I'm concerned it might be overengineering. It might be easier to handle this through some env var if more flexibility is needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sink-webhook size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants