Skip to content

[SCB-2739] fix flaky tests in clients - #3497

Merged
liubao68 merged 1 commit into
apache:masterfrom
anantdahiya8:fix-flaky-clients
Nov 24, 2022
Merged

[SCB-2739] fix flaky tests in clients#3497
liubao68 merged 1 commit into
apache:masterfrom
anantdahiya8:fix-flaky-clients

Conversation

@anantdahiya8

@anantdahiya8 anantdahiya8 commented Nov 23, 2022

Copy link
Copy Markdown
Contributor

Summary

The function writeValueAsString returns the order of elements in no fix order and can hamper the functionality of mock function.
For the test #TestSendHeartBeats , these are 2 values I received from the function writeValueAsString
ServiceComb-1
ServiceComb-2

We are only changing the code to take any string value for the 3rd parameter and the first 2 parameter will be checked.
Similar code is present in other test functions - TestGetServiceInstanceMessage, TestDeleteServiceInstance , where all the parameters are mocked for any value.

Follow this checklist to help us incorporate your contribution quickly and easily:

  • Make sure there is a JIRA issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Format the pull request title like [SCB-XXX] Fixes bug in ApproximateQuantiles, where you replace SCB-XXX with the appropriate JIRA issue.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Run mvn clean install -Pit to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

Merging #3497 (0eebf52) into master (8a7f6b2) will decrease coverage by 0.00%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master    #3497      +/-   ##
============================================
- Coverage     74.38%   74.38%   -0.01%     
  Complexity      670      670              
============================================
  Files          1589     1589              
  Lines         39830    39830              
  Branches       3633     3633              
============================================
- Hits          29628    29626       -2     
- Misses         8721     8722       +1     
- Partials       1481     1482       +1     
Impacted Files Coverage Δ
...mb/metrics/core/meter/os/cpu/AbstractCpuUsage.java 88.88% <0.00%> (-11.12%) ⬇️
...he/servicecomb/foundation/common/net/NetUtils.java 64.80% <0.00%> (-1.61%) ⬇️
...egistry/client/http/ServiceRegistryClientImpl.java 68.45% <0.00%> (+0.38%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@liubao68
liubao68 merged commit 5de6563 into apache:master Nov 24, 2022
lbc97 pushed a commit to lbc97/servicecomb-java-chassis that referenced this pull request Feb 21, 2023
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.

3 participants