Skip to content

Commit

Permalink
Fix #183 - <resultsFileFormat> is no longer ignored.
Browse files Browse the repository at this point in the history
Switch <suppressJMeterOutput> to default to false.
  • Loading branch information
Ardesco committed Jul 5, 2016
1 parent a7f37af commit 5930131
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

##Next Version (Release Date TBC) Release Notes

##Version 2.0.1 Release Notes

* **Issue #183** - <resultsFileFormat> is no longer ignored.

##Version 2.0.0 Release Notes

* **JMeter version 3.0.0 support added.**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public abstract class AbstractJMeterMojo extends AbstractMojo {
/**
* Suppress JMeter output
*/
@Parameter(defaultValue = "true")
@Parameter(defaultValue = "false")
protected boolean suppressJMeterOutput;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,16 +198,16 @@ protected void generateJMeterDirectoryTree() {
}

protected void configurePropertiesFiles() throws MojoExecutionException, MojoFailureException {
setJMeterResultFileFormat();
configureAdvancedLogging();

propertiesMap.put(JMETER_PROPERTIES, new PropertiesMapping(propertiesJMeter));
propertiesMap.put(SAVE_SERVICE_PROPERTIES, new PropertiesMapping(propertiesSaveService));
propertiesMap.put(UPGRADE_PROPERTIES, new PropertiesMapping(propertiesUpgrade));
propertiesMap.put(SYSTEM_PROPERTIES, new PropertiesMapping(propertiesSystem));
propertiesMap.put(USER_PROPERTIES, new PropertiesMapping(propertiesUser));
propertiesMap.put(GLOBAL_PROPERTIES, new PropertiesMapping(propertiesGlobal));

setJMeterResultFileFormat();
configureAdvancedLogging();

for (ConfigurationFiles configurationFile : values()) {
File suppliedPropertiesFile = new File(propertiesFilesDirectory, configurationFile.getFilename());
File propertiesFileToWrite = new File(workingDirectory, configurationFile.getFilename());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ public enum ReservedProperties {

JAVA_CLASS_PATH("java.class.path", null),
USER_DIR("user.dir", null),
JMETER_SAVE_SAVESERVICE_OUTPUT_FORMAT("jmeter.save.saveservice.output_format", null),
JMETERENGINE_REMOTE_SYSTEM_EXIT("jmeterengine.remote.system.exit", "false"),
JMETERENGINE_STOPFAIL_SYSTEM_EXIT("jmeterengine.stopfail.system.exit", "false");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ public void reservedPropertiesAreStrippedOutBeforeWritingFile() throws Exception
HashMap<String, String> reservedProperties = new HashMap<>();
reservedProperties.put("java.class.path", "/foo/bar");
reservedProperties.put("user.dir", "/bar/foo");
reservedProperties.put("jmeter.save.saveservice.output_format", "pink");
reservedProperties.put("jmeterengine.remote.system.exit", "true");
reservedProperties.put("jmeterengine.stopfail.system.exit", "true");

Expand All @@ -214,7 +213,7 @@ public void reservedPropertiesAreStrippedOutBeforeWritingFile() throws Exception
PropertiesFile propertiesFile = new PropertiesFile(new File(sourcePropertiesFile.toURI()));
propertiesFile.addAndOverwriteProperties(reservedProperties);

assertThat(propertiesFile.getProperties().size(), is(equalTo(7)));
assertThat(propertiesFile.getProperties().size(), is(equalTo(6)));

propertiesFile.writePropertiesToFile(writtenProperties);

Expand All @@ -233,14 +232,13 @@ public void nothingWrittenToFileIfAllPropertiesAreReserved() throws Exception {
HashMap<String, String> reservedProperties = new HashMap<>();
reservedProperties.put("java.class.path", "/foo/bar");
reservedProperties.put("user.dir", "/bar/foo");
reservedProperties.put("jmeter.save.saveservice.output_format", "pink");
reservedProperties.put("jmeterengine.remote.system.exit", "true");
reservedProperties.put("jmeterengine.stopfail.system.exit", "true");

PropertiesFile propertiesFile = new PropertiesFile(new File(emptyPropertiesFile.toURI()));
propertiesFile.addAndOverwriteProperties(reservedProperties);

assertThat(propertiesFile.getProperties().size(), is(equalTo(5)));
assertThat(propertiesFile.getProperties().size(), is(equalTo(4)));

propertiesFile.writePropertiesToFile(invalidPropertiesFile);

Expand Down

0 comments on commit 5930131

Please sign in to comment.