Skip to content
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 #8384] Add more test coverage for ClientConfig #8385

Merged
merged 4 commits into from
Jul 15, 2024

Conversation

yx9o
Copy link
Contributor

@yx9o yx9o commented Jul 11, 2024

Fixes #8384 .

before:
image

after:
image

@codecov-commenter
Copy link

codecov-commenter commented Jul 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 44.29%. Comparing base (67ddc1d) to head (6768416).
Report is 128 commits behind head on develop.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #8385      +/-   ##
=============================================
+ Coverage      44.22%   44.29%   +0.07%     
- Complexity     10727    10768      +41     
=============================================
  Files           1274     1274              
  Lines          88939    88951      +12     
  Branches       11432    11433       +1     
=============================================
+ Hits           39330    39398      +68     
+ Misses         44636    44592      -44     
+ Partials        4973     4961      -12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines 47 to 68
public void assertClientConfig() {
assertEquals("unitName", clientConfig.getUnitName());
assertEquals("127.0.0.1", clientConfig.getClientIP());
assertEquals(1, clientConfig.getClientCallbackExecutorThreads());
assertEquals(1000 * 30, clientConfig.getPollNameServerInterval());
assertEquals(1000 * 30, clientConfig.getHeartbeatBrokerInterval());
assertEquals(1000 * 5, clientConfig.getPersistConsumerOffsetInterval());
assertEquals(1000, clientConfig.getPullTimeDelayMillsWhenException());
assertEquals("{}", clientConfig.getSocksProxyConfig());
assertEquals(LanguageCode.JAVA, clientConfig.getLanguage());
assertEquals(AccessChannel.LOCAL, clientConfig.getAccessChannel());
assertEquals(1000 * 3, clientConfig.getMqClientApiTimeout());
assertEquals(200, clientConfig.getDetectTimeout());
assertEquals(1000 * 2, clientConfig.getDetectInterval());
assertTrue(clientConfig.isUnitMode());
assertTrue(clientConfig.isDecodeReadBody());
assertTrue(clientConfig.isDecodeDecompressBody());
assertTrue(clientConfig.isEnableStreamRequestType());
assertTrue(clientConfig.isSendLatencyEnable());
assertTrue(clientConfig.isEnableHeartbeatChannelEventListener());
assertFalse(clientConfig.isUseHeartbeatV2());
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This test doesn't seem to make much sense

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This test doesn't seem to make much sense

OK, I'll remove it.

@yx9o
Copy link
Contributor Author

yx9o commented Jul 14, 2024

@RongtongJin Done, please review, thank you.

@zhouxinyu zhouxinyu merged commit 6f77f05 into apache:develop Jul 15, 2024
10 checks passed
@yx9o yx9o deleted the dev-8384 branch July 15, 2024 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement] Add more test coverage for ClientConfig
5 participants