Skip to content

Commit

Permalink
Refactored SQS test - native image execution (#375)
Browse files Browse the repository at this point in the history
* Refactored 'micronaut-tasks-sqs' test, so it can be executed in native image

* Replaced SqsClientFactory from micronaut-aws with custom SqsClientFactory which uses config values from sqs container created by micronaut-test-resources
  • Loading branch information
msupic authored Jun 5, 2023
1 parent cec57e4 commit e30742b
Show file tree
Hide file tree
Showing 18 changed files with 132 additions and 807 deletions.
8 changes: 8 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,11 @@ configurations.all {
preferProjectModules()
}
}

if (System.getenv("SONAR_TOKEN") != null) {
sonarqube {
properties {
property "sonar.exclusions", "**/example/**"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
repositories {
mavenCentral()
}

Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ plugins {
}

graalvmNative {
binaries.configureEach {
buildArgs.add '-J--add-exports=java.management/sun.management=ALL-UNNAMED' // https://github.com/oracle/graal/issues/3875
}
metadataRepository {
enabled = true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ plugins {

micronaut {
importMicronautPlatform = false
testRuntime "junit5"
testResources {
clientTimeout = 300
version = libs.versions.micronaut.testresources.get()
}
}
dependencies {
Expand Down
4 changes: 1 addition & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ micronaut-docs = "2.0.0"

micronaut = "4.0.0-M6"
micronaut-test = "4.0.0-M6"
micronaut-testresources = "2.0.0-M9"
micronaut-platform = "4.0.0-M2"
activemq = '5.18.1'
amazon-sqs-messaging = '2.0.3'
Expand All @@ -20,7 +21,6 @@ kotlin = '1.8.21'
spock = "2.3-groovy-4.0"
spotbugs = "4.7.3"
testcontainers = '1.18.1'
lombok = '1.18.28'

micronaut-aws-v2 = '4.0.0-M6'
micronaut-validation = "4.0.0-M9"
Expand Down Expand Up @@ -48,8 +48,6 @@ testcontainers-localstack = { module = 'org.testcontainers:localstack', version.
testcontainers-spock = { module = 'org.testcontainers:spock', version.ref = 'testcontainers' }
javax-json-api = { module = 'javax.json:javax.json-api', version.ref = 'json-api' }

lombok = { module = 'org.projectlombok:lombok', version.ref = 'lombok' }

#plugins

micronaut-gradle-plugin = { module = 'io.micronaut.gradle:micronaut-gradle-plugin', version.ref = 'micronaut-gradle-plugin' }
Expand Down

This file was deleted.

Loading

0 comments on commit e30742b

Please sign in to comment.