Skip to content

Commit

Permalink
fix EndToEndIT
Browse files Browse the repository at this point in the history
  • Loading branch information
yannick committed Jun 26, 2024
1 parent 59bf0df commit 2c55bbb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
version=1.1.0
kotlin.stdlib.default.dependency=false
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ internal class EndToEndIT {
.build()


await().timeout(Duration.ofMinutes(2)).until {
await().timeout(Duration.ofMinutes(5)).until {
cloudWatchClient.listMetrics().metrics().any {
it.metricName() == "com.hivemq.messages.incoming.publish.count"
}
Expand All @@ -101,16 +101,16 @@ internal class EndToEndIT {
.returnData(true)
.build()

await().timeout(Duration.ofMinutes(2)).until {
await().timeout(Duration.ofMinutes(5)).until {
val request = GetMetricDataRequest.builder()
.startTime(Instant.now().minusSeconds(3600))
.endTime(Instant.now())
.metricDataQueries(listOf(metricDataQuery))
.build()
val response = cloudWatchClient.getMetricData(request)
response.metricDataResults().maxOf {
it.values()[0]
} == 0.0
response.metricDataResults().flatMap {
it.values()
}.maxOrNull() == 0.0
}

val mqttClient = Mqtt5Client.builder().serverHost(hivemq.host).serverPort(hivemq.mqttPort).buildBlocking()
Expand All @@ -124,9 +124,9 @@ internal class EndToEndIT {
.metricDataQueries(listOf(metricDataQuery))
.build()
val response = cloudWatchClient.getMetricData(request)
response.metricDataResults().maxOf {
it.values()[0]
} == 1.0
response.metricDataResults().flatMap {
it.values()
}.maxOrNull() == 1.0
}
cloudWatchClient.close()
} finally {
Expand Down

0 comments on commit 2c55bbb

Please sign in to comment.