You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "jtjeferreira (via GitHub)" <gi...@apache.org> on 2024/09/25 15:37:16 UTC
[PR] WIP: SdkAsyncHttpClientH1TestSuite [pekko-connectors]
jtjeferreira opened a new pull request, #829:
URL: https://github.com/apache/pekko-connectors/pull/829
depends on #827
There is a junit test suite in AWS SDK that might be useful to test the PekkoHttpClient
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] WIP: SdkAsyncHttpClientH1TestSuite [pekko-connectors]
Posted by "jtjeferreira (via GitHub)" <gi...@apache.org>.
jtjeferreira commented on PR #829:
URL: https://github.com/apache/pekko-connectors/pull/829#issuecomment-2379176159
> @jtjeferreira I merged #827 - can you rebase this and get it ready for merging?
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] WIP: SdkAsyncHttpClientH1TestSuite [pekko-connectors]
Posted by "jtjeferreira (via GitHub)" <gi...@apache.org>.
jtjeferreira commented on PR #829:
URL: https://github.com/apache/pekko-connectors/pull/829#issuecomment-2375076620
> > The Scala 3 build is failing for this PR. Some classloading issue for junit.
>
> I will have a look
I managed to reproduce locally, but only in java 8. I will keep digging...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] WIP: SdkAsyncHttpClientH1TestSuite [pekko-connectors]
Posted by "jtjeferreira (via GitHub)" <gi...@apache.org>.
jtjeferreira commented on PR #829:
URL: https://github.com/apache/pekko-connectors/pull/829#issuecomment-2375038354
> There is a task associated with this. #655
>
This is a bit different, as these are not integration tests and do not require an AWS account
> I'd prefer to cover the integration test CI in a different PR.
Agree
>
> The Scala 3 build is failing for this PR. Some classloading issue for junit.
I will have a look
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] WIP: SdkAsyncHttpClientH1TestSuite [pekko-connectors]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on PR #829:
URL: https://github.com/apache/pekko-connectors/pull/829#issuecomment-2374889950
There is a task associated with this. https://github.com/apache/pekko-connectors/issues/655
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] WIP: SdkAsyncHttpClientH1TestSuite [pekko-connectors]
Posted by "jtjeferreira (via GitHub)" <gi...@apache.org>.
jtjeferreira commented on PR #829:
URL: https://github.com/apache/pekko-connectors/pull/829#issuecomment-2375259116
> > > The Scala 3 build is failing for this PR. Some classloading issue for junit.
> >
> >
> > I will have a look
>
> I managed to reproduce locally, but only in java 8. I will keep digging...
The error was
```
[error] org.junit.platform.commons.JUnitException: TestEngine with ID 'junit-vintage' failed to discover tests
[error] at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverEngineRoot(EngineDiscoveryOrchestrator.java:160)
[error] at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverSafely(EngineDiscoveryOrchestrator.java:132)
[error] at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discover(EngineDiscoveryOrchestrator.java:107)
[error] at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discover(EngineDiscoveryOrchestrator.java:78)
[error] at org.junit.platform.launcher.core.DefaultLauncher.discover(DefaultLauncher.java:99)
[error] at org.junit.platform.launcher.core.DefaultLauncher.discover(DefaultLauncher.java:77)
[error] at org.junit.platform.launcher.core.DelegatingLauncher.discover(DelegatingLauncher.java:42)
[error] at org.junit.platform.launcher.core.SessionPerRequestLauncher.discover(SessionPerRequestLauncher.java:56)
[error] at com.github.sbt.junit.jupiter.api.JupiterTestCollector.collectTests0(JupiterTestCollector.java:237)
[error] at com.github.sbt.junit.jupiter.api.JupiterTestCollector.invokeWithCustomClassLoader(JupiterTestCollector.java:299)
[error] at com.github.sbt.junit.jupiter.api.JupiterTestCollector.collectTests(JupiterTestCollector.java:72)
[error] at com.github.sbt.junit.jupiter.sbt.JupiterPlugin$.$anonfun$collectTests$1(JupiterPlugin.scala:111)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:63)
[error] at sbt.std.Transform$$anon$4.work(Transform.scala:69)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:283)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:24)
[error] at sbt.Execute.work(Execute.scala:292)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:283)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:65)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] at java.lang.Thread.run(Thread.java:750)
[error] Caused by: org.junit.platform.commons.JUnitException: ClassSelector [className = 'org.apache.pekko.stream.connectors.awsspi.RequestRunnerSpec$$anon$1', classLoader = java.net.URLClassLoader@79baaf07] resolution failed
[error] at org.junit.platform.launcher.listeners.discovery.AbortOnFailureLauncherDiscoveryListener.selectorProcessed(AbortOnFailureLauncherDiscoveryListener.java:39)
[error] at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolveCompletely(EngineDiscoveryRequestResolution.java:103)
[error] at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.run(EngineDiscoveryRequestResolution.java:83)
[error] at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolver.resolve(EngineDiscoveryRequestResolver.java:113)
[error] at org.junit.vintage.engine.discovery.VintageDiscoverer.discover(VintageDiscoverer.java:42)
[error] at org.junit.vintage.engine.VintageTestEngine.discover(VintageTestEngine.java:64)
[error] at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverEngineRoot(EngineDiscoveryOrchestrator.java:152)
[error] at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverSafely(EngineDiscoveryOrchestrator.java:132)
[error] at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discover(EngineDiscoveryOrchestrator.java:107)
[error] at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discover(EngineDiscoveryOrchestrator.java:78)
[error] at org.junit.platform.launcher.core.DefaultLauncher.discover(DefaultLauncher.java:99)
[error] at org.junit.platform.launcher.core.DefaultLauncher.discover(DefaultLauncher.java:77)
[error] at org.junit.platform.launcher.core.DelegatingLauncher.discover(DelegatingLauncher.java:42)
[error] at org.junit.platform.launcher.core.SessionPerRequestLauncher.discover(SessionPerRequestLauncher.java:56)
[error] at com.github.sbt.junit.jupiter.api.JupiterTestCollector.collectTests0(JupiterTestCollector.java:237)
[error] at com.github.sbt.junit.jupiter.api.JupiterTestCollector.invokeWithCustomClassLoader(JupiterTestCollector.java:299)
[error] at com.github.sbt.junit.jupiter.api.JupiterTestCollector.collectTests(JupiterTestCollector.java:72)
[error] at com.github.sbt.junit.jupiter.sbt.JupiterPlugin$.$anonfun$collectTests$1(JupiterPlugin.scala:111)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:63)
[error] at sbt.std.Transform$$anon$4.work(Transform.scala:69)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:283)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:24)
[error] at sbt.Execute.work(Execute.scala:292)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:283)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:65)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] at java.lang.Thread.run(Thread.java:750)
[error] Caused by: java.lang.InternalError: Malformed class name
[error] at java.lang.Class.getSimpleBinaryName(Class.java:1478)
[error] at java.lang.Class.getSimpleNameImpl(Class.java:1323)
[error] at java.lang.Class.getSimpleName(Class.java:1308)
[error] at org.junit.vintage.engine.descriptor.RunnerTestDescriptor.<init>(RunnerTestDescriptor.java:50)
[error] at org.junit.vintage.engine.discovery.ClassSelectorResolver.createRunnerTestDescriptor(ClassSelectorResolver.java:79)
[error] at org.junit.vintage.engine.discovery.ClassSelectorResolver.lambda$resolveTestClass$1(ClassSelectorResolver.java:70)
[error] at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution$DefaultContext.createAndAdd(EngineDiscoveryRequestResolution.java:250)
[error] at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution$DefaultContext.addToParent(EngineDiscoveryRequestResolution.java:213)
[error] at org.junit.vintage.engine.discovery.ClassSelectorResolver.resolveTestClass(ClassSelectorResolver.java:70)
[error] at org.junit.vintage.engine.discovery.ClassSelectorResolver.resolve(ClassSelectorResolver.java:47)
[error] at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.lambda$resolve$2(EngineDiscoveryRequestResolution.java:135)
[error] at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
[error] at java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1361)
[error] at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
[error] at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:499)
[error] at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:486)
[error] at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
[error] at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
[error] at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
[error] at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:531)
[error] at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolve(EngineDiscoveryRequestResolution.java:189)
[error] at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolve(EngineDiscoveryRequestResolution.java:126)
[error] at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolveCompletely(EngineDiscoveryRequestResolution.java:92)
[error] at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.run(EngineDiscoveryRequestResolution.java:83)
[error] at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolver.resolve(EngineDiscoveryRequestResolver.java:113)
[error] at org.junit.vintage.engine.discovery.VintageDiscoverer.discover(VintageDiscoverer.java:42)
[error] at org.junit.vintage.engine.VintageTestEngine.discover(VintageTestEngine.java:64)
[error] at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverEngineRoot(EngineDiscoveryOrchestrator.java:152)
[error] at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverSafely(EngineDiscoveryOrchestrator.java:132)
[error] at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discover(EngineDiscoveryOrchestrator.java:107)
[error] at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discover(EngineDiscoveryOrchestrator.java:78)
[error] at org.junit.platform.launcher.core.DefaultLauncher.discover(DefaultLauncher.java:99)
[error] at org.junit.platform.launcher.core.DefaultLauncher.discover(DefaultLauncher.java:77)
[error] at org.junit.platform.launcher.core.DelegatingLauncher.discover(DelegatingLauncher.java:42)
[error] at org.junit.platform.launcher.core.SessionPerRequestLauncher.discover(SessionPerRequestLauncher.java:56)
[error] at com.github.sbt.junit.jupiter.api.JupiterTestCollector.collectTests0(JupiterTestCollector.java:237)
[error] at com.github.sbt.junit.jupiter.api.JupiterTestCollector.invokeWithCustomClassLoader(JupiterTestCollector.java:299)
[error] at com.github.sbt.junit.jupiter.api.JupiterTestCollector.collectTests(JupiterTestCollector.java:72)
[error] at com.github.sbt.junit.jupiter.sbt.JupiterPlugin$.$anonfun$collectTests$1(JupiterPlugin.scala:111)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:63)
[error] at sbt.std.Transform$$anon$4.work(Transform.scala:69)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:283)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:24)
[error] at sbt.Execute.work(Execute.scala:292)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:283)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:65)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] at java.lang.Thread.run(Thread.java:750)
[error] Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -8
[error] at java.lang.String.substring(String.java:1931)
[error] at java.lang.Class.getSimpleBinaryName(Class.java:1476)
[error] at java.lang.Class.getSimpleNameImpl(Class.java:1323)
[error] at java.lang.Class.getSimpleName(Class.java:1308)
[error] at org.junit.vintage.engine.descriptor.RunnerTestDescriptor.<init>(RunnerTestDescriptor.java:50)
[error] at org.junit.vintage.engine.discovery.ClassSelectorResolver.createRunnerTestDescriptor(ClassSelectorResolver.java:79)
[error] at org.junit.vintage.engine.discovery.ClassSelectorResolver.lambda$resolveTestClass$1(ClassSelectorResolver.java:70)
[error] at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution$DefaultContext.createAndAdd(EngineDiscoveryRequestResolution.java:250)
[error] at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution$DefaultContext.addToParent(EngineDiscoveryRequestResolution.java:213)
[error] at org.junit.vintage.engine.discovery.ClassSelectorResolver.resolveTestClass(ClassSelectorResolver.java:70)
[error] at org.junit.vintage.engine.discovery.ClassSelectorResolver.resolve(ClassSelectorResolver.java:47)
[error] at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.lambda$resolve$2(EngineDiscoveryRequestResolution.java:135)
[error] at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
[error] at java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1361)
[error] at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
[error] at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:499)
[error] at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:486)
[error] at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
[error] at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
[error] at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
[error] at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:531)
[error] at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolve(EngineDiscoveryRequestResolution.java:189)
[error] at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolve(EngineDiscoveryRequestResolution.java:126)
[error] at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolveCompletely(EngineDiscoveryRequestResolution.java:92)
[error] at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.run(EngineDiscoveryRequestResolution.java:83)
[error] at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolver.resolve(EngineDiscoveryRequestResolver.java:113)
[error] at org.junit.vintage.engine.discovery.VintageDiscoverer.discover(VintageDiscoverer.java:42)
[error] at org.junit.vintage.engine.VintageTestEngine.discover(VintageTestEngine.java:64)
[error] at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverEngineRoot(EngineDiscoveryOrchestrator.java:152)
[error] at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverSafely(EngineDiscoveryOrchestrator.java:132)
[error] at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discover(EngineDiscoveryOrchestrator.java:107)
[error] at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discover(EngineDiscoveryOrchestrator.java:78)
[error] at org.junit.platform.launcher.core.DefaultLauncher.discover(DefaultLauncher.java:99)
[error] at org.junit.platform.launcher.core.DefaultLauncher.discover(DefaultLauncher.java:77)
[error] at org.junit.platform.launcher.core.DelegatingLauncher.discover(DelegatingLauncher.java:42)
[error] at org.junit.platform.launcher.core.SessionPerRequestLauncher.discover(SessionPerRequestLauncher.java:56)
[error] at com.github.sbt.junit.jupiter.api.JupiterTestCollector.collectTests0(JupiterTestCollector.java:237)
[error] at com.github.sbt.junit.jupiter.api.JupiterTestCollector.invokeWithCustomClassLoader(JupiterTestCollector.java:299)
[error] at com.github.sbt.junit.jupiter.api.JupiterTestCollector.collectTests(JupiterTestCollector.java:72)
[error] at com.github.sbt.junit.jupiter.sbt.JupiterPlugin$.$anonfun$collectTests$1(JupiterPlugin.scala:111)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:63)
[error] at sbt.std.Transform$$anon$4.work(Transform.scala:69)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:283)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:24)
[error] at sbt.Execute.work(Execute.scala:292)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:283)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:65)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] at java.lang.Thread.run(Thread.java:750)
```
where the important part is `org.junit.platform.commons.JUnitException: ClassSelector [className = 'org.apache.pekko.stream.connectors.awsspi.RequestRunnerSpec$$anon$1', classLoader = java.net.URLClassLoader@79baaf07]`
I tried to upgrade scala to 3.3.4, upgrade `junit-jupiter-engine`, but in the end the easiest fix was to rework `RequestRunnerSpec`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] add SdkAsyncHttpClientH1TestSuite [pekko-connectors]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning merged PR #829:
URL: https://github.com/apache/pekko-connectors/pull/829
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] WIP: SdkAsyncHttpClientH1TestSuite [pekko-connectors]
Posted by "jtjeferreira (via GitHub)" <gi...@apache.org>.
jtjeferreira commented on code in PR #829:
URL: https://github.com/apache/pekko-connectors/pull/829#discussion_r1778565372
##########
aws-spi-pekko-http/src/main/scala/org/apache/pekko/stream/connectors/awsspi/PekkoHttpClient.scala:
##########
@@ -185,14 +194,20 @@ object PekkoHttpClient {
connectionPoolSettings.getOrElse(ConnectionPoolSettings(as)),
resolvedOptions
)
+
+ val connectionContext =
+ if (resolvedOptions.get(SdkHttpConfigurationOption.TRUST_ALL_CERTIFICATES).booleanValue())
Review Comment:
I had to add support for `TRUST_ALL_CERTIFICATES` option so the test suite can connect to an insecure server. Unfortunately, skipping cert validation is not so easy (see for example https://github.com/akka/akka-http/issues/4042)
##########
aws-spi-pekko-http/src/main/scala/org/apache/pekko/stream/connectors/awsspi/PekkoHttpClient.scala:
##########
@@ -53,9 +60,11 @@ class PekkoHttpClient(shutdownHandle: () => Unit, private[awsspi] val connection
lazy val runner = new RequestRunner()
override def execute(request: AsyncExecuteRequest): CompletableFuture[Void] = {
- val pekkoHttpRequest = toPekkoRequest(request.request(), request.requestContentPublisher())
Review Comment:
moving `pekkoHttpRequest` inside `runner.run` and changes below in `RequestRunner.scala` were needed to make test `naughtyHeaderCharactersDoNotGetToServer` pass.
The test is defined as:
```java
@Test
public void naughtyHeaderCharactersDoNotGetToServer() {
String naughtyHeader = "foo\r\nbar";
assertThatThrownBy(() -> HttpTestUtils.sendRequest(client,
SdkHttpFullRequest.builder()
.uri(URI.create("https://localhost:" + server.port()))
.method(SdkHttpMethod.POST)
.appendHeader("h", naughtyHeader)
.build())
.join())
.hasCauseInstanceOf(Exception.class);
}
```
and it was failing because `toPekkoRequest` is throwing an exception, but that exception should be inside a Future.failed.
See a734b17e3262a8d3d27a49fef7a720d4a7ee4fc4
##########
aws-spi-pekko-http/src/main/scala/org/apache/pekko/stream/connectors/awsspi/RequestRunner.scala:
##########
@@ -26,18 +26,16 @@ import pekko.http.scaladsl.model.headers.{ `Content-Length`, `Content-Type` }
import pekko.stream.Materializer
import pekko.stream.scaladsl.{ Keep, Sink }
import pekko.util.FutureConverters
-import org.slf4j.LoggerFactory
import software.amazon.awssdk.http.SdkHttpFullResponse
import software.amazon.awssdk.http.async.SdkAsyncHttpResponseHandler
import scala.concurrent.{ ExecutionContext, Future }
class RequestRunner()(implicit ec: ExecutionContext, mat: Materializer) {
- val logger = LoggerFactory.getLogger(this.getClass)
-
def run(runRequest: () => Future[HttpResponse], handler: SdkAsyncHttpResponseHandler): CompletableFuture[Void] = {
- val result = runRequest().flatMap { response =>
+ // Future.unit.flatMap(expr) is a scala 2.12 equivalent of Future.delegate(expr)
+ val result = Future.unit.flatMap(_ => runRequest()).flatMap { response =>
Review Comment:
open for suggestions
##########
aws-spi-pekko-http/src/test/resources/logback-test.xml:
##########
@@ -15,7 +15,7 @@
<appender-ref ref="STDOUT" />
</root>
- <logger name="io.netty" level="trace" additivity="false">
+ <logger name="io.netty" level="info" additivity="false">
Review Comment:
The `SdkAsyncHttpClientH1TestSuite` uses netty, and netty bootstrapping is very verbose, so I increased the log level
##########
aws-spi-pekko-http/src/test/scala/org/apache/pekko/stream/connectors/awsspi/RequestRunnerSpec.scala:
##########
Review Comment:
See this [comment](https://github.com/apache/pekko-connectors/pull/829#issuecomment-2375259116) why these changes were needed...
##########
aws-spi-pekko-http/src/test/java/org/apache/pekko/stream/connectors/awsspi/s3/S3Test.java:
##########
@@ -44,7 +43,7 @@
import static org.junit.Assert.assertEquals;
-public class S3Test extends JUnitSuite {
+public class S3Test {
Review Comment:
AFAICT, using `JUnitSuite` from scalatest+junit is not needed, and we can remove dependency on `"org.scalatestplus" %% "junit-4-13"`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] WIP: SdkAsyncHttpClientH1TestSuite [pekko-connectors]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on PR #829:
URL: https://github.com/apache/pekko-connectors/pull/829#issuecomment-2376896085
@jtjeferreira I merged #827 - can you rebase this and get it ready for merging?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org