Skip to content

Commit

Permalink
added delay after creating a subscription
Browse files Browse the repository at this point in the history
  • Loading branch information
ranim-n committed Feb 1, 2024
1 parent 3adb87f commit 7fa1398
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import org.springframework.test.context.ActiveProfiles
import org.springframework.test.context.TestPropertySource
import java.net.URI
import java.time.ZonedDateTime
import java.util.UUID
import java.util.*
import kotlin.time.Duration

@SpringBootTest
Expand Down Expand Up @@ -1139,15 +1139,18 @@ class SubscriptionServiceTests : WithTimescaleContainer, WithKafkaContainer {
"watchedAttributes" to listOf(INCOMING_COMPACT_PROPERTY),
"notification" to mapOf(
"endpoint" to mapOf("uri" to "http://my.endpoint/notifiy"),
"lastNotification" to ngsiLdDateTime().minusMinutes(5)
"lastNotification" to ngsiLdDateTime()
),
"throttling" to 200
"throttling" to 5
)

val subscription = ParsingUtils.parseSubscription(payload, emptyList()).shouldSucceedAndResult()

subscriptionService.create(subscription, mockUserSub).shouldSucceed()

runBlocking {
delay(5000)
}
subscriptionService.getMatchingSubscriptions(
expandedEntity,
setOf(INCOMING_COMPACT_PROPERTY),
Expand Down

0 comments on commit 7fa1398

Please sign in to comment.