You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@accumulo.apache.org by Jesse Yates <je...@gmail.com> on 2011/11/01 04:52:11 UTC

Re: Mocking framework

Are there any objections to adding EasyMock and PowerMock as the mocking
frameworks?

If not, in the next couple days I would like to integrate that change with
ACCUMULO-53 (or I can open up a new ticket if people prefer).

Thanks!

--Jesse
-------------------
Jesse Yates
240-888-2200
@jesse_yates

On Fri, Oct 28, 2011 at 12:24 PM, Jesse Yates <je...@gmail.com>wrote:

> Sorry for the divergent messages - couldnt find a good way to combine them.
>
>
> On Fri, Oct 28, 2011 at 11:54 AM, Keith Turner <ke...@deenlo.com> wrote:
>
>> On Fri, Oct 28, 2011 at 11:19 AM, John W Vines <jo...@ugov.gov>
>> wrote:
>> >
>>
> > 3. What I want to see us doing, at a very high level, is to have the
>> ability to mock an entire TServer to the extent where we will use something
>> to replace Zookeeper (We should probably turn our ZK work with an
>> interface) with a MockZookeeper (not generated through a Mock util) which
>> is nothing more than a Map. Same thing with the FileReader, except a
>> SortedMap, the loggers, and the master. This way we could fully implement a
>> whole TServer without worry about HDFS and Zookeeper.
>>
> To a similar extent I would like to see this done for all core components,
>> but mocking the various connectors we use to get done what we need to. I
>> see a few sets of Mock class we will have to create. But with less chance
>> of divergence in behavior then we currently experience with our
>> MockAccumulo setup.
>> >
>> This sounds like a good goal.  Seems like in addition to mocking, we
>> would need to refactor code to support dependency injection.
>>
>
> With PowerMock we can avoid having to refactor everything since we can
> catch object creation and return your own mock object. Dependency injection
> then becomes a moot need unless we start using a configuration framework
> for launching different elements.
>
>
> --
> -------------------
> Jesse Yates
> 240-888-2200
> @jesse_yates
>
>

Re: Mocking framework

Posted by Billie J Rinaldi <bi...@ugov.gov>.
On Tuesday, November 1, 2011 3:38:22 PM, "Jesse Yates" <je...@gmail.com> wrote:
> Agreed that for 1 test, its not really worth it. However, the point
> would
> be to establish these frameworks as really part of how testing is done
> going forward.
> 
> So, yeah, 1.5 seems like the better place to put that part of the
> patch.
> I'll break up ACCUMULO-19 into just the fix for BatchDeleter and then
> add
> tickets for adding mocking and another for testing for the batch
> deleter.
> 
> Sound good?

Sounds good!

Billie

Re: Mocking framework

Posted by John W Vines <jo...@ugov.gov>.
+1

----- Original Message -----
| From: "Jesse Yates" <je...@gmail.com>
| To: accumulo-dev@incubator.apache.org
| Sent: Tuesday, November 1, 2011 3:38:22 PM
| Subject: Re: Mocking framework
| Agreed that for 1 test, its not really worth it. However, the point
| would
| be to establish these frameworks as really part of how testing is done
| going forward.
| 
| So, yeah, 1.5 seems like the better place to put that part of the
| patch.
| I'll break up ACCUMULO-19 into just the fix for BatchDeleter and then
| add
| tickets for adding mocking and another for testing for the batch
| deleter.
| 
| Sound good?
| 
| -- Jesse
| -------------------
| Jesse Yates
| 240-888-2200
| @jesse_yates
| 
| On Tue, Nov 1, 2011 at 12:24 PM, Billie J Rinaldi
| <billie.j.rinaldi@ugov.gov
| > wrote:
| 
| > On Monday, October 31, 2011 11:52:11 PM, "Jesse Yates" <
| > jesse.k.yates@gmail.com> wrote:
| > > Are there any objections to adding EasyMock and PowerMock as the
| > > mocking frameworks?
| >
| > I am reluctant to add new dependencies for a single test, which
| > would be
| > the case in 1.4 at this point. If you (or anyone) would be
| > interested in
| > making substantial improvements to 1.5 by adding new tests and/or
| > improving
| > existing tests using these mocking frameworks, I think that would be
| > very
| > useful and would provide sufficient justification for the new
| > dependencies.
| >  (A 1.4 branch will be created soon, perhaps tomorrow, and the trunk
| >  will
| > become 1.5.)
| >
| > Billie
| >

Re: Mocking framework

Posted by Jesse Yates <je...@gmail.com>.
Agreed that for 1 test, its not really worth it. However, the point would
be to establish these frameworks as really part of how testing is done
going forward.

So, yeah, 1.5 seems like the better place to put that part of the patch.
I'll break up ACCUMULO-19 into just the fix for BatchDeleter and then add
tickets for adding mocking and another for testing for the batch deleter.

Sound good?

-- Jesse
-------------------
Jesse Yates
240-888-2200
@jesse_yates

On Tue, Nov 1, 2011 at 12:24 PM, Billie J Rinaldi <billie.j.rinaldi@ugov.gov
> wrote:

> On Monday, October 31, 2011 11:52:11 PM, "Jesse Yates" <
> jesse.k.yates@gmail.com> wrote:
> > Are there any objections to adding EasyMock and PowerMock as the
> > mocking frameworks?
>
> I am reluctant to add new dependencies for a single test, which would be
> the case in 1.4 at this point.  If you (or anyone) would be interested in
> making substantial improvements to 1.5 by adding new tests and/or improving
> existing tests using these mocking frameworks, I think that would be very
> useful and would provide sufficient justification for the new dependencies.
>  (A 1.4 branch will be created soon, perhaps tomorrow, and the trunk will
> become 1.5.)
>
> Billie
>

Re: Mocking framework

Posted by Billie J Rinaldi <bi...@ugov.gov>.
On Monday, October 31, 2011 11:52:11 PM, "Jesse Yates" <je...@gmail.com> wrote:
> Are there any objections to adding EasyMock and PowerMock as the
> mocking frameworks?

I am reluctant to add new dependencies for a single test, which would be the case in 1.4 at this point.  If you (or anyone) would be interested in making substantial improvements to 1.5 by adding new tests and/or improving existing tests using these mocking frameworks, I think that would be very useful and would provide sufficient justification for the new dependencies.  (A 1.4 branch will be created soon, perhaps tomorrow, and the trunk will become 1.5.)

Billie