-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add SdkAsyncHttpClientH1TestSuite (#829)
* SdkAsyncHttpClientH1TestSuite * fix naughtyHeaderCharactersDoNotGetToServer test exceptions in toPekkoRequest should be wrapped in a future failed * add comment about connectionReceiveServerErrorStatusShouldNotReuseConnection * scala 2.12 strikes again * silence netty logs SdkAsyncHttpClientH1TestSuite uses netty to simulate a server... * fix org.junit.platform.commons.JUnitException when loading test in scala 3 Error was: org.junit.platform.commons.JUnitException: ClassSelector [className = 'org.apache.pekko.stream.connectors.awsspi.RequestRunnerSpec$$anon$1', classLoader = java.net.URLClassLoader@79baaf07] resolution failed : ClassSelector [className = 'org.apache.pekko.stream.connectors.awsspi.RequestRunnerSpec$$anon$1', classLoader = java.net.URLClassLoader@79baaf07] resolution failed
- Loading branch information
1 parent
3cb1ed8
commit 56a2ee8
Showing
8 changed files
with
105 additions
and
20 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
36 changes: 36 additions & 0 deletions
36
...src/test/scala/org/apache/pekko/stream/connectors/awsspi/PekkoHttpClientH1TestSuite.scala
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.pekko.stream.connectors.awsspi | ||
|
||
import software.amazon.awssdk.http.{ SdkAsyncHttpClientH1TestSuite, SdkHttpConfigurationOption } | ||
import software.amazon.awssdk.http.async.SdkAsyncHttpClient | ||
import software.amazon.awssdk.utils.AttributeMap | ||
|
||
class PekkoHttpClientH1TestSuite extends SdkAsyncHttpClientH1TestSuite { | ||
|
||
override def setupClient(): SdkAsyncHttpClient = { | ||
PekkoHttpClient.builder().buildWithDefaults( | ||
AttributeMap.builder().put(SdkHttpConfigurationOption.TRUST_ALL_CERTIFICATES, Boolean.box(true)).build()); | ||
} | ||
|
||
// Failed tests | ||
// The logic to not reuse connections on server error status is not implemented in PekkoHttpClient, and | ||
// it seems that it is being reverted in https://github.com/aws/aws-sdk-java-v2/pull/5607 | ||
override def connectionReceiveServerErrorStatusShouldNotReuseConnection(): Unit = () | ||
|
||
} |
This file contains 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
This file contains 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
This file contains 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