-
Notifications
You must be signed in to change notification settings - Fork 2.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
Merge Sharding tests in Go migrated from Python #5790
Conversation
ajeetj
commented
Feb 5, 2020
- The base structure is copied from resharding test case
- Minor changes in base_sharding.go as we are comparing multiple values now
- updated config for merge sharding
Signed-off-by: Ajeet jain <[email protected]>
Signed-off-by: Ajeet jain <[email protected]>
Signed-off-by: Ajeet jain <[email protected]>
165cc39
to
e1b4096
Compare
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.
A few nits. Otherwise looks good. I can approve once they are addressed.
|
||
// TestV3MergeShardingString - tests merge sharding using a Byte column | ||
func TestV3MergeShardingString(t *testing.T) { | ||
sharding.TestMergesharding(t, true) |
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.
it will be nice to add /* useVarbinaryShardingKeyType */
before true
.
Also why v3 in the name? v2 is no longer relevant, so we can remove 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.
Done
shard2 = &cluster.Shard{Name: "80-"} | ||
|
||
// merge shard | ||
// merging -40 & 40-80 t0 -80 |
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.
type: t0 -> to
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.
Done
) | ||
|
||
// TestV3MergeSharding - tests merge sharding using a INT column | ||
func TestV3MergeSharding(t *testing.T) { |
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 comment here. remove v3, add comment before boolean.
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.
Updated
test/config.json
Outdated
@@ -318,6 +296,28 @@ | |||
"site_test" | |||
] | |||
}, | |||
"merge_sharding": { | |||
"File": "mergesharding_v3_test.go", |
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.
rename v3 -> int
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.
Updated
Signed-off-by: Ajeet jain <[email protected]>
@deepthi Addressed review comments. Waiting for checks to pass. |
Signed-off-by: Ajeet jain <[email protected]>
867e40b
to
85410f1
Compare
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.
Nice work!