Closed wujia closed 6 years ago
加上单元测试
Merging #43 into master will decrease coverage by
38.25%
. The diff coverage is100%
.
@@ Coverage Diff @@
## master #43 +/- ##
===========================================
- Coverage 90.6% 52.35% -38.26%
===========================================
Files 35 35
Lines 1714 1723 +9
===========================================
- Hits 1553 902 -651
- Misses 161 821 +660
Impacted Files | Coverage Δ | |
---|---|---|
lib/mq_client_api.js | 26.06% <100%> (-49.19%) |
:arrow_down: |
lib/store/remote_broker.js | 7.14% <0%> (-90%) |
:arrow_down: |
lib/consumer/mq_push_consumer.js | 7.5% <0%> (-86.01%) |
:arrow_down: |
lib/producer/topic_publish_info.js | 29.41% <0%> (-64.71%) |
:arrow_down: |
lib/producer/mq_producer.js | 28.31% <0%> (-62.84%) |
:arrow_down: |
lib/process_queue.js | 20.83% <0%> (-58.34%) |
:arrow_down: |
lib/channel.js | 44.18% <0%> (-55.82%) |
:arrow_down: |
lib/mq_client.js | 51.37% <0%> (-36.9%) |
:arrow_down: |
lib/utils/index.js | 70.83% <0%> (-29.17%) |
:arrow_down: |
... and 5 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 9fd4004...436fd95. Read the comment docs.
添加了一个单元测试,本地执行能够pass,ci上执行不通过
it('should getTopicRouteInfoFromNameServer ok if old one is closed', async () => {
client._namesrvAddrList.push('1.2.3.4:80');
client._namesrvAddrList.push('6.7.8.9:80');
const res = await client.getTopicRouteInfoFromNameServer('TEST_TOPIC', 3000);
assert(res);
});
+1
增加nameserver的健壮性: 当metaq 的nameserver 部分机器不可用的时候,尝试使用其它机器