You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by Sai Boorlagadda <sa...@apache.org> on 2018/04/05 19:50:36 UTC

[Proposal] geode-dunit sub module.

All,

Geode's dunit framework can provide an easier way to write integration
tests for any server-side extensions or server-side application code.
Currently the dunit framework is not a published artifact, so developers
cannot write distributed tests. So the proposal is to move all dunit
framework to 'geode-dunit' sub-module while leaving distributed tests
themselves in geode-core. Also by limiting the scope to 'testCompile' there
is no cyclic dependency between core and this new module.

AFAIK, there are couple of ways users can write integration tests:

- Use gradle to setup test infrastructure,  geode-examples demonstrates
this effort.
- Use 'GeodeIntegrationTestPlugin` gradle plugin[1].

While both these approaches would be sufficient for most of the application
developers, it limits geode extension developers as the assertions can
solely on the APIs. Having dunit framework published to maven can help
these developers to write distributed unit tests just like the core product.

[1] https://cwiki.apache.org/confluence/display/GEODE/Test+your+application

Please let me know your thoughts.

Sai

Re: [Proposal] geode-dunit sub module.

Posted by Kirk Lund <kl...@apache.org>.
+1 I think I'm in favor of all of these changes as well. I don't know
anything about buildship though.

I do have a few dunit changes on a feature branch that I'd like to get
merged to develop before we move dunit out of geode-core. I'll try to wrap
up these changes by Tues or Wed.

On Mon, Apr 16, 2018 at 4:11 PM, Sai Boorlagadda <sa...@gmail.com>
wrote:

> +1 For a cleaner public dunit API.
>
> I am changing my proposal to rather create "geode-test" sub-module by
> combining geode-junit, geode-old-versions, and dunit test
> framework(extracted from geode-core).
>
> For eclipse users, I would recommend the use of buildship (rather than
> gradle eclipse plugin) and buildship currently suggests[1] to change the
> level to a warning and ignore any cyclic dependencies.
>
> [1] https://github.com/eclipse/buildship/issues/460
>
> On Thu, Apr 5, 2018 at 1:32 PM, Dan Smith <ds...@pivotal.io> wrote:
>
> > +1 Seems like great idea!
> >
> > A couple thoughts - I think it would help our users if we make dunit API
> > very clean and abide by our backwards compatibility rules for that API as
> > well. It would suck to write a test suite that keeps breaking on every
> > version of geode.
> >
> > I think you still might run into some build complications since
> geode-core
> > source and tests are in the same module. Especially for people running
> > eclipse, since it combines src and test into the same source set (at
> least
> > last I checked). I'm sure there is some way to make it work though.
> >
> > -Dan
> >
> > On Thu, Apr 5, 2018 at 12:50 PM, Sai Boorlagadda <
> > sai_boorlagadda@apache.org
> > > wrote:
> >
> > > All,
> > >
> > > Geode's dunit framework can provide an easier way to write integration
> > > tests for any server-side extensions or server-side application code.
> > > Currently the dunit framework is not a published artifact, so
> developers
> > > cannot write distributed tests. So the proposal is to move all dunit
> > > framework to 'geode-dunit' sub-module while leaving distributed tests
> > > themselves in geode-core. Also by limiting the scope to 'testCompile'
> > there
> > > is no cyclic dependency between core and this new module.
> > >
> > > AFAIK, there are couple of ways users can write integration tests:
> > >
> > > - Use gradle to setup test infrastructure,  geode-examples demonstrates
> > > this effort.
> > > - Use 'GeodeIntegrationTestPlugin` gradle plugin[1].
> > >
> > > While both these approaches would be sufficient for most of the
> > application
> > > developers, it limits geode extension developers as the assertions can
> > > solely on the APIs. Having dunit framework published to maven can help
> > > these developers to write distributed unit tests just like the core
> > > product.
> > >
> > > [1] https://cwiki.apache.org/confluence/display/GEODE/Test+
> > > your+application
> > >
> > > Please let me know your thoughts.
> > >
> > > Sai
> > >
> >
>

Re: [Proposal] geode-dunit sub module.

Posted by Sai Boorlagadda <sa...@gmail.com>.
+1 For a cleaner public dunit API.

I am changing my proposal to rather create "geode-test" sub-module by
combining geode-junit, geode-old-versions, and dunit test
framework(extracted from geode-core).

For eclipse users, I would recommend the use of buildship (rather than
gradle eclipse plugin) and buildship currently suggests[1] to change the
level to a warning and ignore any cyclic dependencies.

[1] https://github.com/eclipse/buildship/issues/460

On Thu, Apr 5, 2018 at 1:32 PM, Dan Smith <ds...@pivotal.io> wrote:

> +1 Seems like great idea!
>
> A couple thoughts - I think it would help our users if we make dunit API
> very clean and abide by our backwards compatibility rules for that API as
> well. It would suck to write a test suite that keeps breaking on every
> version of geode.
>
> I think you still might run into some build complications since geode-core
> source and tests are in the same module. Especially for people running
> eclipse, since it combines src and test into the same source set (at least
> last I checked). I'm sure there is some way to make it work though.
>
> -Dan
>
> On Thu, Apr 5, 2018 at 12:50 PM, Sai Boorlagadda <
> sai_boorlagadda@apache.org
> > wrote:
>
> > All,
> >
> > Geode's dunit framework can provide an easier way to write integration
> > tests for any server-side extensions or server-side application code.
> > Currently the dunit framework is not a published artifact, so developers
> > cannot write distributed tests. So the proposal is to move all dunit
> > framework to 'geode-dunit' sub-module while leaving distributed tests
> > themselves in geode-core. Also by limiting the scope to 'testCompile'
> there
> > is no cyclic dependency between core and this new module.
> >
> > AFAIK, there are couple of ways users can write integration tests:
> >
> > - Use gradle to setup test infrastructure,  geode-examples demonstrates
> > this effort.
> > - Use 'GeodeIntegrationTestPlugin` gradle plugin[1].
> >
> > While both these approaches would be sufficient for most of the
> application
> > developers, it limits geode extension developers as the assertions can
> > solely on the APIs. Having dunit framework published to maven can help
> > these developers to write distributed unit tests just like the core
> > product.
> >
> > [1] https://cwiki.apache.org/confluence/display/GEODE/Test+
> > your+application
> >
> > Please let me know your thoughts.
> >
> > Sai
> >
>

Re: [Proposal] geode-dunit sub module.

Posted by Dan Smith <ds...@pivotal.io>.
+1 Seems like great idea!

A couple thoughts - I think it would help our users if we make dunit API
very clean and abide by our backwards compatibility rules for that API as
well. It would suck to write a test suite that keeps breaking on every
version of geode.

I think you still might run into some build complications since geode-core
source and tests are in the same module. Especially for people running
eclipse, since it combines src and test into the same source set (at least
last I checked). I'm sure there is some way to make it work though.

-Dan

On Thu, Apr 5, 2018 at 12:50 PM, Sai Boorlagadda <sai_boorlagadda@apache.org
> wrote:

> All,
>
> Geode's dunit framework can provide an easier way to write integration
> tests for any server-side extensions or server-side application code.
> Currently the dunit framework is not a published artifact, so developers
> cannot write distributed tests. So the proposal is to move all dunit
> framework to 'geode-dunit' sub-module while leaving distributed tests
> themselves in geode-core. Also by limiting the scope to 'testCompile' there
> is no cyclic dependency between core and this new module.
>
> AFAIK, there are couple of ways users can write integration tests:
>
> - Use gradle to setup test infrastructure,  geode-examples demonstrates
> this effort.
> - Use 'GeodeIntegrationTestPlugin` gradle plugin[1].
>
> While both these approaches would be sufficient for most of the application
> developers, it limits geode extension developers as the assertions can
> solely on the APIs. Having dunit framework published to maven can help
> these developers to write distributed unit tests just like the core
> product.
>
> [1] https://cwiki.apache.org/confluence/display/GEODE/Test+
> your+application
>
> Please let me know your thoughts.
>
> Sai
>