Skip to content

Commit

Permalink
Update RabbitMQ version and the test (#390)
Browse files Browse the repository at this point in the history
* Update RabbitMQ version and the test
* Update the test conversion from amqp 091 to stream due of rabbitmq/rabbitmq-server#11715
---------

Signed-off-by: Gabriele Santomaggio <[email protected]>
  • Loading branch information
Gsantomaggio authored Jul 25, 2024
1 parent 477ac16 commit 220f2da
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .ci/versions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"erlang": "26.1.2",
"rabbitmq": "3.13.0"
"rabbitmq": "3.13.6"
}
13 changes: 10 additions & 3 deletions Tests/FromToAMQPTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,17 @@ public async void Amqp10ShouldReadTheAmqp019Properties()
// https://github.com/rabbitmq/rabbitmq-server/pull/5077
// In this version the long string are not converted to string but to byte[]
// reason why we changed this test starting from the ci with RabbitMQ version >= 3.13.0-beta.5
var binaryValue = Encoding.UTF8.GetBytes(
$"Alan Mathison Turing(1912 年 6 月 23 日 - 1954 年 6 月 7 日)是英国数学家、计算机科学家、逻辑学家、密码分析家、哲学家和理论生物学家。 [6] 图灵在理论计算机科学的发展中具有很大的影响力,用图灵机提供了算法和计算概念的形式化,可以被认为是通用计算机的模型。[7][8][9] 他被广泛认为是理论计算机科学和人工智能之父{i}");

Assert.Equal(binaryValue,
// In this version https://github.com/rabbitmq/rabbitmq-server/pull/11715 increase utf8 scanning to 4096
// that we compare the value

// between 3.13.0-beta.5 and 3.13.5 the value is converted to byte[]
// the old test contains the binary value

var value =
$"Alan Mathison Turing(1912 年 6 月 23 日 - 1954 年 6 月 7 日)是英国数学家、计算机科学家、逻辑学家、密码分析家、哲学家和理论生物学家。 [6] 图灵在理论计算机科学的发展中具有很大的影响力,用图灵机提供了算法和计算概念的形式化,可以被认为是通用计算机的模型。[7][8][9] 他被广泛认为是理论计算机科学和人工智能之父{i}";

Assert.Equal(value,
message.ApplicationProperties["alan"]
);
Assert.Equal(i, message.ApplicationProperties["int"]);
Expand Down

0 comments on commit 220f2da

Please sign in to comment.