Skip to content

Rework#39

Draft
peter-svensson wants to merge 50 commits intomainfrom
rework
Draft

Rework#39
peter-svensson wants to merge 50 commits intomainfrom
rework

Conversation

@peter-svensson
Copy link
Copy Markdown
Member

No description provided.

@peter-svensson peter-svensson force-pushed the rework branch 2 times, most recently from a1cf8db to 9f2d061 Compare February 9, 2024 15:22
argoyle
argoyle previously approved these changes Feb 9, 2024
Copy link
Copy Markdown
Member

@argoyle argoyle left a comment

Choose a reason for hiding this comment

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

Loads of changes. Looks good to me. Just one small comment. 🏎️

Comment thread setup_consumer.go Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 10, 2024

Codecov Report

Attention: Patch coverage is 93.50105% with 31 lines in your changes missing coverage. Please review.

Project coverage is 93.77%. Comparing base (a5553b4) to head (abf5576).

Files with missing lines Patch % Lines
setup_consumer.go 86.53% 12 Missing and 2 partials ⚠️
queue_binding_config.go 64.28% 5 Missing ⚠️
setup.go 90.00% 5 Missing ⚠️
metrics.go 93.02% 2 Missing and 1 partial ⚠️
notifications.go 80.00% 2 Missing ⚠️
setup_publisher.go 97.36% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #39      +/-   ##
==========================================
+ Coverage   91.86%   93.77%   +1.90%     
==========================================
  Files           9       15       +6     
  Lines         578      610      +32     
==========================================
+ Hits          531      572      +41     
- Misses         32       33       +1     
+ Partials       15        5      -10     
Flag Coverage Δ
tests 93.77% <93.50%> (+1.90%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Update the queue declaration in tests to include the `exclusive` 
parameter and align the expected arguments with the current 
configuration using `defaultQueueOptions`. Change the queue type 
from "classic" to "quorum" for improved message handling. 
Refactor the `ServiceRequestConsumer` function to accept 
additional options for flexibility in queue setup. Remove 
redundant test code to streamline maintenance.
Update the messaging configuration structure from QueueBindingConfig 
to ConsumerConfig to improve clarity and better represent the 
usage of the configuration in the context of consumer setup.  
This change includes updates to related methods and tests to 
ensure consistent naming and functionality throughout the codebase.
Change queue type assignments from string literals to constants from the
AMQP library for improved consistency and clarity. Update related test
cases to reflect the new constant usage. Introduce QoS configuration
to enhance consumer performance and round-robin behavior.
This commit updates the Go version specified in the go.mod 
file from 1.22.12 to 1.23. This change ensures compatibility 
with the latest features and improvements in the Go 1.23 
release.
Implements a Close method for the MockAmqpChannel struct 
to satisfy the io.Closer interface. This allows for better 
integration with code that requires closing channels 
gracefully in tests. Additionally, it updates the AmqpChannel 
interface to include the io.Closer interface.
Update the Time-To-Live (TTL) for message queues from 1 to 1000 
across various test cases and the consumer setup. This change 
ensures that messages have a longer lifespan, allowing for better 
testing conditions and more reliability in message delivery 
during integration scenarios. Adjustments are made in the consumer 
setup and corresponding test files to align with this new TTL 
requirement.
Refactor the ConsumerConfig to consumerConfig for consistency across 
the codebase. Update tests and functions to utilize the new struct 
definition while ensuring the functionality remains intact. This change 
improves code clarity and aligns with naming conventions,
Adds the typemapper library for enhanced message type mapping in AMQP.  
Modifies the Publisher and consumer setups to utilize the new mapper,  
allowing improved error handling and consistency in route mapping  
between types and routing keys. Updates tests to reflect changes in  
message handling and type validation. This refactor aims to simplify  
type management and reduce potential errors in message routing.
Refactor the Publisher setup method to remove unnecessary parameters. 
Adjust the integration test to handle the new publish call. 
Update go.mod to specify the Go toolchain version. 
Refine test cases for clearer header handling and update 
expected behavior in tests to align with latest changes.
This update changes the copyright year from 2024 to 2025 in all relevant 
files to ensure accurate copyright information for the current year.
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.

2 participants