Skip to content

Commit

Permalink
Test failure for jms-sqs (#378)
Browse files Browse the repository at this point in the history
* Test failure for jms-sqs

Failure https://ge.micronaut.io/s/fshrmjxbbaeee

````
Bean definition [io.micronaut.jms.configuration.JMSConnectionFactoryBeanProcessor] could not be loaded: Error processing bean definition [Definition: io.micronaut.jms.sqs.configuration.SqsConfiguration]: Failed to inject value for parameter [builder] of method [sqsJmsConnectionFactory] of class: io.micronaut.jms.sqs.configuration.SqsConfiguration

Message: No bean of type [software.amazon.awssdk.services.sqs.SqsClientBuilder] exists. Make sure the bean is not disabled by bean requirements (enable trace logging for 'io.micronaut.context.condition' to check) and if the bean is enabled then ensure the class is declared a bean and annotation processing is enabled (for Java and Kotlin the 'micronaut-inject-java' dependency should be configured as an annotation processor).
Path Taken: SqsConfiguration.sqsJmsConnectionFactory(SqsConfigurationProperties config,SqsClientBuilder builder) --> SqsConfiguration.sqsJmsConnectionFactory(SqsConfigurationProperties config,[SqsClientBuilder builder])
io.micronaut.context.exceptions.BeanInstantiationException: Bean definition [io.micronaut.jms.configuration.JMSConnectionFactoryBeanProcessor] could not be loaded: Error processing bean definition [Definition: io.micronaut.jms.sqs.configuration.SqsConfiguration]: Failed to inject value for parameter [builder] of method [sqsJmsConnectionFactory] of class: io.micronaut.jms.sqs.configuration.SqsConfiguration

Message: No bean of type [software.amazon.awssdk.services.sqs.SqsClientBuilder] exists. Make sure the bean is not disabled by bean requirements (enable trace logging for 'io.micronaut.context.condition' to check) and if the bean is enabled then ensure the class is declared a bean and annotation processing is enabled (for Java and Kotlin the 'micronaut-inject-java' dependency should be configured as an annotation processor).
Path Taken: SqsConfiguration.sqsJmsConnectionFactory(SqsConfigurationProperties config,SqsClientBuilder builder) --> SqsConfiguration.sqsJmsConnectionFactory(SqsConfigurationProperties config,[SqsClientBuilder builder])
	at app//io.micronaut.context.DefaultBeanContext.initializeContext(DefaultBeanContext.java:1979)
	at app//io.micronaut.cont
```

* Fix AWS version

---------

Co-authored-by: Tim Yates <[email protected]>
  • Loading branch information
sdelamo and timyates authored Jun 5, 2023
1 parent 639797d commit cec57e4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ spotbugs = "4.7.3"
testcontainers = '1.18.1'
lombok = '1.18.28'

micronaut-aws-v2 = '3.17.2'
micronaut-aws-v2 = '4.0.0-M6'
micronaut-validation = "4.0.0-M9"
micronaut-gradle-plugin = "4.0.0-M4"

Expand Down
11 changes: 7 additions & 4 deletions tests/tasks-sqs/src/test/groovy/example/TasksSpec.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,24 @@ import io.micronaut.http.client.BlockingHttpClient
import io.micronaut.http.client.HttpClient
import io.micronaut.runtime.server.EmbeddedServer
import org.testcontainers.utility.DockerImageName
import spock.lang.PendingFeature
import spock.lang.Specification
import spock.util.concurrent.PollingConditions

import static example.LocalStackContainer.Service.SQS

class TasksSpec extends Specification {

@PendingFeature
void 'should process tasks'() {
when:
LocalStackContainer localstack = new LocalStackContainer(DockerImageName.parse('localstack/localstack')).withServices(SQS)
localstack.start()
EmbeddedServer server = ApplicationContext.run(['sqs-url': localstack.getEndpointOverride(SQS).toString(),
'sqs-region': localstack.region])
EmbeddedServer server = ApplicationContext.run(
EmbeddedServer,
[
'sqs-url' : localstack.getEndpointOverride(SQS).toString(),
'sqs-region': localstack.region,
]
)
HttpClient httpClient = server.applicationContext.createBean(HttpClient, server.URL)
BlockingHttpClient client = httpClient.toBlocking()

Expand Down

0 comments on commit cec57e4

Please sign in to comment.