HBase
  1. HBase
  2. HBASE-2325

Add build hook to allow jvm args to be passed to junit test runner

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Trivial Trivial
    • Resolution: Won't Fix
    • Affects Version/s: 0.20.3
    • Fix Version/s: None
    • Component/s: build
    • Labels:
      None

      Description

      In order to run jcarder on the unit tests, it's handy to be able to add jvm args to the junit test runner. This trivial patch adds a hook for this. Unfortunately I don't know much about maven, someone will have to help me for trunk.

      1. hbase-2325.txt
        0.8 kB
        Todd Lipcon

        Issue Links

          Activity

          Hide
          Karthik K added a comment -

          {code
          mvn -Dmaven.test.jvmargs='-Xmx128m' test

          
          

          would do it.

          Aliter: If there were an environment variable , say - hbase.test.jvm.args - it could be specified as a property to the maven test configuration plugin, in pom.xml .

          Show
          Karthik K added a comment - {code mvn -Dmaven.test.jvmargs='-Xmx128m' test would do it. Aliter: If there were an environment variable , say - hbase.test.jvm.args - it could be specified as a property to the maven test configuration plugin, in pom.xml .
          Hide
          Paul Smith added a comment -

          basically the surefire plugin needs some tweaking:

          http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html

          setting the 'argLine' property.

          this is where Maven profiles would be good, because a default profile with 'empty' arglines could be used, with a jcarder profile used to specify the jcarder command line settings, the profile then being activated by profile name as needed.

          Show
          Paul Smith added a comment - basically the surefire plugin needs some tweaking: http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html setting the 'argLine' property. this is where Maven profiles would be good, because a default profile with 'empty' arglines could be used, with a jcarder profile used to specify the jcarder command line settings, the profile then being activated by profile name as needed.
          Hide
          Todd Lipcon added a comment -

          I tried the -Dmaven.test.jvmargs thing on trunk and it didn't seem to work.

          Show
          Todd Lipcon added a comment - I tried the -Dmaven.test.jvmargs thing on trunk and it didn't seem to work.
          Hide
          Karthik K added a comment -

          How about this , as suggested by Paul S ? In pom.xml , grep for maven-surefire-plugin ,

                  <plugin>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <configuration>
             ....
          *            <argLine>-Xmx512m</argLine> * 
             ...
                    </configuration>
                  </plugin>
          

          change the argLine as appropriate.

          Show
          Karthik K added a comment - How about this , as suggested by Paul S ? In pom.xml , grep for maven-surefire-plugin , <plugin> <artifactId>maven-surefire-plugin</artifactId> <configuration> .... * <argLine>-Xmx512m</argLine> * ... </configuration> </plugin> change the argLine as appropriate.
          Hide
          Lars Francke added a comment -

          Todd any news on this? Paul's suggestion should work if I'm not mistaken.

          Show
          Lars Francke added a comment - Todd any news on this? Paul's suggestion should work if I'm not mistaken.
          Hide
          Andrew Purtell added a comment -

          Stale issue. Reopen if still relevant.

          Show
          Andrew Purtell added a comment - Stale issue. Reopen if still relevant.

            People

            • Assignee:
              Unassigned
              Reporter:
              Todd Lipcon
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development