Skip to content

Commit 5d9fc07

Browse files
committed
Adapt interoperability test expectation
References rabbitmq/rabbitmq-server#11715
1 parent 661c6cd commit 5d9fc07

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

src/test/java/com/rabbitmq/stream/impl/AmqpInteroperabilityTest.java

+13-3
Original file line numberDiff line numberDiff line change
@@ -576,9 +576,19 @@ void publishToStreamConsumeFromStreamQueue(Codec codec, TestInfo info) {
576576
mb ->
577577
mb.applicationProperties()
578578
.entry("binary", "hello".getBytes(UTF8)),
579-
d ->
580-
assertThat(d.getProperties().getHeaders())
581-
.containsEntry("binary", "hello".getBytes(UTF8))));
579+
d -> {
580+
// TODO leave only LongString expectation once 3.13.5 is out
581+
Object binary = d.getProperties().getHeaders().get("binary");
582+
Object expected;
583+
if (binary instanceof LongString) {
584+
// 3.13.5+
585+
expected = LongStringHelper.asLongString("hello");
586+
} else {
587+
expected = "hello".getBytes(UTF8);
588+
}
589+
assertThat(d.getProperties().getHeaders())
590+
.containsEntry("binary", expected);
591+
}));
582592

583593
client.declarePublisher(b(1), null, s);
584594
IntStream.range(0, messageCount)

0 commit comments

Comments
 (0)