Skip to content

Commit

Permalink
Add regression test for messageExpiryInterval bug
Browse files Browse the repository at this point in the history
  • Loading branch information
rubengees committed Aug 19, 2024
1 parent 1274b38 commit ade03a0
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.stereotype.Component
import org.springframework.test.context.TestPropertySource
import kotlin.jvm.optionals.getOrNull

@ExtendWith(EmqxExtension::class)
@SpringBootTest(
Expand Down Expand Up @@ -132,6 +133,15 @@ class Mqtt5AutoConfigurationTest {
}
}

@Test
fun `publishes message with contentType`() {
publisher.publish("string", MqttQos.EXACTLY_ONCE, "1", PublishingOptions(contentType = "text/plain"))

await untilAssertedKluent {
publishSubscriber.receivedPayload?.contentType?.getOrNull()?.toString() shouldBeEqualTo "text/plain"
}
}

@Component
class IntSubscriber {

Expand Down

0 comments on commit ade03a0

Please sign in to comment.