You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by pt...@apache.org on 2023/01/16 10:07:51 UTC

[ignite-3] branch main updated: IGNITE-18555 .NET: Enable Gradle daemon in tests (#1525)

This is an automated email from the ASF dual-hosted git repository.

ptupitsyn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


The following commit(s) were added to refs/heads/main by this push:
     new a5873996c5 IGNITE-18555 .NET: Enable Gradle daemon in tests (#1525)
a5873996c5 is described below

commit a5873996c5a2af3d659a2522c932657d53eb9cdf
Author: Pavel Tupitsyn <pt...@apache.org>
AuthorDate: Mon Jan 16 12:07:45 2023 +0200

    IGNITE-18555 .NET: Enable Gradle daemon in tests (#1525)
    
    * `--no-daemon` removed to speed up local test execution
    * `IGNITE_DOTNET_GRADLE_OPTS` env var added to TC to keep the existing behavior
---
 modules/platforms/dotnet/Apache.Ignite.Tests/JavaServer.cs | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/modules/platforms/dotnet/Apache.Ignite.Tests/JavaServer.cs b/modules/platforms/dotnet/Apache.Ignite.Tests/JavaServer.cs
index d589a615f6..67fd865944 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Tests/JavaServer.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Tests/JavaServer.cs
@@ -31,11 +31,13 @@ namespace Apache.Ignite.Tests
     /// </summary>
     public sealed class JavaServer : IDisposable
     {
+        private const string GradleOptsEnvVar = "IGNITE_DOTNET_GRADLE_OPTS";
+
         private const int DefaultClientPort = 10942;
 
         private const int ConnectTimeoutSeconds = 120;
 
-        private const string GradleCommandExec = ":ignite-runner:runnerPlatformTest --no-daemon"
+        private const string GradleCommandExec = ":ignite-runner:runnerPlatformTest"
           + " -x compileJava -x compileTestFixturesJava -x compileIntegrationTestJava -x compileTestJava --parallel";
 
          /** Full path to Gradle binary. */
@@ -121,6 +123,10 @@ namespace Apache.Ignite.Tests
         private static Process CreateProcess()
         {
             var file = TestUtils.IsWindows ? "cmd.exe" : "/bin/bash";
+            var opts = Environment.GetEnvironmentVariable(GradleOptsEnvVar);
+            var command = $"{GradlePath} {GradleCommandExec} {opts}";
+
+            Log("Executing command: " + command);
 
             var process = new Process
             {
@@ -130,7 +136,7 @@ namespace Apache.Ignite.Tests
                     ArgumentList =
                     {
                         TestUtils.IsWindows ? "/c" : "-c",
-                        $"{GradlePath} {GradleCommandExec}"
+                        command
                     },
                     CreateNoWindow = true,
                     UseShellExecute = false,
@@ -139,6 +145,7 @@ namespace Apache.Ignite.Tests
                     RedirectStandardError = true
                 }
             };
+
             return process;
         }