You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Jean-Daniel Cryans (JIRA)" <ji...@apache.org> on 2011/04/07 21:14:05 UTC

[jira] [Created] (HBASE-3754) Define a DummyServer for tests

Define a DummyServer for tests
------------------------------

                 Key: HBASE-3754
                 URL: https://issues.apache.org/jira/browse/HBASE-3754
             Project: HBase
          Issue Type: Improvement
    Affects Versions: 0.90.1
            Reporter: Jean-Daniel Cryans
             Fix For: 0.92.0


There's a number of unit tests that implement their own Server just to pass it to some other class without implementing anything specific except getting the Configuration. We should define one that all could use and refactor the others out.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (HBASE-3754) Define a DummyServer for tests

Posted by "Jean-Daniel Cryans (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-3754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Daniel Cryans resolved HBASE-3754.
---------------------------------------

    Resolution: Won't Fix

Closing, let's mock instead.

> Define a DummyServer for tests
> ------------------------------
>
>                 Key: HBASE-3754
>                 URL: https://issues.apache.org/jira/browse/HBASE-3754
>             Project: HBase
>          Issue Type: Improvement
>    Affects Versions: 0.90.1
>            Reporter: Jean-Daniel Cryans
>             Fix For: 0.92.0
>
>
> There's a number of unit tests that implement their own Server just to pass it to some other class without implementing anything specific except getting the Configuration. We should define one that all could use and refactor the others out.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-3754) Define a DummyServer for tests

Posted by "ryan rawson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13017100#comment-13017100 ] 

ryan rawson commented on HBASE-3754:
------------------------------------

Could we use mockito for this? It should let you do 1 line mock creation.


> Define a DummyServer for tests
> ------------------------------
>
>                 Key: HBASE-3754
>                 URL: https://issues.apache.org/jira/browse/HBASE-3754
>             Project: HBase
>          Issue Type: Improvement
>    Affects Versions: 0.90.1
>            Reporter: Jean-Daniel Cryans
>             Fix For: 0.92.0
>
>
> There's a number of unit tests that implement their own Server just to pass it to some other class without implementing anything specific except getting the Configuration. We should define one that all could use and refactor the others out.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-3754) Define a DummyServer for tests

Posted by "Jean-Daniel Cryans (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13017196#comment-13017196 ] 

Jean-Daniel Cryans commented on HBASE-3754:
-------------------------------------------

Well at least two since most of the time you need to pass a conf down the stream:

{code}
Server mockedServer = mock(Server.class);
when(mockedServer.getConfiguration()).thenReturn(HBaseConfiguration.create());
{code}

But that's already a lot better than what we have.

> Define a DummyServer for tests
> ------------------------------
>
>                 Key: HBASE-3754
>                 URL: https://issues.apache.org/jira/browse/HBASE-3754
>             Project: HBase
>          Issue Type: Improvement
>    Affects Versions: 0.90.1
>            Reporter: Jean-Daniel Cryans
>             Fix For: 0.92.0
>
>
> There's a number of unit tests that implement their own Server just to pass it to some other class without implementing anything specific except getting the Configuration. We should define one that all could use and refactor the others out.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-3754) Define a DummyServer for tests

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13020475#comment-13020475 ] 

stack commented on HBASE-3754:
------------------------------

Ugh.  Maybe rather than a developer section, we need a new book, a developer's manual?  Maybe I'll start out w/ a developer chapter for now.

> Define a DummyServer for tests
> ------------------------------
>
>                 Key: HBASE-3754
>                 URL: https://issues.apache.org/jira/browse/HBASE-3754
>             Project: HBase
>          Issue Type: Improvement
>    Affects Versions: 0.90.1
>            Reporter: Jean-Daniel Cryans
>             Fix For: 0.92.0
>
>
> There's a number of unit tests that implement their own Server just to pass it to some other class without implementing anything specific except getting the Configuration. We should define one that all could use and refactor the others out.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-3754) Define a DummyServer for tests

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13020538#comment-13020538 ] 

Hudson commented on HBASE-3754:
-------------------------------

Integrated in HBase-TRUNK #1858 (See [https://hudson.apache.org/hudson/job/HBase-TRUNK/1858/])
    Added developer chapter to book; referenced HBASE-3678 and HBase-3754 AND Alex Baranau blog on how to use HBaseTestingUtility
Added developer chapter to book; referenced HBASE-3678 and HBase-3754 AND Alex Baranau blog on how to use HBaseTestingUtility


> Define a DummyServer for tests
> ------------------------------
>
>                 Key: HBASE-3754
>                 URL: https://issues.apache.org/jira/browse/HBASE-3754
>             Project: HBase
>          Issue Type: Improvement
>    Affects Versions: 0.90.1
>            Reporter: Jean-Daniel Cryans
>             Fix For: 0.92.0
>
>
> There's a number of unit tests that implement their own Server just to pass it to some other class without implementing anything specific except getting the Configuration. We should define one that all could use and refactor the others out.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-3754) Define a DummyServer for tests

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13020482#comment-13020482 ] 

stack commented on HBASE-3754:
------------------------------

I'm adding a developer chapter to the book right night w/ mocking suggestion.... so, yeah, close it.

> Define a DummyServer for tests
> ------------------------------
>
>                 Key: HBASE-3754
>                 URL: https://issues.apache.org/jira/browse/HBASE-3754
>             Project: HBase
>          Issue Type: Improvement
>    Affects Versions: 0.90.1
>            Reporter: Jean-Daniel Cryans
>             Fix For: 0.92.0
>
>
> There's a number of unit tests that implement their own Server just to pass it to some other class without implementing anything specific except getting the Configuration. We should define one that all could use and refactor the others out.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-3754) Define a DummyServer for tests

Posted by "Jean-Daniel Cryans (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13020483#comment-13020483 ] 

Jean-Daniel Cryans commented on HBASE-3754:
-------------------------------------------

Good on you.

> Define a DummyServer for tests
> ------------------------------
>
>                 Key: HBASE-3754
>                 URL: https://issues.apache.org/jira/browse/HBASE-3754
>             Project: HBase
>          Issue Type: Improvement
>    Affects Versions: 0.90.1
>            Reporter: Jean-Daniel Cryans
>             Fix For: 0.92.0
>
>
> There's a number of unit tests that implement their own Server just to pass it to some other class without implementing anything specific except getting the Configuration. We should define one that all could use and refactor the others out.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-3754) Define a DummyServer for tests

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13020474#comment-13020474 ] 

stack commented on HBASE-3754:
------------------------------

So, can we resolve this issue?  Do we need to doc. this before we can close it?  I'll start a developer section in book.  We can add it there?

> Define a DummyServer for tests
> ------------------------------
>
>                 Key: HBASE-3754
>                 URL: https://issues.apache.org/jira/browse/HBASE-3754
>             Project: HBase
>          Issue Type: Improvement
>    Affects Versions: 0.90.1
>            Reporter: Jean-Daniel Cryans
>             Fix For: 0.92.0
>
>
> There's a number of unit tests that implement their own Server just to pass it to some other class without implementing anything specific except getting the Configuration. We should define one that all could use and refactor the others out.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira