You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pegasus.apache.org by GitBox <gi...@apache.org> on 2020/10/14 10:44:40 UTC
[GitHub] [incubator-pegasus] Smityz opened a new pull request #619: fix: fix unit test of capacity_unit_calculator_test
Smityz opened a new pull request #619:
URL: https://github.com/apache/incubator-pegasus/pull/619
Determine the type of incoming key(raw_key/hash_key) according to the situation
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org
For additional commands, e-mail: dev-help@pegasus.apache.org
[GitHub] [incubator-pegasus] hycdong commented on a change in pull request #619: fix: fix unit test of capacity_unit_calculator
Posted by GitBox <gi...@apache.org>.
hycdong commented on a change in pull request #619:
URL: https://github.com/apache/incubator-pegasus/pull/619#discussion_r505113257
##########
File path: src/server/test/capacity_unit_calculator_test.cpp
##########
@@ -50,11 +51,13 @@ class capacity_unit_calculator_test : public pegasus_server_test_base
std::unique_ptr<mock_capacity_unit_calculator> _cal;
public:
- const dsn::blob key = dsn::blob::create_from_bytes("key");
+ dsn::blob key, hash_key;
capacity_unit_calculator_test() : pegasus_server_test_base()
{
_cal = dsn::make_unique<mock_capacity_unit_calculator>(_server.get());
+ pegasus_generate_key(key, dsn::blob::create_from_bytes("h"), dsn::blob());
+ hash_key = dsn::blob::create_from_bytes("key");
Review comment:
I think it is better to rename `hash_key` to `test_hash_key` or `HASH_KEY`, or rename `hash_key` in check_and_set/check_and_mutate tests, to avoid unnecessary misunderstanding.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org
For additional commands, e-mail: dev-help@pegasus.apache.org
[GitHub] [incubator-pegasus] acelyc111 merged pull request #619: fix: fix unit test of capacity_unit_calculator
Posted by GitBox <gi...@apache.org>.
acelyc111 merged pull request #619:
URL: https://github.com/apache/incubator-pegasus/pull/619
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org
For additional commands, e-mail: dev-help@pegasus.apache.org
[GitHub] [incubator-pegasus] Smityz commented on a change in pull request #619: fix: fix unit test of capacity_unit_calculator
Posted by GitBox <gi...@apache.org>.
Smityz commented on a change in pull request #619:
URL: https://github.com/apache/incubator-pegasus/pull/619#discussion_r504636616
##########
File path: src/server/test/capacity_unit_calculator_test.cpp
##########
@@ -50,11 +51,13 @@ class capacity_unit_calculator_test : public pegasus_server_test_base
std::unique_ptr<mock_capacity_unit_calculator> _cal;
public:
- const dsn::blob key = dsn::blob::create_from_bytes("key");
+ dsn::blob key, hash_key;
capacity_unit_calculator_test() : pegasus_server_test_base()
{
_cal = dsn::make_unique<mock_capacity_unit_calculator>(_server.get());
+ pegasus_generate_key(key, dsn::blob::create_from_bytes("h"), dsn::blob());
+ hash_key = dsn::blob::create_from_bytes("key");
Review comment:
Yes, but I think it is ok to override it in check_and_set/check_and_mutate tests.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org
For additional commands, e-mail: dev-help@pegasus.apache.org
[GitHub] [incubator-pegasus] zhangyifan27 commented on pull request #619: fix: fix unit test of capacity_unit_calculator
Posted by GitBox <gi...@apache.org>.
zhangyifan27 commented on pull request #619:
URL: https://github.com/apache/incubator-pegasus/pull/619#issuecomment-708908070
LGTM
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org
For additional commands, e-mail: dev-help@pegasus.apache.org
[GitHub] [incubator-pegasus] zhangyifan27 commented on a change in pull request #619: fix: fix unit test of capacity_unit_calculator
Posted by GitBox <gi...@apache.org>.
zhangyifan27 commented on a change in pull request #619:
URL: https://github.com/apache/incubator-pegasus/pull/619#discussion_r504601876
##########
File path: src/server/test/capacity_unit_calculator_test.cpp
##########
@@ -50,11 +51,13 @@ class capacity_unit_calculator_test : public pegasus_server_test_base
std::unique_ptr<mock_capacity_unit_calculator> _cal;
public:
- const dsn::blob key = dsn::blob::create_from_bytes("key");
+ dsn::blob key, hash_key;
capacity_unit_calculator_test() : pegasus_server_test_base()
{
_cal = dsn::make_unique<mock_capacity_unit_calculator>(_server.get());
+ pegasus_generate_key(key, dsn::blob::create_from_bytes("h"), dsn::blob());
+ hash_key = dsn::blob::create_from_bytes("key");
Review comment:
`hash_key` is duplicate with `hash_key` in check_and_set/check_and_mutate tests.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org
For additional commands, e-mail: dev-help@pegasus.apache.org