Terracotta-OSS / galvan

An integration testing framework.
Apache License 2.0
1 stars 16 forks source link

Galvan support for System.property fails under Linux #181

Closed cljohnso closed 6 years ago

cljohnso commented 7 years ago

The support added under PR #180 quotes the -D values added to JAVA_OPTS. This works under Windows but does not under Linux ... Linux performs additional quoting during command line construction that causes the argument not to be recognized as a -D option and, instead, attempts to use it as the Java class to execute.

The quoting will be removed. As a consequence, system property values containing characters requiring quoting won't be supported.

mathieucarbou commented 6 years ago

Hi @cljohnso @myronkscott : this issue is still opened and still exists I think:

in the monitoring service, I have put this class:

class Utils {
 private static final boolean ASSERT = Boolean.getBoolean("terracotta.management.assert");
[…]
}

I have a galvan test, that kills the active and wait for failover to complete in the setup() method. Here is the galvan rule:

public Cluster voltron = newCluster(2)
   .in(new File("target/galvan"))
   .withServiceFragment(resourceConfig)
   .withSystemProperty("terracotta.management.assert", "true")
   .build();

Sadly, ASSERT == false… The system property is either not passed at all, or, not passed after a failover

I would need this to test https://github.com/Terracotta-OSS/terracotta-platform/pull/413

mathieucarbou commented 6 years ago

UPDATE: this works: .withTcProperty("terracotta.management.assert", "true") and on Linux then ;-) we can close this.