From f5c9a76e96a3cfaadb52be3938754d5c28d6aaea Mon Sep 17 00:00:00 2001 From: Gabriele Santomaggio Date: Thu, 25 Jul 2024 15:13:27 +0200 Subject: [PATCH] Update RabbitMQ version and the test Update the test conversion from amqp 091 to stream due of https://github.com/rabbitmq/rabbitmq-server/pull/11715 Signed-off-by: Gabriele Santomaggio --- .ci/versions.json | 2 +- Tests/FromToAMQPTests.cs | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.ci/versions.json b/.ci/versions.json index d4e30988..640104aa 100644 --- a/.ci/versions.json +++ b/.ci/versions.json @@ -1,4 +1,4 @@ { "erlang": "26.1.2", - "rabbitmq": "3.13.0" + "rabbitmq": "3.13.16" } diff --git a/Tests/FromToAMQPTests.cs b/Tests/FromToAMQPTests.cs index 372acc70..b49472f9 100644 --- a/Tests/FromToAMQPTests.cs +++ b/Tests/FromToAMQPTests.cs @@ -165,10 +165,19 @@ 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"]);