Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjusting CLI options passed to Maven test runs #82

Merged
merged 1 commit into from
Nov 14, 2018

Conversation

jglick
Copy link
Member

@jglick jglick commented Nov 14, 2018

Some things encountered while working on jenkinsci/branch-api-plugin#134.

@@ -210,7 +210,6 @@ public PluginCompatReport testPlugins()
mconfig.userSettingsFile = config.getM2SettingsFile();
// TODO REMOVE
mconfig.userProperties.put( "failIfNoTests", "false" );
mconfig.userProperties.put( "argLine", "-XX:MaxPermSize=128m" );
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This clobbered both jenkinsci/plugin-pom#131 and the corresponding local workaround in ~/.m2/settings.xml, rendering PCT unusable with the current OpenJDK 8 on Ubuntu. Even before that, it was clobbering the default argline -Xmx768M -Djava.awt.headless=true.

Anyway I question the wisdom of blindly overriding JVM ergonomics during test runs. If there are indeed some test suites which for some reason require an outlandishly large permanent generation—and IIRC this is not even a thing in Java 8 anyway?—then they ought to be specifying that in their POMs.

@@ -482,7 +481,7 @@ private TestExecutionResult testPluginAgainst(MavenCoordinates coreCoordinates,

List<String> args = new ArrayList<String>();
args.add("--define=maven.test.redirectTestOutputToFile=false");
args.add("--define=concurrency=1");
args.add("--define=forkCount=1");
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As of jenkinsci/plugin-pom#80 (parent 2.37), concurrency is deprecated and forkCount is what you want. Noticed since a local profile

<profile>
    <id>faster</id>
    <activation>
        <activeByDefault>true</activeByDefault>
    </activation>
    <properties>
        <forkCount>1C</forkCount>
    </properties>
</profile>

was no longer being properly countermanded: multiple tests were running concurrently.

Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@raul-arabaolaza raul-arabaolaza merged commit bada784 into jenkinsci:master Nov 14, 2018
@jglick jglick deleted the mvn-options branch November 14, 2018 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants