Class HttpTransporterTest
java.lang.Object
org.eclipse.aether.internal.test.util.http.HttpTransporterTest
@TestMethodOrder(org.junit.jupiter.api.MethodOrderer.MethodName.class)
public abstract class HttpTransporterTest
extends Object
Common set of tests against Http transporter.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Authenticationprotected static final Pathprotected Runnableprotected static SSLContextprotected HttpTransporterFactoryprotected HttpServerprotected static final longprotected static final Pathprotected Proxyprotected Fileprotected static final Pathprotected DefaultRepositorySystemSessionprotected HttpTransporter -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedHttpTransporterTest(Supplier<HttpTransporterFactory> transporterFactorySupplier) -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidafterAll()protected static voidprotected booleanIndicates whether the transporter implementation closes all connections when the transporter is closed.protected static SSLContextCreates anSSLContextfor the client that extends the default keystore and truststore with the entries fromSERVER_STORE_PATH(password"server-pwd") andCLIENT_STORE_PATH(password"client-pwd").protected booleanprotected RemoteRepositoryprotected voidnewTransporter(String url) protected voidsetUp(org.junit.jupiter.api.TestInfo testInfo) protected static ChecksumExtractorProvides compression algorithms supported by the transporter implementation.protected booleanIndicates whether the transporter implementation supports HTTP/2.protected booleanIndicates whether the transporter implementation supports HTTP/3.protected booleanIndicates whether the transporter implementation supports preemptive authentication (i.e., sending credentials with the first request).protected voidtearDown()protected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidtestGet_WithCompression(String encoding) protected voidprotected voidtestPeek()protected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected void
-
Field Details
-
SERVER_STORE_PATH
-
CLIENT_STORE_PATH
-
PEM_QUICHE_SERVER_PATH
-
defaultSslContext
-
session
-
factory
-
transporter
-
closer
-
repoDir
-
httpServer
-
auth
-
proxy
-
OLD_FILE_TIMESTAMP
- See Also:
-
-
Constructor Details
-
HttpTransporterTest
-
-
Method Details
-
beforeAll
- Throws:
NoSuchAlgorithmException
-
afterAll
-
createClientSSLContext
Creates anSSLContextfor the client that extends the default keystore and truststore with the entries fromSERVER_STORE_PATH(password"server-pwd") andCLIENT_STORE_PATH(password"client-pwd").- Returns:
- an
SSLContextcombining default and custom key/trust material
-
standardChecksumExtractor
-
newRepo
-
newTransporter
- Throws:
Exception
-
setUp
- Throws:
Exception
-
tearDown
- Throws:
Exception
-
closesAllConnectionsOnTransporterClose
Indicates whether the transporter implementation closes all connections when the transporter is closed.- Returns:
trueif all connections are closed on transporter close,falseotherwise.
-
supportsPreemptiveAuth
Indicates whether the transporter implementation supports preemptive authentication (i.e., sending credentials with the first request).- Returns:
trueif preemptive authentication is supported,falseotherwise.
-
supportsHttp3
Indicates whether the transporter implementation supports HTTP/3.- Returns:
trueif HTTP/3 is supported,falseotherwise.
-
supportsHttp2
Indicates whether the transporter implementation supports HTTP/2.- Returns:
trueif HTTP/2 is supported,falseotherwise.
-
testClassify
-
testPeek
- Throws:
Exception
-
testPeek_DoesNotAcceptRfc9457
- Throws:
Exception
-
testRetryHandler_defaultCount_positive
- Throws:
Exception
-
testRetryHandler_defaultCount_negative
- Throws:
Exception
-
testRetryHandler_tooManyRequests_explicitCount_positive
- Throws:
Exception
-
testRetryHandler_tooManyRequests_explicitCount_negative
- Throws:
Exception
-
testRetryHandler_explicitCount_positive
- Throws:
Exception
-
testRetryHandler_disabled
- Throws:
Exception
-
testPeek_NotFound
- Throws:
Exception
-
testPeek_Closed
- Throws:
Exception
-
testPeek_Authenticated
- Throws:
Exception
-
testPeek_Unauthenticated
- Throws:
Exception
-
testPeek_ProxyAuthenticated
- Throws:
Exception
-
testPeek_ProxyUnauthenticated
- Throws:
Exception
-
testPeek_SSL
- Throws:
Exception
-
testPeek_Redirect
- Throws:
Exception
-
testGet_ToMemory
- Throws:
Exception
-
testGet_ToFile
- Throws:
Exception
-
testGet_ToFileTimestamp
- Throws:
Exception
-
testGet_AcceptsRfc9457
- Throws:
Exception
-
testGet_ParseRfc9457
- Throws:
Exception
-
supportedCompressionAlgorithms
Provides compression algorithms supported by the transporter implementation. This should be the string value passed in theAccept-Encodingheader.- Returns:
- stream of supported compression algorithm names
- See Also:
-
exposeContentCodingInTransportProperties
-
testGet_WithCompression
@ParameterizedTest @ValueSource(strings={"br","gzip","zstd"}) protected void testGet_WithCompression(String encoding) throws Exception - Throws:
Exception
-
testGet_EmptyResource
- Throws:
Exception
-
testGet_EncodedResourcePath
- Throws:
Exception
-
testGet_Authenticated
- Throws:
Exception
-
testGet_Unauthenticated
- Throws:
Exception
-
testGet_ProxyAuthenticated
- Throws:
Exception
-
testGet_ProxyUnauthenticated
- Throws:
Exception
-
testGet_RFC9457Response
- Throws:
Exception
-
testGet_RFC9457Response_with_missing_fields
- Throws:
Exception
-
testGet_SSL
- Throws:
Exception
-
testGet_SSL_WithServerErrors
- Throws:
Exception
-
testGet_HTTPS_Unknown_SecurityMode
- Throws:
Exception
-
testGet_HTTPS_Insecure_SecurityMode
- Throws:
Exception
-
testGet_HTTPS_HTTP2Only_Insecure_SecurityMode
- Throws:
Exception
-
testGet_HTTP3Only
- Throws:
Exception
-
testGet_HTTP3
- Throws:
Exception
-
testGet_HTTP3FallbackToHTTP2
- Throws:
Exception
-
testGet_Redirect
- Throws:
Exception
-
testGet_Resume
- Throws:
Exception
-
testGet_ResumeLocalContentsOutdated
- Throws:
Exception
-
testGet_ResumeRangesNotSupportedByServer
- Throws:
Exception
-
testGet_Checksums_Nexus
- Throws:
Exception
-
testGet_Checksums_XChecksum
- Throws:
Exception
-
testGet_FileHandleLeak
- Throws:
Exception
-
testGet_NotFound
- Throws:
Exception
-
testGet_Closed
- Throws:
Exception
-
testGet_StartCancelled
- Throws:
Exception
-
testGet_ProgressCancelled
- Throws:
Exception
-
testPut_FromMemory
- Throws:
Exception
-
testPut_AcceptsRfc9457
- Throws:
Exception
-
testPut_FromFile
- Throws:
Exception
-
testPut_EmptyResource
- Throws:
Exception
-
testPut_EncodedResourcePath
- Throws:
Exception
-
testPut_Authenticated_ExpectContinue
- Throws:
Exception
-
testPut_Authenticated_ExpectContinueBroken
- Throws:
Exception
-
testPut_Authenticated_ExpectContinueRejected
- Throws:
Exception
-
testPut_Authenticated_ExpectContinueDisabled
- Throws:
Exception
-
testPut_Authenticated_ExpectContinueRejected_ExplicitlyConfiguredHeader
@Test protected void testPut_Authenticated_ExpectContinueRejected_ExplicitlyConfiguredHeader() throws Exception- Throws:
Exception
-
testPut_Unauthenticated
- Throws:
Exception
-
testPut_ProxyAuthenticated
- Throws:
Exception
-
testPut_ProxyUnauthenticated
- Throws:
Exception
-
testPut_SSL
- Throws:
Exception
-
testPut_FileHandleLeak
- Throws:
Exception
-
testPut_Closed
- Throws:
Exception
-
testPut_StartCancelled
- Throws:
Exception
-
testPut_ProgressCancelled
- Throws:
Exception
-
testGetPut_AuthCache
- Throws:
Exception
-
testPut_PreemptiveIsDefault
- Throws:
Exception
-
testPut_AuthCache
- Throws:
Exception
-
testPut_AuthCache_Preemptive
- Throws:
Exception
-
testPut_WithResponseBody
- Throws:
Exception
-
testConcurrency
- Throws:
Exception
-
testConnectTimeout
- Throws:
Exception
-
testRequestTimeout
- Throws:
Exception
-
testUserAgent
- Throws:
Exception
-
testCustomHeaders
- Throws:
Exception
-
testServerAuthScope_NotUsedForProxy
- Throws:
Exception
-
testProxyAuthScope_NotUsedForServer
- Throws:
Exception
-
testAuthSchemeReuse
- Throws:
Exception
-
testAuthSchemePreemptive
- Throws:
Exception
-