You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by Paul Smith <ps...@aconex.com> on 2010/02/14 04:11:44 UTC

help: test failure (under Maven)

Ok, I'm down to a single test failure I just don't get while running under Maven (HBASE-2099).

-------------------------------------------------------------------------------
Test set: org.apache.hadoop.hbase.zookeeper.HQuorumPeerTest
-------------------------------------------------------------------------------
Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.553 sec <<< FAILURE!
testMakeZKProps(org.apache.hadoop.hbase.zookeeper.HQuorumPeerTest)  Time elapsed: 0.386 sec  <<< FAILURE!
junit.framework.AssertionFailedError: expected:<2000> but was:<3000>

which is this method:

  public void testMakeZKProps() {
    Properties properties = HQuorumPeer.makeZKProps(conf);
    assertEquals(2000, Integer.parseInt(properties.getProperty("tickTime")));

I'm guessing that the default is 3000 (certainly hbase-default.xml has it), but the tests expectation is that it is changed by the conf to be 2000, perhaps because some expected resource is not on the classpath that contains overridden properties, but I'm stuffed if I can work out where within the test the expected modification to this tickTime property to be 2000.

I even tried doing a 'find... | xargs fgrep ..' sort of search to locate both '2000' and 'tickTime' but nothing really jumps out at me at the moment.

I really think I've stuffed up a directory move or something, so if someone can point me to the file this test should be getting this from I should be able to work it out.

If I can fix this, then 'mvn test' passes cleanly!  (Albeit taking a _looong_ time, like 10 minutes... How long does it generally take under an Ivy build?  Just for comparison, again I may have configured something wrong).

cheers,

Paul

Re: help: test failure (under Maven)

Posted by Ryan Rawson <ry...@gmail.com>.
https://issues.apache.org/jira/browse/HBASE-2226

On Sat, Feb 13, 2010 at 10:41 PM, Ryan Rawson <ry...@gmail.com> wrote:
> Ok, I figured it out...
>
> The test doesn't run!  Here is the test report:
> http://hudson.zones.apache.org/hudson/job/HBase-Patch/1108/testReport/
>
> Note no 'zookeeper' package...
>
> This is because the junit test runner only runs classes that start with Test.
>
> I'll fix this particular one.
>
> -ryan
>
> On Sat, Feb 13, 2010 at 8:58 PM, Ryan Rawson <ry...@gmail.com> wrote:
>> I might draw your attention to src/test/hbase-site.xml... while it
>> doesnt have 2000 in it, it might be the source of some of your
>> issues...
>>
>> I know I ran into weird classpath issues on test runs in intellij vs ant...
>>
>> On Sat, Feb 13, 2010 at 7:26 PM, Paul Smith <ps...@aconex.com> wrote:
>>>
>>> On 14/02/2010, at 2:17 PM, Ryan Rawson wrote:
>>>
>>>> Ill help you later... I'm out and about but it looks like the test is stale
>>>> since the new default for that value is indeed 3000. Probably can just
>>>> change it to 3000 for now...
>>>
>>> ok, well that's good to know.  I guess I relied on the last 'hudson back to normal' email, figuring the current trunk build is ok (or does that not run from trunk?) and figured it was me.
>>>
>>> thanks for the fast response!
>>>
>>> Paul
>>>
>>>
>>
>

Re: help: test failure (under Maven)

Posted by Ryan Rawson <ry...@gmail.com>.
Fixed it in SVN, and it passes.

On Sat, Feb 13, 2010 at 10:50 PM,  <ps...@aconex.com> wrote:
>
>
>
>
> On 14/02/2010, at 17:42, Ryan Rawson <ry...@gmail.com> wrote:
>
>> Ok, I figured it out...
>>
>> The test doesn't run!  Here is the test report:
>> http://hudson.zones.apache.org/hudson/job/HBase-Patch/1108/testReport/
>>
>> Note no 'zookeeper' package...
>>
>> This is because the junit test runner only runs classes that start with
>> Test.
>>
>> I'll fix this particular one.
>>
>
> Ah!  Nice find. This is why I like Maven's structure; everything under
> src/main/test is considered a test without having to configure anything. If
> one doesn't want a test to run, don't put it there (or use annotations to
> mark it as failing of something)
>
>
>
>> -ryan
>>
>> On Sat, Feb 13, 2010 at 8:58 PM, Ryan Rawson <ry...@gmail.com> wrote:
>>>
>>> I might draw your attention to src/test/hbase-site.xml... while it
>>> doesnt have 2000 in it, it might be the source of some of your
>>> issues...
>>>
>>> I know I ran into weird classpath issues on test runs in intellij vs
>>> ant...
>>>
>>> On Sat, Feb 13, 2010 at 7:26 PM, Paul Smith <ps...@aconex.com> wrote:
>>>>
>>>> On 14/02/2010, at 2:17 PM, Ryan Rawson wrote:
>>>>
>>>>> Ill help you later... I'm out and about but it looks like the test is
>>>>> stale
>>>>> since the new default for that value is indeed 3000. Probably can just
>>>>> change it to 3000 for now...
>>>>
>>>> ok, well that's good to know.  I guess I relied on the last 'hudson back
>>>> to normal' email, figuring the current trunk build is ok (or does that not
>>>> run from trunk?) and figured it was me.
>>>>
>>>> thanks for the fast response!
>>>>
>>>> Paul
>>>>
>>>>
>>>
>

Re: help: test failure (under Maven)

Posted by ps...@aconex.com.



On 14/02/2010, at 17:42, Ryan Rawson <ry...@gmail.com> wrote:

> Ok, I figured it out...
>
> The test doesn't run!  Here is the test report:
> http://hudson.zones.apache.org/hudson/job/HBase-Patch/1108/testReport/
>
> Note no 'zookeeper' package...
>
> This is because the junit test runner only runs classes that start  
> with Test.
>
> I'll fix this particular one.
>

Ah!  Nice find. This is why I like Maven's structure; everything under  
src/main/test is considered a test without having to configure  
anything. If one doesn't want a test to run, don't put it there (or  
use annotations to mark it as failing of something)



> -ryan
>
> On Sat, Feb 13, 2010 at 8:58 PM, Ryan Rawson <ry...@gmail.com>  
> wrote:
>> I might draw your attention to src/test/hbase-site.xml... while it
>> doesnt have 2000 in it, it might be the source of some of your
>> issues...
>>
>> I know I ran into weird classpath issues on test runs in intellij  
>> vs ant...
>>
>> On Sat, Feb 13, 2010 at 7:26 PM, Paul Smith <ps...@aconex.com>  
>> wrote:
>>>
>>> On 14/02/2010, at 2:17 PM, Ryan Rawson wrote:
>>>
>>>> Ill help you later... I'm out and about but it looks like the  
>>>> test is stale
>>>> since the new default for that value is indeed 3000. Probably can  
>>>> just
>>>> change it to 3000 for now...
>>>
>>> ok, well that's good to know.  I guess I relied on the last  
>>> 'hudson back to normal' email, figuring the current trunk build is  
>>> ok (or does that not run from trunk?) and figured it was me.
>>>
>>> thanks for the fast response!
>>>
>>> Paul
>>>
>>>
>>

Re: help: test failure (under Maven)

Posted by Ryan Rawson <ry...@gmail.com>.
Ok, I figured it out...

The test doesn't run!  Here is the test report:
http://hudson.zones.apache.org/hudson/job/HBase-Patch/1108/testReport/

Note no 'zookeeper' package...

This is because the junit test runner only runs classes that start with Test.

I'll fix this particular one.

-ryan

On Sat, Feb 13, 2010 at 8:58 PM, Ryan Rawson <ry...@gmail.com> wrote:
> I might draw your attention to src/test/hbase-site.xml... while it
> doesnt have 2000 in it, it might be the source of some of your
> issues...
>
> I know I ran into weird classpath issues on test runs in intellij vs ant...
>
> On Sat, Feb 13, 2010 at 7:26 PM, Paul Smith <ps...@aconex.com> wrote:
>>
>> On 14/02/2010, at 2:17 PM, Ryan Rawson wrote:
>>
>>> Ill help you later... I'm out and about but it looks like the test is stale
>>> since the new default for that value is indeed 3000. Probably can just
>>> change it to 3000 for now...
>>
>> ok, well that's good to know.  I guess I relied on the last 'hudson back to normal' email, figuring the current trunk build is ok (or does that not run from trunk?) and figured it was me.
>>
>> thanks for the fast response!
>>
>> Paul
>>
>>
>

Re: help: test failure (under Maven)

Posted by Ryan Rawson <ry...@gmail.com>.
I might draw your attention to src/test/hbase-site.xml... while it
doesnt have 2000 in it, it might be the source of some of your
issues...

I know I ran into weird classpath issues on test runs in intellij vs ant...

On Sat, Feb 13, 2010 at 7:26 PM, Paul Smith <ps...@aconex.com> wrote:
>
> On 14/02/2010, at 2:17 PM, Ryan Rawson wrote:
>
>> Ill help you later... I'm out and about but it looks like the test is stale
>> since the new default for that value is indeed 3000. Probably can just
>> change it to 3000 for now...
>
> ok, well that's good to know.  I guess I relied on the last 'hudson back to normal' email, figuring the current trunk build is ok (or does that not run from trunk?) and figured it was me.
>
> thanks for the fast response!
>
> Paul
>
>

Re: help: test failure (under Maven)

Posted by Paul Smith <ps...@aconex.com>.
On 14/02/2010, at 2:17 PM, Ryan Rawson wrote:

> Ill help you later... I'm out and about but it looks like the test is stale
> since the new default for that value is indeed 3000. Probably can just
> change it to 3000 for now...

ok, well that's good to know.  I guess I relied on the last 'hudson back to normal' email, figuring the current trunk build is ok (or does that not run from trunk?) and figured it was me.

thanks for the fast response!

Paul


Re: help: test failure (under Maven)

Posted by Ryan Rawson <ry...@gmail.com>.
Ill help you later... I'm out and about but it looks like the test is stale
since the new default for that value is indeed 3000. Probably can just
change it to 3000 for now...

On Feb 13, 2010 7:12 PM, "Paul Smith" <ps...@aconex.com> wrote:

Ok, I'm down to a single test failure I just don't get while running under
Maven (HBASE-2099).

-------------------------------------------------------------------------------
Test set: org.apache.hadoop.hbase.zookeeper.HQuorumPeerTest
-------------------------------------------------------------------------------
Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.553 sec
<<< FAILURE!
testMakeZKProps(org.apache.hadoop.hbase.zookeeper.HQuorumPeerTest)  Time
elapsed: 0.386 sec  <<< FAILURE!
junit.framework.AssertionFailedError: expected:<2000> but was:<3000>

which is this method:

 public void testMakeZKProps() {
   Properties properties = HQuorumPeer.makeZKProps(conf);
   assertEquals(2000, Integer.parseInt(properties.getProperty("tickTime")));

I'm guessing that the default is 3000 (certainly hbase-default.xml has it),
but the tests expectation is that it is changed by the conf to be 2000,
perhaps because some expected resource is not on the classpath that contains
overridden properties, but I'm stuffed if I can work out where within the
test the expected modification to this tickTime property to be 2000.

I even tried doing a 'find... | xargs fgrep ..' sort of search to locate
both '2000' and 'tickTime' but nothing really jumps out at me at the moment.

I really think I've stuffed up a directory move or something, so if someone
can point me to the file this test should be getting this from I should be
able to work it out.

If I can fix this, then 'mvn test' passes cleanly!  (Albeit taking a
_looong_ time, like 10 minutes... How long does it generally take under an
Ivy build?  Just for comparison, again I may have configured something
wrong).

cheers,

Paul