Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-13851

hadoop-openstack should build tests without auth-keys.xml

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: fs/swift, test
    • Labels:
      None
    • Target Version/s:

      Description

      hadoop-openstack require the existence of file src/test/resources/auth-keys.xml to run the tests. With the use of maven.test.skip in pom.xml, the non-existence of auth-keys.xml also prevents building the test code. Unfortunately this leads to delayed detection of build problems in test code, e.g., introduced by a mistake in backports.

          <profile>
            <id>tests-off</id>
            <activation>
              <file>
                <missing>src/test/resources/auth-keys.xml</missing>
              </file>
            </activation>
            <properties>
              <maven.test.skip>true</maven.test.skip>
            </properties>
          </profile>
          <profile>
            <id>tests-on</id>
            <activation>
              <file>
                <exists>src/test/resources/auth-keys.xml</exists>
              </file>
            </activation>
            <properties>
              <maven.test.skip>false</maven.test.skip>
            </properties>
          </profile>
      

      Section Skipping by Default in http://maven.apache.org/surefire/maven-surefire-plugin/examples/skipping-test.html suggests a different solution. Any time you want to run tests, you must do 2 things instead of 1:

      • Copy auth-keys.xml to src/test/resources
      • Run mvn install with the extra -DskipTests=false

      Would like the community to weigh in on this.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jzhuge John Zhuge
                Reporter:
                jzhuge John Zhuge
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: