test(sdk-core): remove apache-client and netty-nio-client test dependencies - #7324
Open
joviegas wants to merge 1 commit into
Open
test(sdk-core): remove apache-client and netty-nio-client test dependencies#7324joviegas wants to merge 1 commit into
joviegas wants to merge 1 commit into
Conversation
joviegas
force-pushed
the
joviegas/remove-http-client-dep-from-sdk-core
branch
5 times, most recently
from
August 27, 2026 19:47
e5b1fd9 to
7ecb620
Compare
joviegas
force-pushed
the
joviegas/remove-http-client-dep-from-sdk-core
branch
from
August 27, 2026 20:30
7ecb620 to
53319e6
Compare
jencymaryjoseph
approved these changes
Aug 28, 2026
| * directly. | ||
| */ | ||
| public static ExecutionContext executionContext(SdkHttpFullRequest request) { | ||
| InterceptorContext incerceptorContext = |
Contributor
There was a problem hiding this comment.
nit : interceptor* typo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
sdk-coredepended onapache-clientandnetty-nio-clientat test scope. Those dependencies blocked adding tests forsdk-corebehavior totest/http-client-tests: every HTTP client module test-depends ontest/http-client-tests, so pointing it atsdk-corecloses the cyclesdk-core -> apache-client -> http-client-tests -> sdk-core, which results Maven build failure with cyclic dependency error.This PR removes both dependencies, so
test/http-client-testsnow depends onsdk-core. The eight existing tests that need a real HTTP client move into four suites there, which each client module runs by subclassing.Modifications
POM files
core/sdk-core/pom.xmlapache-clientandnetty-nio-clienttest dependencies.test/http-client-tests/pom.xmlsdk-core, required by the relocated test suites.Deleted
sdk-coreAmazonHttpClientWireMockTestSdkHttpClientSdkPipelineBehaviorTestSuite.sdk-coreSdkTransactionIdInHeaderTestSdkHttpClientSdkPipelineBehaviorTestSuite.sdk-coreContentStreamProviderWireMockTestSdkHttpClientSdkPipelineBehaviorTestSuite.sdk-coreAmazonHttpClientSslHandshakeTimeoutTest(src/it)SdkHttpClientSslHandshakeTimeoutTestSuite, whichapache-clientsubclasses asApacheHttpClientSslHandshakeTimeoutTest.sdk-coreConnectionPoolMaxConnectionsIntegrationTest(src/it)SdkHttpClientConnectionPoolTestSuite, whichapache-clientsubclasses asApacheConnectionPoolMaxConnectionsTest.sdk-corecore/http/server/MockServerorg.apache.http. ItsUNRESPONSIVEandOVERLOADEDbehaviors were added to the sharedMockServerinhttp-client-tests, leaving one implementation instead of two.sdk-coreUnresponsiveMockServerTestBaseSdkHttpClientSslHandshakeTimeoutTestSuitenow starts the mock server itself.sdk-coreMockServerTestBaseUnresponsiveMockServerTestBase.Modified
sdk-coreClasspathSdkHttpServiceProviderTestApacheSdkHttpServiceandNettySdkAsyncHttpServicewith two test-local service implementations. The provider selects implementations by class name from a priority map, so the real classes are not required. All four scenarios are unchanged.sdk-coreutils/HttpTestUtilstestSdkHttpClient()andtestSdkAsyncHttpClient()return the new stub clients instead of loading Apache or Netty throughServiceLoader. The remaining methods are unchanged.sdk-coreHttpClientApiCallTimeoutTestStubSdkHttpClientto the client builder. Error-path cases build a second client that returns a 500 status. Stays on JUnit 4 with the original sleep values and assertions.sdk-coreHttpClientApiCallAttemptTimeoutTestHttpClientApiCallTimeoutTest.sdk-coreAsyncHttpClientApiCallTimeoutTestsStubSdkAsyncHttpClient. TheslowApiAttempttest moved toSdkAsyncHttpClientApiCallAttemptTimeoutTestSuite, because it needs a delayed response from a real server.http-client-testshttp/server/MockServerUNRESPONSIVEandOVERLOADEDbehaviors and a non-TLSstartServer(), ported from the deletedsdk-corecopy. Existing behaviors and the TLSstartServeroverload are unchanged.Added
sdk-coreutils/StubSdkHttpClientSdkHttpClientthat returns a configurable status code without opening a socket. Replaces theServiceLoader-provided Apache client in tests.sdk-coreutils/StubSdkAsyncHttpClientServiceLoader-provided Netty client.http-client-testsSdkHttpClientSdkPipelineBehaviorTestSuitecreateSdkHttpClient().http-client-testsSdkAsyncHttpClientApiCallAttemptTimeoutTestSuiteslowApiAttempttest.http-client-testsSdkHttpClientConnectionPoolTestSuitemaxConnections, which isapache-clientandapache5-client. Subclasses supply the client and the exception their HTTP library raises on pool exhaustion.http-client-testsSdkHttpClientSslHandshakeTimeoutTestSuiteapache-client,apache5-clientandurl-connection-client. Subclasses supply the client.apache-clientApacheHttpClientSdkPipelineBehaviorTestApacheHttpClient.netty-nio-clientNettyNioAsyncHttpClientApiCallAttemptTimeoutTestNettyNioAsyncHttpClient.apache-clientApacheHttpClientSslHandshakeTimeoutTestSdkHttpClientSslHandshakeTimeoutTestSuite. Supplies anApacheHttpClientwith the socket timeout the suite asks for.apache-clientApacheConnectionPoolMaxConnectionsTestSdkHttpClientConnectionPoolTestSuite. Supplies anApacheHttpClientwithmaxConnections(1)and namesConnectionPoolTimeoutExceptionas the expected cause.http-client-testsutils/HttpTestUtilssdk-corehelper, without theServiceLoaderfactory methods, so callers pass a client explicitly. Also holdsexecutionContext(...).http-client-testsutils/ValidSdkObjectssdk-corehelper, same package.http-client-testsutils/http/WireMockTestBasesdk-corehelper, same package.http-client-testscore/http/NoopTestRequestsdk-corehelper, same package.http-client-testsinternal/util/ResponseHandlerTestUtilssdk-corehelper, same package.http-client-testsinternal/util/AsyncResponseHandlerTestUtilssdk-corehelper, same package.http-client-testsinternal/http/response/NullErrorResponseHandlersdk-corehelper, same package.http-client-testsinternal/http/response/EmptySdkResponseHandlersdk-corehelper, same package. Used by the relocated connection pool test.The helpers are copies because the relocated tests drive the
sdk-coreexecution pipeline, and this repository does notpublish test-jars, so
http-client-testscannot reference classes undersdk-core/src/test.License