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 fb25ec251d5 IGNITE-28820 Fix
DeploymentTest.TestMissingJarsCauseProperException (#13278)
fb25ec251d5 is described below
commit fb25ec251d55845bb53ca623b4f45437346b1d27
Author: Vladislav Pyatkov <[email protected]>
AuthorDate: Fri Jun 26 14:44:18 2026 +0300
IGNITE-28820 Fix DeploymentTest.TestMissingJarsCauseProperException (#13278)
https://issues.apache.org/jira/browse/IGNITE-28820
---
.../Apache.Ignite.Core.Tests/DeploymentTest.cs | 2 +-
.../Apache.Ignite.Core.Tests/ExecutableTest.cs | 14 +----------
.../Process/ListDataReader.cs | 28 ++++++++++++++++++++++
3 files changed, 30 insertions(+), 14 deletions(-)
diff --git
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/DeploymentTest.cs
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/DeploymentTest.cs
index 70174060fb9..5a7d39c15e8 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/DeploymentTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/DeploymentTest.cs
@@ -105,7 +105,7 @@ namespace Apache.Ignite.Core.Tests
Assert.AreEqual("ERROR: Apache.Ignite.Core.Common.IgniteException:
Java class is not found " +
"(did you set IGNITE_HOME environment variable?):
" +
"org/apache/ignite/internal/processors/platform/utils/PlatformUtils",
- reader.GetOutput().First());
+ reader.GetOutputWithoutJavaWarnings().First());
}
/// <summary>
diff --git
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ExecutableTest.cs
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ExecutableTest.cs
index e96fcaa8be0..e30a16bf14b 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ExecutableTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ExecutableTest.cs
@@ -327,17 +327,6 @@ namespace Apache.Ignite.Core.Tests
[Test]
public void TestInvalidCmdArgs()
{
- var ignoredWarns = new[]
- {
- "WARNING: An illegal reflective access operation has occurred",
- "WARNING: Illegal reflective access by
org.apache.ignite.internal.util.GridUnsafe$2 " +
- "(file:/C:/w/incubator-ignite/modules/core/target/classes/) to
field java.nio.Buffer.address",
- "WARNING: Please consider reporting this to the maintainers of
org.apache.ignite.internal.util." +
- "GridUnsafe$2",
- "WARNING: Use --illegal-access=warn to enable warnings of
further illegal reflective access operations",
- "WARNING: All illegal access operations will be denied in a
future release"
- };
-
Action<string, string> checkError = (args, err) =>
{
var reader = new ListDataReader();
@@ -347,8 +336,7 @@ namespace Apache.Ignite.Core.Tests
Assert.IsTrue(proc.Join(30000, out exitCode));
Assert.AreEqual(-1, exitCode);
- Assert.AreEqual(err, reader.GetOutput()
- .Except(ignoredWarns)
+ Assert.AreEqual(err, reader.GetOutputWithoutJavaWarnings()
.FirstOrDefault(x => !string.IsNullOrWhiteSpace(x)));
};
diff --git
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Process/ListDataReader.cs
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Process/ListDataReader.cs
index 5660cf962db..4e2ac05fe4b 100644
---
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Process/ListDataReader.cs
+++
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Process/ListDataReader.cs
@@ -17,6 +17,7 @@
namespace Apache.Ignite.Core.Tests.Process
{
+ using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
@@ -26,6 +27,17 @@ namespace Apache.Ignite.Core.Tests.Process
/// </summary>
public class ListDataReader : IIgniteProcessOutputReader
{
+ /** JVM warnings that can appear before the actual Apache.Ignite.exe
output. */
+ private static readonly string[] IgnoredJavaWarnings =
+ {
+ "OpenJDK 64-Bit Server VM warning: Ignoring option
--illegal-access=permit; support was removed in 17.0",
+ "WARNING: An illegal reflective access operation has occurred",
+ "WARNING: Illegal reflective access by
org.apache.ignite.internal.util.GridUnsafe$2",
+ "WARNING: Please consider reporting this to the maintainers of
org.apache.ignite.internal.util.GridUnsafe$2",
+ "WARNING: Use --illegal-access=warn to enable warnings of further
illegal reflective access operations",
+ "WARNING: All illegal access operations will be denied in a future
release"
+ };
+
/** Target list. */
private readonly List<string> _list = new List<string>();
@@ -53,5 +65,21 @@ namespace Apache.Ignite.Core.Tests.Process
return _list.ToList();
}
}
+
+ /// <summary>
+ /// Gets the output without known JVM warnings.
+ /// </summary>
+ public IList<string> GetOutputWithoutJavaWarnings()
+ {
+ return GetOutput().Where(x => !IsIgnoredJavaWarning(x)).ToList();
+ }
+
+ /// <summary>
+ /// Returns a value indicating whether provided message is a known JVM
warning.
+ /// </summary>
+ private static bool IsIgnoredJavaWarning(string message)
+ {
+ return IgnoredJavaWarnings.Any(warning =>
message.StartsWith(warning, StringComparison.Ordinal));
+ }
}
}