FAQ
Hi devs-

When trying to execute a unit test…

$ /apps/apache-maven-3.0.3/bin/mvn test -P localTests -Dtest=TestCompactSelection

… per the new instructions from the updates to the unit test/integ test changes…

http://hbase.apache.org/book.html#hbase.unittests.cmds

… I'm getting this error:

Warning(junit.framework.TestSuite$1) Time elapsed: 0.007 sec <<< FAILURE!
junit.framework.AssertionFailedError: Exception in constructor: testCompactionRatio (java.lang.Error: Unresolved compilation problems:
org.junit.rules.TestWatcher cannot be resolved to a type
The method succeeded(Description) of type ResourceCheckerJUnitRule must override or implement a supertype method
The method failed(Throwable, Description) of type ResourceCheckerJUnitRule must override or implement a supertype method
The method starting(Description) of type ResourceCheckerJUnitRule must override or implement a supertype method
The method finished(Description) of type ResourceCheckerJUnitRule must override or implement a supertype method
at org.apache.hadoop.hbase.ResourceCheckerJUnitRule.<init>(ResourceCheckerJUnitRule.java:31)


Am I missing something? Is the book missing something? (disclaimer: I didn't update the book with these new instructions)

Thanks!


Doug Meil
Chief Software Architect, Explorys
doug.meil@explorys.com

Search Discussions

  • Ted Yu at Feb 2, 2012 at 9:46 pm
    I tried with your command and I got:
    [INFO]
    ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO]
    ------------------------------------------------------------------------
    [INFO] Total time: 7.086s

    Was the following observed on TRUNK ?

    Here is my environment:

    Apache Maven 3.0.3 (r1075438; 2011-02-28 09:31:09-0800)
    Maven home: /usr/share/maven
    Java version: 1.6.0_29, vendor: Apple Inc.
    Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
    Default locale: en_US, platform encoding: MacRoman
    OS name: "mac os x", version: "10.6.8", arch: "x86_64", family: "mac"
    On Thu, Feb 2, 2012 at 1:32 PM, Doug Meil wrote:

    Hi devs-

    When trying to execute a unit test…

    $ /apps/apache-maven-3.0.3/bin/mvn test -P localTests
    -Dtest=TestCompactSelection

    … per the new instructions from the updates to the unit test/integ test
    changes…

    http://hbase.apache.org/book.html#hbase.unittests.cmds

    … I'm getting this error:

    Warning(junit.framework.TestSuite$1) Time elapsed: 0.007 sec <<< FAILURE!
    junit.framework.AssertionFailedError: Exception in constructor:
    testCompactionRatio (java.lang.Error: Unresolved compilation problems:
    org.junit.rules.TestWatcher cannot be resolved to a type
    The method succeeded(Description) of type ResourceCheckerJUnitRule must
    override or implement a supertype method
    The method failed(Throwable, Description) of type ResourceCheckerJUnitRule
    must override or implement a supertype method
    The method starting(Description) of type ResourceCheckerJUnitRule must
    override or implement a supertype method
    The method finished(Description) of type ResourceCheckerJUnitRule must
    override or implement a supertype method
    at
    org.apache.hadoop.hbase.ResourceCheckerJUnitRule.<init>(ResourceCheckerJUnitRule.java:31)


    Am I missing something? Is the book missing something? (disclaimer: I
    didn't update the book with these new instructions)

    Thanks!


    Doug Meil
    Chief Software Architect, Explorys
    doug.meil@explorys.com
  • Doug Meil at Feb 2, 2012 at 9:51 pm
    Yep, I was on trunk.




    On 2/2/12 4:45 PM, "Ted Yu" wrote:

    I tried with your command and I got:
    [INFO]
    ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO]
    ------------------------------------------------------------------------
    [INFO] Total time: 7.086s

    Was the following observed on TRUNK ?

    Here is my environment:

    Apache Maven 3.0.3 (r1075438; 2011-02-28 09:31:09-0800)
    Maven home: /usr/share/maven
    Java version: 1.6.0_29, vendor: Apple Inc.
    Java home:
    /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
    Default locale: en_US, platform encoding: MacRoman
    OS name: "mac os x", version: "10.6.8", arch: "x86_64", family: "mac"

    On Thu, Feb 2, 2012 at 1:32 PM, Doug Meil
    wrote:
    Hi devs-

    When trying to execute a unit testŠ

    $ /apps/apache-maven-3.0.3/bin/mvn test -P localTests
    -Dtest=TestCompactSelection

    Š per the new instructions from the updates to the unit test/integ test
    changesŠ

    http://hbase.apache.org/book.html#hbase.unittests.cmds

    Š I'm getting this error:

    Warning(junit.framework.TestSuite$1) Time elapsed: 0.007 sec <<<
    FAILURE!
    junit.framework.AssertionFailedError: Exception in constructor:
    testCompactionRatio (java.lang.Error: Unresolved compilation problems:
    org.junit.rules.TestWatcher cannot be resolved to a type
    The method succeeded(Description) of type ResourceCheckerJUnitRule must
    override or implement a supertype method
    The method failed(Throwable, Description) of type
    ResourceCheckerJUnitRule
    must override or implement a supertype method
    The method starting(Description) of type ResourceCheckerJUnitRule must
    override or implement a supertype method
    The method finished(Description) of type ResourceCheckerJUnitRule must
    override or implement a supertype method
    at

    org.apache.hadoop.hbase.ResourceCheckerJUnitRule.<init>(ResourceCheckerJU
    nitRule.java:31)


    Am I missing something? Is the book missing something? (disclaimer:
    I
    didn't update the book with these new instructions)

    Thanks!


    Doug Meil
    Chief Software Architect, Explorys
    doug.meil@explorys.com
  • Doug Meil at Feb 2, 2012 at 10:01 pm
    Even with 'mvn test', many tests run just fine....

    -------------------------------------------------------
    T E S T S
    -------------------------------------------------------
    Running org.apache.hadoop.hbase.constraint.TestConstraints
    Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.145 sec
    Running org.apache.hadoop.hbase.io.encoding.TestBufferedDataBlockEncoder
    Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 13.221 sec
    Running org.apache.hadoop.hbase.io.encoding.TestEncodedSeekers
    Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 19.192 sec
    Running org.apache.hadoop.hbase.io.hfile.TestScannerSelectionUsingTTL
    Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 12.308 sec
    Running org.apache.hadoop.hbase.TestHTableDescriptor
    Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec



    ... but plenty other don't...

    Running org.apache.hadoop.hbase.util.TestIncrementingEnvironmentEdge
    Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 45.666 sec
    <<< FAILURE!
    Running org.apache.hadoop.hbase.regionserver.TestRegionSplitPolicy
    Tests run: 3, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 45.666 sec
    <<< FAILURE!
    Running org.apache.hadoop.hbase.regionserver.TestHRegionInfo
    Tests run: 5, Failures: 0, Errors: 5, Skipped: 0, Time elapsed: 45.666 sec
    <<< FAILURE!
    Running org.apache.hadoop.hbase.TestServerName
    Tests run: 4, Failures: 0, Errors: 4, Skipped: 0, Time elapsed: 45.666 sec
    <<< FAILURE!

    ... and the error is the same thing (TestWatcher).


    estGetCurrentTimeUsesSystemClock(org.apache.hadoop.hbase.util.TestIncrement
    ingEnvironmentEdge) Time elapsed: 0.001 sec <<< ERROR!
    java.lang.Error: Unresolved compilation problems:
    org.junit.rules.TestWatcher cannot be resolved to a type





    Hmmmmmm....


    On 2/2/12 4:50 PM, "Doug Meil" wrote:


    Yep, I was on trunk.




    On 2/2/12 4:45 PM, "Ted Yu" wrote:

    I tried with your command and I got:
    [INFO]
    ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO]
    ------------------------------------------------------------------------
    [INFO] Total time: 7.086s

    Was the following observed on TRUNK ?

    Here is my environment:

    Apache Maven 3.0.3 (r1075438; 2011-02-28 09:31:09-0800)
    Maven home: /usr/share/maven
    Java version: 1.6.0_29, vendor: Apple Inc.
    Java home:
    /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
    Default locale: en_US, platform encoding: MacRoman
    OS name: "mac os x", version: "10.6.8", arch: "x86_64", family: "mac"

    On Thu, Feb 2, 2012 at 1:32 PM, Doug Meil
    wrote:
    Hi devs-

    When trying to execute a unit testŠ

    $ /apps/apache-maven-3.0.3/bin/mvn test -P localTests
    -Dtest=TestCompactSelection

    Š per the new instructions from the updates to the unit test/integ test
    changesŠ

    http://hbase.apache.org/book.html#hbase.unittests.cmds

    Š I'm getting this error:

    Warning(junit.framework.TestSuite$1) Time elapsed: 0.007 sec <<<
    FAILURE!
    junit.framework.AssertionFailedError: Exception in constructor:
    testCompactionRatio (java.lang.Error: Unresolved compilation problems:
    org.junit.rules.TestWatcher cannot be resolved to a type
    The method succeeded(Description) of type ResourceCheckerJUnitRule must
    override or implement a supertype method
    The method failed(Throwable, Description) of type
    ResourceCheckerJUnitRule
    must override or implement a supertype method
    The method starting(Description) of type ResourceCheckerJUnitRule must
    override or implement a supertype method
    The method finished(Description) of type ResourceCheckerJUnitRule must
    override or implement a supertype method
    at

    org.apache.hadoop.hbase.ResourceCheckerJUnitRule.<init>(ResourceCheckerJ
    U
    nitRule.java:31)


    Am I missing something? Is the book missing something? (disclaimer:
    I
    didn't update the book with these new instructions)

    Thanks!


    Doug Meil
    Chief Software Architect, Explorys
    doug.meil@explorys.com
  • Doug Meil at Feb 3, 2012 at 1:29 pm
    Hey folks, just in case anybody else experiences anything like this, unit
    tests that had this...

    @org.junit.Rule
    public org.apache.hadoop.hbase.ResourceCheckerJUnitRule cu =
    new org.apache.hadoop.hbase.ResourceCheckerJUnitRule();

    ... were the ones that had the compile error saying that it couldn't find
    org.junit.rules.TestWatcher
    and even blowing away everything in the local maven repository and
    forcing it to re-download the jars didn't fix the issue.
    When I re-executed 'mvn eclipse:eclipse' it resolved the unit test issue
    linkage issue - which is a little strange, because you'd expect that to
    only be relevant to setting up the IDE, not the unit-test runtime
    environment.





    On 2/2/12 5:01 PM, "Doug Meil" wrote:


    Even with 'mvn test', many tests run just fine....

    -------------------------------------------------------
    T E S T S
    -------------------------------------------------------
    Running org.apache.hadoop.hbase.constraint.TestConstraints
    Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.145 sec
    Running org.apache.hadoop.hbase.io.encoding.TestBufferedDataBlockEncoder
    Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 13.221 sec
    Running org.apache.hadoop.hbase.io.encoding.TestEncodedSeekers
    Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 19.192 sec
    Running org.apache.hadoop.hbase.io.hfile.TestScannerSelectionUsingTTL
    Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 12.308 sec
    Running org.apache.hadoop.hbase.TestHTableDescriptor
    Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec



    ... but plenty other don't...

    Running org.apache.hadoop.hbase.util.TestIncrementingEnvironmentEdge
    Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 45.666 sec
    <<< FAILURE!
    Running org.apache.hadoop.hbase.regionserver.TestRegionSplitPolicy
    Tests run: 3, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 45.666 sec
    <<< FAILURE!
    Running org.apache.hadoop.hbase.regionserver.TestHRegionInfo
    Tests run: 5, Failures: 0, Errors: 5, Skipped: 0, Time elapsed: 45.666 sec
    <<< FAILURE!
    Running org.apache.hadoop.hbase.TestServerName
    Tests run: 4, Failures: 0, Errors: 4, Skipped: 0, Time elapsed: 45.666 sec
    <<< FAILURE!

    ... and the error is the same thing (TestWatcher).


    estGetCurrentTimeUsesSystemClock(org.apache.hadoop.hbase.util.TestIncremen
    t
    ingEnvironmentEdge) Time elapsed: 0.001 sec <<< ERROR!
    java.lang.Error: Unresolved compilation problems:
    org.junit.rules.TestWatcher cannot be resolved to a type





    Hmmmmmm....


    On 2/2/12 4:50 PM, "Doug Meil" wrote:


    Yep, I was on trunk.




    On 2/2/12 4:45 PM, "Ted Yu" wrote:

    I tried with your command and I got:
    [INFO]
    ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO]
    ------------------------------------------------------------------------
    [INFO] Total time: 7.086s

    Was the following observed on TRUNK ?

    Here is my environment:

    Apache Maven 3.0.3 (r1075438; 2011-02-28 09:31:09-0800)
    Maven home: /usr/share/maven
    Java version: 1.6.0_29, vendor: Apple Inc.
    Java home:
    /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
    Default locale: en_US, platform encoding: MacRoman
    OS name: "mac os x", version: "10.6.8", arch: "x86_64", family: "mac"

    On Thu, Feb 2, 2012 at 1:32 PM, Doug Meil
    wrote:
    Hi devs-

    When trying to execute a unit testŠ

    $ /apps/apache-maven-3.0.3/bin/mvn test -P localTests
    -Dtest=TestCompactSelection

    Š per the new instructions from the updates to the unit test/integ
    test
    changesŠ

    http://hbase.apache.org/book.html#hbase.unittests.cmds

    Š I'm getting this error:

    Warning(junit.framework.TestSuite$1) Time elapsed: 0.007 sec <<<
    FAILURE!
    junit.framework.AssertionFailedError: Exception in constructor:
    testCompactionRatio (java.lang.Error: Unresolved compilation problems:
    org.junit.rules.TestWatcher cannot be resolved to a type
    The method succeeded(Description) of type ResourceCheckerJUnitRule
    must
    override or implement a supertype method
    The method failed(Throwable, Description) of type
    ResourceCheckerJUnitRule
    must override or implement a supertype method
    The method starting(Description) of type ResourceCheckerJUnitRule must
    override or implement a supertype method
    The method finished(Description) of type ResourceCheckerJUnitRule must
    override or implement a supertype method
    at

    org.apache.hadoop.hbase.ResourceCheckerJUnitRule.<init>(ResourceChecker
    J
    U
    nitRule.java:31)


    Am I missing something? Is the book missing something? (disclaimer:
    I
    didn't update the book with these new instructions)

    Thanks!


    Doug Meil
    Chief Software Architect, Explorys
    doug.meil@explorys.com

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categorieshbase, hadoop
postedFeb 2, '12 at 9:32p
activeFeb 3, '12 at 1:29p
posts5
users2
websitehbase.apache.org

2 users in discussion

Doug Meil: 4 posts Ted Yu: 1 post

People

Translate

site design / logo © 2022 Grokbase