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

[SCB-2731] fix flaky junit tests in common and core #3501

Merged
merged 1 commit into from
Nov 26, 2022

Conversation

anantdahiya8
Copy link
Contributor

@anantdahiya8 anantdahiya8 commented Nov 25, 2022

Summary

  1. TestInvocation#traceIdGeneratorInit
  • Using containsInAnyOrder so that the junit test passes for every order of the values

  1. TestRestClientRequestImpl#testForm
  • Checking all possible values so that the test does not fail

  1. TestRestClientRequestImpl#testCookie
  • Mocking for both cases "region=china-north; sessionid=abcdefghijklmnopqrstuvwxyz; " and "sessionid=abcdefghijklmnopqrstuvwxyz; region=china-north; ", So that the mock function works for both the cases

  1. RestServerCodecFilterTest#should_convert_exception_to_response_when_decode_request_failed
  • Json.encode can return the json string in different order. We need to check for all the possible values so that the test does not fail for some cases.

  1. RestProducerInvocationCreatorTest#should_failed_when_not_defined_any_schema
  • Json.encode can return the json string in different order. We need to check for all the possible values so that the test does not fail for some cases.

  1. RestProducerInvocationCreatorTest#should_failed_when_accept_is_not_support
  • Json.encode can return the json string in different order. We need to check for all the possible values so that the test does not fail for some cases.

Bug Link : https://issues.apache.org/jira/projects/SCB/issues/SCB-2731

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

Codecov Report

Merging #3501 (fe65835) into master (8a7f6b2) will increase coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master    #3501   +/-   ##
=========================================
  Coverage     74.38%   74.39%           
  Complexity      670      670           
=========================================
  Files          1589     1589           
  Lines         39830    39830           
  Branches       3633     3633           
=========================================
+ Hits          29628    29631    +3     
+ Misses         8721     8718    -3     
  Partials       1481     1481           
Impacted Files Coverage Δ
...mb/metrics/core/meter/os/cpu/AbstractCpuUsage.java 88.88% <0.00%> (-11.12%) ⬇️
...egistry/client/http/ServiceRegistryClientImpl.java 68.45% <0.00%> (+0.38%) ⬆️
...mb/config/ConfigCenterConfigurationSourceImpl.java 10.63% <0.00%> (+1.06%) ⬆️
.../servicecomb/registry/discovery/DiscoveryTree.java 100.00% <0.00%> (+3.27%) ⬆️

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

@liubao68 liubao68 merged commit ad0b38f into apache:master Nov 26, 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