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

RCBC-461: Call extract_expiry_time in to_backend of options instead of constructor #124

Merged
merged 1 commit into from Nov 8, 2023

Conversation

DemetrisChr
Copy link
Contributor

Motivation

Utils::Time.extract_expiry_time(expiry) transforms the expiry to the format expected by the backend. Currently it is called in the constructor, which means that if expiry is set through the setter, it is not being called and the expiry is sent to the backend in the incorrect format resulting in an ArgumentError.
 

Modification

Call extract_expiry_time in the #to_backend method instead, so it is always called irrespective of whether expiry was set through the setter or the constructor

Results

This was causing tests in FIT's ExpiryTest to fail (the performer was using the setter). Now these tests pass.

@cb-sdk-robot
Copy link
Collaborator

Can one of the admins verify this patch?

@DemetrisChr DemetrisChr merged commit cc7140b into couchbase:main Nov 8, 2023
3 checks passed
@DemetrisChr DemetrisChr deleted the RCBC-461-expiry-setter branch November 8, 2023 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants