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

nats: De/Ser using sample_freq instead of sample_frequency #1303

Merged
merged 2 commits into from
Aug 23, 2024

Conversation

bengsparks
Copy link
Contributor

@bengsparks bengsparks commented Aug 21, 2024

Addendum to #1300 for the nats module.

This PR instructs serde to rename sample_frequency into sample_freq during de/serialization.
It also introduces a module for converting the u8 into a String.

Finally, this PR adds a test in nats/tests/jetstream.rs that can be executed via cargo test -- jetstream_consumer_configs_sample_frequency, which checks that the stored config of the consumer now contains the correctly set field.
Removing the rename = sample_freq directive from the ConsumerConfig type causes this test to fail, so all seems to be correct.

Benjamin Sparks added 2 commits August 21, 2024 13:52
Also adds private module from handling schema differences
Copy link
Member

@Jarema Jarema left a comment

Choose a reason for hiding this comment

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

LGTM!

Thanks for yet another contribution!

@Jarema Jarema merged commit 5c865e0 into nats-io:main Aug 23, 2024
12 checks passed
@bengsparks bengsparks deleted the sync-nats-cherry-pick branch August 23, 2024 10:36
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