Skip to content
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

test: handling of duplicate claim events #109

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

Conversation

NikolasHaimerl
Copy link
Contributor

This PR tests the recently observed bug while trying to insert a duplicate deal.
The hot fix was merged in this PR.
This PR tests this change by inserting two events with a different event id. This event id is not part of the unique constraint of the active_deals table and events that only differ in their event id lead to a unique constraint violation.
The database should handle this by ignoring the duplicate event.

@NikolasHaimerl NikolasHaimerl marked this pull request as ready for review February 14, 2025 08:44
@bajtos

This comment was marked as resolved.

backend/test/deal-observer.test.js Outdated Show resolved Hide resolved
backend/test/deal-observer.test.js Show resolved Hide resolved
Copy link
Member

@bajtos bajtos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for adding the test!

The code looks good at the high level; let's improve details now.

backend/test/deal-observer.test.js Outdated Show resolved Hide resolved
backend/test/deal-observer.test.js Show resolved Hide resolved
backend/test/deal-observer.test.js Outdated Show resolved Hide resolved
@NikolasHaimerl NikolasHaimerl changed the title fix: test unique bug test: test unique bug Feb 17, 2025
@NikolasHaimerl NikolasHaimerl changed the title test: test unique bug test: handling of duplicate claim events Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants