Skip to content

Commit

Permalink
Do not include system-properties in test session command tag (#7187)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikita-tkachenko-datadog committed Jun 14, 2024
1 parent 33a2dcd commit ecd93fb
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,6 @@ private static String recreateStartCommand(StartParameter startParameter, String
}
}

for (Map.Entry<String, String> e : startParameter.getSystemPropertiesArgs().entrySet()) {
String propertyKey = e.getKey();
String propertyValue = e.getValue();
command.append(" -D").append(propertyKey);
if (propertyValue != null && !propertyValue.isEmpty()) {
command.append('=').append(propertyValue);
}
}

return command.toString();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,6 @@ abstract class GradleUtils {
}
}

for (Map.Entry<String, String> e : startParameter.getSystemPropertiesArgs().entrySet()) {
String propertyKey = e.getKey()
String propertyValue = e.getValue()
command.append(" -D").append(propertyKey)
if (propertyValue != null && !propertyValue.isEmpty()) {
command.append('=').append(propertyValue)
}
}

return command.toString()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public void afterProjectsRead(MavenSession session) {
// otherwise reference to "@{argLine}" that we add when configuring tracer
// might cause failure
// (test executions config is changed even if auto configuration is disabled:
// for passing module and sesion IDs to child JVM)
// for passing module and session IDs to child JVM)
projectProperties.setProperty("argLine", "");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import java.lang.invoke.MethodHandle;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Properties;
import org.apache.maven.BuildFailureException;
Expand Down Expand Up @@ -164,18 +163,6 @@ public static String getCommandLine(MavenSession session) {
command.append(' ').append(goal);
}

Properties userProperties = request.getUserProperties();
if (userProperties != null) {
for (Map.Entry<Object, Object> e : userProperties.entrySet()) {
command
.append(" -")
.append(CLIManager.SET_SYSTEM_PROPERTY)
.append(e.getKey())
.append('=')
.append(e.getValue());
}
}

if (!request.getActiveProfiles().isEmpty()) {
command.append(" -").append(CLIManager.ACTIVATE_PROFILES);
Iterator<String> it = request.getActiveProfiles().iterator();
Expand Down

0 comments on commit ecd93fb

Please sign in to comment.