-
Notifications
You must be signed in to change notification settings - Fork 0
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
adds tests and read ttl functionality #11
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One suggestion, one question
@client.insert(:test, item) | ||
|
||
resulting_ttl = @client.select_ttl(:test, :d, {:id => 'i'}) | ||
assert (1..ttl).include? resulting_ttl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the include?
in this test instead of just an assert_equal ttl, resulting_ttl
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
depending on how long the query takes to execute the TTL could be less than it originally was
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, now I get it
@@ -161,6 +161,25 @@ def string_keys(hash) | |||
end | |||
end | |||
|
|||
context 'select_ttl' do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be good to see one more test with two where_arguments (one integer and one string) just to fully exercise that select_ttl_statement
method ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah good idea i can do that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👾
Allows us to read the TTL off of a cell by passing in the table_name, target column, and key value pairs for the where query