Skip to content

Add support for OkHttp 4.4+ - #1672

Merged
felixbarny merged 4 commits into
elastic:masterfrom
felixbarny:okhttp4
Feb 22, 2021
Merged

felixbarny merged 4 commits into
elastic:masterfrom
felixbarny:okhttp4

Conversation

@felixbarny

@felixbarny felixbarny commented Feb 19, 2021 •

Copy link
Copy Markdown
Member

What does this PR do?

closes #1609

Checklist

  • This is an enhancement of existing features, or a new feature in existing plugins
    • I have updated CHANGELOG.asciidoc
    • I have added tests that prove my fix is effective or that my feature works
    • Added an API method or config option? Document in which version this will be introduced
    • I have made corresponding changes to the documentation
  • This is a bugfix
  • This is a new plugin
    • I have updated CHANGELOG.asciidoc
    • My code follows the style guidelines of this project
    • I have made corresponding changes to the documentation
    • I have added tests that prove my fix is effective or that my feature works
    • New and existing unit tests pass locally with my changes
    • I have updated supported-technologies.asciidoc
    • Added an API method or config option? Document in which version this will be introduced
    • Added an instrumentation plugin? Describe how you made sure that old, non-supported versions are not instrumented by accident.
  • This is something else

@ghost

ghost commented Feb 19, 2021 •

Copy link
Copy Markdown

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Started by user Felix Barnsteiner

  • Start Time: 2021-02-22T09:14:12.281+0000

  • Duration: 48 min 54 sec

  • Commit: 3ed0c9c

Test stats 🧪

Test Results
Failed 0
Passed 1848
Skipped 14
Total 1862

Trends 🧪

Image of Build Times

Image of Tests

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 1848
Skipped 14
Total 1862

Comment thread CHANGELOG.asciidoc Outdated
import java.util.List;

@RunWith(Parameterized.class)
public class OkHttp3ClientVersionIT {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[minor] maybe remove the 3 in the class name as we only test version 4.x

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It's named that way as it tests the com.squareup.okhttp3 module. I've added some versions from the 3.x version line.

return Arrays.asList(new Object[][]{
// ivy can't automatically resolve the dependencies, so we'll have to manually type them in
// check https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp for the respective versions of kotlin and okio
{List.of("com.squareup.okhttp3:okhttp:4.3.0", "org.jetbrains.kotlin:kotlin-stdlib:1.3.61", "com.squareup.okio:okio:2.4.1")},

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why not have a 1.x and 2.x versions in this list also ? I know that earlier version might not depend on Kotlin, thus we could expect them to be quite different code-wise.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

These are tested in OkHttpClientInstrumentationTest.java (not OkHttp3)

@felixbarny
felixbarny merged commit ba301b5 into elastic:master Feb 22, 2021
@felixbarny
felixbarny deleted the okhttp4 branch February 22, 2021 10:28
SylvainJuge pushed a commit to SylvainJuge/apm-agent-java that referenced this pull request Mar 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support OkHttp3 clients >= 4.4.0

3 participants