Hadoop Common
  1. Hadoop Common
  2. HADOOP-7654

Change maven setup to not run tests by default

    Details

    • Type: Wish Wish
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 0.24.0
    • Fix Version/s: None
    • Component/s: build
    • Labels:
      None

      Description

      I find that I now type "-DskipTests" many, many times per day when working on Hadoop. We should change the default to not run tests except when explicitly given a test target.

        Activity

        Hide
        Robert Joseph Evans added a comment -

        Why don't we set up test suites then? We can switch to testNG which will run all of our JUnit tests, and then we can also setup groups of tests to run, so in the default profile we run a few sanity checks that are nice and short, and then we can have a different profile for running all of the tests, which would be turned on as part of test-patch.

        Show
        Robert Joseph Evans added a comment - Why don't we set up test suites then? We can switch to testNG which will run all of our JUnit tests, and then we can also setup groups of tests to run, so in the default profile we run a few sanity checks that are nice and short, and then we can have a different profile for running all of the tests, which would be turned on as part of test-patch.
        Hide
        Aaron T. Myers added a comment -

        I think it is a serious mistake to disable all of the tests by default.

        Why?

        My workflow is such that I end up explicitly disabling the tests more often than not when running maven commands, so it makes sense to me that we shouldn't run the full test suite except when explicitly directing maven to do so. It seems unrealistic to me to expect that every time someone runs `mvn package' they also happen to want to run the full test suite. Granted, this wouldn't be so onerous if it didn't take multiple hours for the test suite to run, but so be it.

        Show
        Aaron T. Myers added a comment - I think it is a serious mistake to disable all of the tests by default. Why? My workflow is such that I end up explicitly disabling the tests more often than not when running maven commands, so it makes sense to me that we shouldn't run the full test suite except when explicitly directing maven to do so. It seems unrealistic to me to expect that every time someone runs `mvn package' they also happen to want to run the full test suite. Granted, this wouldn't be so onerous if it didn't take multiple hours for the test suite to run, but so be it.
        Hide
        Owen O'Malley added a comment -

        I think it is a serious mistake to disable all of the tests by default. Can you set the property in .m2/settings.xml?

        Show
        Owen O'Malley added a comment - I think it is a serious mistake to disable all of the tests by default. Can you set the property in .m2/settings.xml?
        Hide
        Tom White added a comment -

        It looks like there is a standard way of skipping by default: http://maven.apache.org/plugins/maven-surefire-plugin/examples/skipping-test.html

        Show
        Tom White added a comment - It looks like there is a standard way of skipping by default: http://maven.apache.org/plugins/maven-surefire-plugin/examples/skipping-test.html
        Hide
        Robert Joseph Evans added a comment -

        I am not sure that maven can do that i.e. don't run tests unless you type mvn test. You would probably have to type something like -DrunTests instead and set the config up to set skipTests to be opposite of runTests, and that would be very non-standard for maven. Not that I think it is bad just not how maven tends to do things.

        Show
        Robert Joseph Evans added a comment - I am not sure that maven can do that i.e. don't run tests unless you type mvn test. You would probably have to type something like -DrunTests instead and set the config up to set skipTests to be opposite of runTests, and that would be very non-standard for maven. Not that I think it is bad just not how maven tends to do things.

          People

          • Assignee:
            Unassigned
            Reporter:
            Aaron T. Myers
          • Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

            • Created:
              Updated:

              Development