Conversation
👀 PingCreatedEvent now is just an event to sign it is created and available on the database and then the PingEventPublisher uses the PingMapper to convert Ping into a PingDTO to be notified for all connected flight-tracker-event-app clients.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR simplifies the event handling system by replacing the redundant PingCreated event with a streamlined PingCreatedEvent and updates the corresponding tests and publisher logic accordingly, while adding comprehensive documentation for message payloads.
- Replace usage of PingCreated with PingCreatedEvent
- Update test assertions and event registration methods
- Add new documentation for message payloads in the README
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| PingCreatedTest.java | Removed obsolete test for PingCreated event |
| PingTest.java | Updated event assertions and event retrieval logic for PingCreatedEvent |
| PingCreatedEventTest.java | Added new test for the PingCreatedEvent record |
| PingEventPublisher.java | Modified to use PingCreatedEvent with PingMapper for DTO conversion |
| Ping.java | Updated to register PingCreatedEvent instead of the old PingCreated event |
| README.md | Added a new section detailing the message payload formats |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request: Simplify PingCreatedEvent and Add Message Payload Documentation
Summary
This PR includes two main changes:
PingCreatedEventto avoid duplicating data already present inPingandPingDTOChanges
PingCreatedEventto only contain thePingand timestampPingEventPublisherto usePingMapperfor DTO conversionPingCreatedevent classPingCreatedEventstructureMotivation
PingMapperChecklist