Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-12352

Add hbase-annotation-tests to runtime classpath so can run hbase it tests.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.99.2
    • 0.99.2
    • integration tests
    • None

    Description

      To run integration tests, need hbase-annotation-tests on the CLASSPATH else:

      [stack@c2020 hbase.git]$ HADOOP_HOME=~/hadoop-2.6.0-CRC-SNAPSHOT ~/hbase/bin/hbase --config ~/conf_hbase org.apache.hadoop.hbase.IntegrationTestRunnerWithJSONOutput
      Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/hbase/IntegrationTests
      	at org.apache.hadoop.hbase.IntegrationTestsDriver$IntegrationTestFilter.<init>(IntegrationTestsDriver.java:53)
      	at org.apache.hadoop.hbase.IntegrationTestsDriver.<init>(IntegrationTestsDriver.java:43)
      	at org.apache.hadoop.hbase.IntegrationTestRunnerWithJSONOutput.<init>(IntegrationTestRunnerWithJSONOutput.java:34)
      	at org.apache.hadoop.hbase.IntegrationTestRunnerWithJSONOutput.main(IntegrationTestRunnerWithJSONOutput.java:140)
      Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.IntegrationTests
      	at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
      	at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      	... 4 more
      

      Its looking for IntegrationTests which is in the annotation test jar. Let me just commit this little patch. Complain if you think it not needed:

      @@ -1057,7 +1057,7 @@
               <artifactId>hbase-annotations</artifactId>
               <version>${project.version}</version>
               <type>test-jar</type>
      -        <scope>test</scope>
      +        <!--Was test scope only but if we want to run hbase-it tests, need the annotations test jar-->
             </dependency>
             <dependency>
               <groupId>org.apache.hbase</groupId>
      

      Attachments

        1. 12352.addendum.txt
          1 kB
          Michael Stack

        Activity

          People

            stack Michael Stack
            stack Michael Stack
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: