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

Add Tests for Stateful Event Handling and Inventory Module #414

Merged
merged 3 commits into from
Dec 11, 2024

Conversation

vikman90
Copy link
Member

@vikman90 vikman90 commented Dec 11, 2024

Related issue
Closes #413

Description

This PR introduces new tests to enhance the reliability of stateful event handling and the SendDataEvent method in the Inventory module. These tests ensure correct behavior when processing deletion events and handling empty data objects in the Queue.

These changes address the testing gap identified in the implementation of PR #393, which modified the behavior of stateful events to exclude the event body for delete operations.

Changes Included

  1. Queue Message Handling
    • Added a test to verify that when a message with an empty object ({}) as data is dequeued, the body only includes metadata.
  2. Inventory Module
    • Introduced a basic unit test for the SendDataEvent method.
    • Added a test for the specific case when operation is delete.

Testing

  • All new tests pass and confirm the expected behavior.
  • Existing tests remain unaffected, ensuring backward compatibility.

@vikman90 vikman90 added the module/inventory Inventory module label Dec 11, 2024
@vikman90 vikman90 requested a review from cborla December 11, 2024 16:29
@vikman90 vikman90 linked an issue Dec 11, 2024 that may be closed by this pull request
@vikman90 vikman90 force-pushed the feat/413-delete-body-tests branch from e70194e to 34cf92b Compare December 11, 2024 16:54
Copy link
Member

@cborla cborla left a comment

Choose a reason for hiding this comment

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

LGTM!

@cborla cborla requested a review from TomasTurina December 11, 2024 17:46
@cborla cborla merged commit 90b229d into master Dec 11, 2024
5 checks passed
@cborla cborla deleted the feat/413-delete-body-tests branch December 11, 2024 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module/inventory Inventory module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Tests for Stateful Event Deletion Response in Queue Handling
3 participants