-
Notifications
You must be signed in to change notification settings - Fork 67
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
[ISSUE #22] improving codeCov of mqtt.ds #96
Conversation
@@ -82,6 +82,11 @@ public void init() throws MQClientException { | |||
}, 0, 5, TimeUnit.SECONDS); | |||
} | |||
|
|||
public void initMQAdminExt() throws MQClientException { |
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.
take it out for ut
@@ -108,6 +113,9 @@ public void checkFirstTopicIfCreated(String firstTopic) { | |||
} | |||
|
|||
private void updateTopicRoute(String firstTopic) { | |||
if (StringUtils.isBlank(firstTopic)) { |
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.
bug of blank judgment
Codecov Report
@@ Coverage Diff @@
## main #96 +/- ##
==========================================
+ Coverage 44.04% 47.66% +3.61%
==========================================
Files 98 98
Lines 4200 4192 -8
Branches 656 655 -1
==========================================
+ Hits 1850 1998 +148
+ Misses 2016 1856 -160
- Partials 334 338 +4
Continue to review full report at Codecov.
|
@@ -28,9 +28,13 @@ public class MqAdmin { | |||
private DefaultMQAdminExt defaultMQAdminExt; | |||
|
|||
public MqAdmin(Properties properties) { | |||
this(properties.getProperty("NAMESRV_ADDR")); |
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.
add this constructor for optimizing MqFactory to reuse the same code block
defaultMQPushConsumer.registerMessageListener((MessageListenerConcurrently) messageListener); | ||
} | ||
return defaultMQPushConsumer; | ||
MqConsumer mqConsumer = new MqConsumer(properties, nameSrv); |
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.
reusing the same code block
@RunWith(MockitoJUnitRunner.class) | ||
public class TestOffsetStoreManager { | ||
public class TestLmqOffsetStoreManager { |
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.
renaming
continuously fix #22