This is an automated email from the ASF dual-hosted git repository.
vldpyatkov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git
The following commit(s) were added to refs/heads/master by this push:
new 74d2a20cba9 IGNITE-28814
ConsoleRedirectTest.TestConsoleWriteSpecialStrings is failed (#13273)
74d2a20cba9 is described below
commit 74d2a20cba97a53b90ba1f14979caa034a352330
Author: Vladislav Pyatkov <[email protected]>
AuthorDate: Thu Jun 25 12:46:58 2026 +0300
IGNITE-28814 ConsoleRedirectTest.TestConsoleWriteSpecialStrings is failed
(#13273)
---
.../Apache.Ignite.Core.Tests/Binary/BinarySelfTest.cs | 1 +
.../Apache.Ignite.Core.Tests/ConsoleRedirectTest.cs | 15 +++++++++++----
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/BinarySelfTest.cs
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/BinarySelfTest.cs
index cd25ad6e87f..58035508f3c 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/BinarySelfTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/BinarySelfTest.cs
@@ -57,6 +57,7 @@ namespace Apache.Ignite.Core.Tests.Binary
"的的abcdкириллица",
new string(new[] {(char) 0xD801, (char) 0xDC37}),
"Ḽơᶉëᶆ ȋṕšᶙṁ",
+ "kjkl\r\nklk;",
"A_\ud83e\udd26\ud83c\udffc\u200d\u2642\ufe0f_B" // A_🤦🏼♂️_B
};
diff --git
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ConsoleRedirectTest.cs
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ConsoleRedirectTest.cs
index c882e1dd18f..457d92becad 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ConsoleRedirectTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ConsoleRedirectTest.cs
@@ -115,7 +115,7 @@ namespace Apache.Ignite.Core.Tests
MyStringWriter.LastValue = null;
// Send to Java as UTF-16 to avoid dealing with
IGNITE_BINARY_MARSHALLER_USE_STRING_SERIALIZATION_VER_2
- var bytes = Encoding.Unicode.GetBytes(MyStringWriter.Prefix +
val);
+ var bytes = Encoding.Unicode.GetBytes(MyStringWriter.Prefix +
val + MyStringWriter.Suffix);
ignite.GetCompute().ExecuteJavaTask<string>(ConsoleWriteTask,
bytes);
var expectedStr = GetExpectedStr(val);
@@ -124,7 +124,7 @@ namespace Apache.Ignite.Core.Tests
// Test Env.NewString
MyStringWriter.LastValue = null;
- TestUtilsJni.Println(MyStringWriter.Prefix + val);
+ TestUtilsJni.Println(MyStringWriter.Prefix + val +
MyStringWriter.Suffix);
Assert.AreEqual(expectedStr.Length,
MyStringWriter.LastValue?.Length, message: val);
if (val != BinarySelfTest.SpecialStrings[0])
@@ -288,6 +288,9 @@ namespace Apache.Ignite.Core.Tests
{
public const string Prefix = "[MyStringWriter]";
+ /** */
+ public const string Suffix = "[/MyStringWriter]";
+
public static bool Throw { get; set; }
public static string LastValue { get; set; }
@@ -306,9 +309,13 @@ namespace Apache.Ignite.Core.Tests
base.Write(value);
- if (!string.IsNullOrWhiteSpace(value) &&
value.StartsWith(Prefix))
+ if (!string.IsNullOrWhiteSpace(value) &&
value.StartsWith(Prefix, StringComparison.Ordinal))
{
- LastValue = value.Substring(Prefix.Length);
+ var suffixIndex = value.LastIndexOf(Suffix,
StringComparison.Ordinal);
+
+ Assert.GreaterOrEqual(suffixIndex, Prefix.Length, "Suffix
is missing: " + value);
+
+ LastValue = value.Substring(Prefix.Length, suffixIndex -
Prefix.Length);
}
}
}