citrusframework / citrus

Framework for automated integration tests with focus on messaging integration
https://citrusframework.org
Apache License 2.0
456 stars 134 forks source link

SqsEndpoint & httpEndpointConfiguration issue #1005

Open iosif86 opened 12 months ago

iosif86 commented 12 months ago

I have a method with this code block: final HttpEndpointConfiguration httpEndpointConfiguration = new HttpEndpointConfiguration(); httpEndpointConfiguration.setTimeout(5_000); return new SqsEndpoint(httpEndpointConfiguration, queueUrl, sqsClient); It works with citrus 2.8.0 (2.8.0 for citrus-core, citrus-java-dsl, citrus-http, etc.). citrus-sqs:0.2.1; citrus-remote-server:2.8.0

Then I did an upgrade to the latest versions:

4.0.0-M2 citrus-java-dsl 4.0.0-M1 // M2 version is not available citrus-http:4.0.0-M2, citrus-remote-server:3.4.0 //latest version citrus-sqs:0.2.1 But now I have an error msg related to that httpEndpointConfiguration param: Required type: EndpointConfiguration Provided: HttpEndpointConfiguration
bbortt commented 11 months ago

the problem is probably related to you still using citrus-java-dsl. that is a legacy module and support has been removed in M2. the code is no longer compatible with classes imported from that module! please try replacing these classes with alternatives existing in the M2 release.

if you give a list of imports I can point you to them. or even bedder, a reproducible example.

iosif86 commented 11 months ago

Thanks for your reply. Here is the list of imports:

import com.consol.citrus.dsl.endpoint.CitrusEndpoints; import com.consol.citrus.http.client.HttpClient; import com.consol.citrus.http.client.HttpEndpointConfiguration; import com.consol.citrus.http.server.HttpServer; import com.consol.citrus.dsl.builder.BuilderSupport; import com.consol.citrus.dsl.builder.SendMessageBuilder; import com.consol.citrus.dsl.builder.ReceiveMessageBuilder; import com.consol.citrus.dsl.builder.HttpActionBuilder; import com.consol.citrus.http.server.HttpServer; import com.consol.citrus.dsl.builder.SendMessageBuilder; import com.consol.citrus.dsl.builder.ExecuteSQLBuilder; import com.consol.citrus.dsl.builder.ExecuteSQLQueryBuilder; import org.citrusframework.dsl.runner.TestRunner;

Please let me know if I need to add any additional dependencies, like citrus-endpoint-catalog, citrus-spring or citrus-base. Also I'm using spring boot 3.1.2 and now I have a compile error in my citrus config class, related to @ComponentScan (coming from spring-context-6.0.11.jar) - "Cannot resolve package "

bbortt commented 11 months ago

yes, so the imports causing problems would be all:

I've added "entrypoint" class. I think it's best if you start from the new CitrusEndpoints and see where it leads you. and therefore, yes, you may have to add citrus-endpoint-catalog to your dependencies.