-
Notifications
You must be signed in to change notification settings - Fork 1k
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
#1013 Migrating: ('EXPIRE', 'EXPIREAT', 'EXPIRETIME', 'TTL', 'PTTL') #1149
base: master
Are you sure you want to change the base?
Conversation
@@ -85,7 +85,7 @@ func TestCopy(t *testing.T) { | |||
{Command: "TTL", Body: map[string]interface{}{"key": "k1"}}, | |||
{Command: "TTL", Body: map[string]interface{}{"key": "k2"}}, | |||
}, | |||
expected: []interface{}{"OK", float64(1), float64(-1), float64(-1)}, |
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.
The data type of these results should not change with this migration. Same for all other instances.
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.
Since the functions are returning clientio.IntegerOne
, clientio.IntegerZero
, etc., the decoder in (e *HTTPCommandExecutor) FireCommand
is decoding it to string "1"
, "0"
, etc. Therefore I had to change the expected values from float to string where the migrated functions have been used.
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.
@lucifercr07 could you please confirm this behavior?
@@ -179,9 +179,9 @@ func TestSetWithExat(t *testing.T) { | |||
|
|||
resp, err = exec.FireCommandAndReadResponse(conn, "TTL k") | |||
assert.Nil(t, err) | |||
respFloat, ok = resp.(float64) |
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 do we need to change this?
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.
same explanation as above in case of websockets
too
@@ -200,9 +200,9 @@ func TestSetWithExat(t *testing.T) { | |||
|
|||
resp, err = exec.FireCommandAndReadResponse(conn, "TTL k") | |||
assert.Nil(t, err) | |||
respFloat, ok := resp.(float64) |
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 do we need to change this?
Migrated the following commands: ('EXPIRE', 'EXPIREAT', 'EXPIRETIME', 'TTL', 'PTTL')
Checklist
Closes: #1013