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

Remove double exception print #4246

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Glutexo
Copy link
Collaborator

@Glutexo Glutexo commented Oct 11, 2024

All Pull Requests:

Check all that apply:

  • Have you followed the guidelines in our Contributing document, including the instructions about commit messages?
  • No Sensitive Data in this change?
  • Is this PR to correct an issue?
  • Is this PR an enhancement?

Complete Description of Additions/Changes:

In case of a connection error, an exception description was printed on the standard output twice: once by the outer test_connection method and once by the inner _(legacy_)test_urls method. The legacy version tries multiple URLs and prints the exception description on each failure. Thus, removed the outer print that only duplicates the last caught exception.

Card IDs:

@Glutexo Glutexo added the client These issues represent work to be done by the "client" team. label Oct 11, 2024
@Glutexo Glutexo self-assigned this Oct 11, 2024
@codecov-commenter
Copy link

codecov-commenter commented Oct 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.10%. Comparing base (6e5ded5) to head (b9e76ea).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4246      +/-   ##
==========================================
+ Coverage   76.94%   77.10%   +0.16%     
==========================================
  Files         758      758              
  Lines       41361    41360       -1     
  Branches     8734     8734              
==========================================
+ Hits        31826    31892      +66     
+ Misses       8482     8409      -73     
- Partials     1053     1059       +6     
Flag Coverage Δ
unittests 77.09% <100.00%> (+0.16%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@Glutexo
Copy link
Collaborator Author

Glutexo commented Oct 11, 2024

This pull request contains changes requested by Matyáš. First, I extracted the changes from #4191 that didn’t belong to that PR. Then, I only kept the requested changes, replacing an intermediary PR #4237.

Both pull requests introduce changes to the now untested test connection mechanic and both deal with exception handling. Because of that, general unit tests for sub-method calls are included in both of them. After one PR will have been merged I will resolve the conflict in the other one.

As for the caplog fixture, that is not supported on Python ≤2.7, I’m aware that the suggestion was to mark the tests as skipped. The change to logger asserts was however trivial. Moreover, I already used those in the sister pull request #4211. Such asserts are less semantic, but working. They need to be replaced after fixing the pipeline, but so do the skip marks.

Opening the pull request for review. @m-horky

@Glutexo Glutexo marked this pull request as ready for review October 11, 2024 13:55
@Glutexo Glutexo mentioned this pull request Oct 11, 2024
4 tasks
In case of a connection error, an exception description was printed on the standard output twice: once by the outer test_connection method and once by the inner _(legacy_)test_urls method. The legacy version tries multiple URLs and prints the exception description on each failure. Thus, removed the outer print that only duplicates the last caught exception.

Card IDs:

* CCT-724

Signed-off-by: Štěpán Tomsa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client These issues represent work to be done by the "client" team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants