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

Cleanup URLConnection wrappering code #29

Merged
merged 4 commits into from
Oct 27, 2023
Merged

Conversation

bidetofevil
Copy link
Collaborator

@bidetofevil bidetofevil commented Oct 26, 2023

Goal

Clean up URLConnection wrapping code by putting them in the right internal package and giving them names that are more appropriate. No material changes to logic have been made - check out the individual commits for details.

Copy link
Collaborator Author

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@bidetofevil bidetofevil marked this pull request as ready for review October 26, 2023 07:18
Copy link
Contributor

@fractalwrench fractalwrench left a comment

Choose a reason for hiding this comment

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

Left a few comments inline. I'm slightly nervous about making a change in this area as it's pretty complex - what is the general test coverage looking like these days? Do we need to perform any manual testing to sanity check that requests show up in the dash?

@bidetofevil
Copy link
Collaborator Author

Left a few comments inline. I'm slightly nervous about making a change in this area as it's pretty complex - what is the general test coverage looking like these days? Do we need to perform any manual testing to sanity check that requests show up in the dash?

Right. I should have been more clear - I didn't actually change anything, just fixed some IDE suggested warnings, renamed the classes, and moved them. It's all broken down in the separate commits for clarity.

I wasn't actually going to make material changes until I have more tests. Right now, I have decent coverage of the wrapper (newly renamed EmbraceHttpUrlConnectionDelegate, but not everything else, which I'm going to be working on this week.

I fact, I don't plan to make significant changes - I just don't think it's worth it given the risks and gains. But we do want test coverage so I plan to add that, but I wanted to do this earlier so the tests would make more sense initially.

@codecov
Copy link

codecov bot commented Oct 26, 2023

Codecov Report

Merging #29 (76092b5) into master (d4ae35a) will increase coverage by 0.00%.
Report is 11 commits behind head on master.
The diff coverage is 4.80%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #29   +/-   ##
=======================================
  Coverage   72.66%   72.66%           
=======================================
  Files         305      305           
  Lines        9986     9992    +6     
  Branches     1440     1440           
=======================================
+ Hits         7256     7261    +5     
- Misses       2161     2162    +1     
  Partials      569      569           
Files Coverage Δ
...ava/io/embrace/android/embracesdk/EmbraceImpl.java 47.08% <ø> (ø)
...android/embracesdk/EmbraceInternalInterfaceImpl.kt 92.20% <ø> (ø)
...id/embracesdk/internal/EmbraceInternalInterface.kt 35.71% <ø> (ø)
.../network/http/CountingInputStreamWithCallback.java 43.58% <ø> (ø)
...dk/internal/network/http/CountingOutputStream.java 58.33% <ø> (ø)
...nal/network/http/EmbraceUrlConnectionDelegate.java 50.00% <ø> (ø)
...internal/network/http/EmbraceUrlStreamHandler.java 55.00% <ø> (ø)
...l/network/http/EmbraceUrlStreamHandlerFactory.java 45.45% <ø> (ø)
.../internal/network/http/HttpUrlConnectionTracker.kt 0.00% <ø> (ø)
...acesdk/internal/network/http/NetworkCaptureData.kt 22.22% <ø> (ø)
... and 12 more

... and 1 file with indirect coverage changes

Base automatically changed from hho/move-clocks to master October 26, 2023 18:42
Copy link
Contributor

@fractalwrench fractalwrench left a comment

Choose a reason for hiding this comment

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

LGTM

@bidetofevil bidetofevil merged commit 8065b03 into master Oct 27, 2023
3 of 4 checks passed
@bidetofevil bidetofevil deleted the hho/urlconnection-cleanup branch October 27, 2023 20: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.

None yet

2 participants