Skip to content

Conversation

@githublaohu
Copy link
Contributor

unit-test-transport

}

TEST(clientRemotingProcessorS, getConsumerRunningInfo) {
MockMQClientFactory *factory = new MockMQClientFactory("testClientId", 4, 3000, 4000, "a");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

factory and info not deleted, please check the other TEST for not free the object, or use shared_ptr. also i think you can use local object, no need with new

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mock::AllowLeak(factory); Be equal to deleted

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but there are many point without Mock::AllowLeak

using Json::FastWriter;
using Json::Value;

using rocketmq::ClientRemotingProcessor;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for use so many class under namespace rocketmq, i think you can use "using namespace rocketmq" replace of "using rocketmq::*"

using testing::Return;

TEST(MQDecoderTest, messageProperties2String) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why delete TEST(MQDecoderTest, messageProperties2String)?

@ShannonDing ShannonDing merged commit 3f83ddc into apache:master Apr 3, 2019
@ShannonDing ShannonDing added this to the 1.2.2 milestone Apr 3, 2019
@ShannonDing ShannonDing added the unit test unit test label Apr 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

unit test unit test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants