You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Petr Shypila <ik...@gmail.com> on 2015/05/04 07:50:31 UTC

Re: SLING-1437 as a part of Google Summer of Code 2015

Hello Bertrand and everyone,

Thank you very much for applying me for the GSoC 2015. I will do all my
best.
Could you please help me with information about how to prepare to coding
phase which starts in May.
1. Where is a good point to start prepare for work? I didn't have an
experience in integration testing(I have written only unit tests). So could
you probably provide some nice developed examples of integration tests in
Sling?
2. As I wrote I plan to concentrate on classes under bundles directory. Do
you have some priority between modules and classes here or I can prioritize
it just like "low coverage first"?
3. Communication. How often could we communicate and which way is the best?
I understand that you have no much free time, so please write me your
vision of this moment.
4. If there is something I have missed, but it's important, please write me
that. I really want to finish this project as good as I can.

In LinkedIn I saw that you're living in Switzerland. I plan to visit
Switzerland this summer(In time between July and August). So we can meet if
you are interested. And I speak German as well.

Best regards,
Petr

2015-03-24 17:12 GMT+03:00 Petr Shypila <ik...@gmail.com>:

> Hi everyone,
>
> as you already know I'm trying to take a part of Google Summer of Code
> program with SLING-1437 issue. I've wrote a proposal for this project, so
> could you please take a look on it and give me some feedback? It will be
> very nice from your side. The main problem I see in my proposal it's a weak
> work plan. I just don't know what to write in this section, since I will
> just write tests. Probably do you have some ideas? Thank you very much in
> advance.
>
> =====PROPOSAL=====
> Hi everyone. My name is Petr and I want to work on issue SLING-1437 as a
> part of Google Summer of Code 2015.
>
> Why I think It's important for community:
> I see that framework's code coverage is low and more than that, some of
> them are not covered with tests at all. And I want to fix it.
>
> Why it's important for me:
> The main goal is that in my opinion I don't have enough skills in writing
> unit and integration tests. So on this project I can really improve my
> skills. More than that, I'll make a product with which work my team and me
> better.
>
> Why I'm a good person for this project:
> I have already found and fixed issue SLING-4505 and provide some unit
> tests (see SLING-4527).
> As I wrote, I'm working with Sling for a year and I know this framework
> pretty good. Every time I have some side activities beside my study and
> work. For example in september 2014 I got a first place on hackathon
> Garage48. One month ago I finished 4-month educational program where I've
> learned some advanced Java technologies like class-loading, concurrency,
> java memory model and so on.  Few weeks ago I also successfully finished
> Statistical Learning course on Stanford Online. And for this summer my main
> goal will be to complete this project.
>
> First for all I plan to concentrate on modules with 0% coverage under
> /bundles directory. And then cover other important classes with low
> coverage. "Coding phase" starts at May 25th, so before this date I think
> it's a good time to learn project deeper, investigate role of each module
> which I will cover, and look on other implemented unit and integration
> tests under a project. There is a list of libraries, which I plan to use
> when I will write tests: JUnit, Mockito, Sling testing tools. At the end of
> a project I plan cover all modules which are not covered yet and improve
> test coverage of other's modules.
> ===================
>
> Kind regards,
> Petr
>
> 2015-03-20 11:13 GMT+03:00 Petr Shypila <ik...@gmail.com>:
>
>> Hi Bertrand,
>>
>> Thank you for your quick answer.
>> 2015-03-19 19:00 GMT+03:00 Bertrand Delacretaz <bd...@apache.org>:
>>
>>> Ok, so your problem is that many pom.xml files from the Sling modules
>>> have duplicated <dependency> entries, right?
>>>
>> Yes, that's exactly what I mean.
>>
>>
>>
>>> If that's what you mean that's by design - the high modularity of
>>> Sling and the OSGi dependency rules make it much better for each
>>> module to have its own list of dependencies.  We do have some common
>>> dependencies in the Sling parent pom but only very few, by design.
>>>
>>> Always depending on the latest version of an API, like you would do in
>>> more static systems, would be counterproductive as a module might not
>>> actually need that latest version. So it's good for the Sling modules
>>> to have their own lists.
>>>
>>> Does this clarify it for you?
>>
>>
>> Yes, thank you. I didn't know that. Thank you for the clarification.
>>
>> Best,
>> -Petr
>>
>
>

Re: SLING-1437 as a part of Google Summer of Code 2015

Posted by Bertrand Delacretaz <bd...@apache.org>.
Hi Petr,

On Fri, May 8, 2015 at 1:06 PM, Petr Shypila <ik...@gmail.com> wrote:
> ...Here are my plans until coding period will start:
> Today-May 17th(17.05) I will look on tests examples from
>  bundles/extensions/healthcheck and
> bundles/extensions/models modules.
> And 17.05-24.05 I will look for some first module where I can start to work
> on...

Sounds good to me!
-Bertrand

Re: SLING-1437 as a part of Google Summer of Code 2015

Posted by Petr Shypila <ik...@gmail.com>.
Just have updated my weekly 3P report.
Check it here:
https://cwiki.apache.org/confluence/display/SLING/GSoC+2015.+%5BSLING-1437%5D+Unit+and+Integration+tests

2015-06-15 11:55 GMT+03:00 Bertrand Delacretaz <bd...@apache.org>:

> On Mon, Jun 15, 2015 at 10:49 AM, Petr Shypila <ik...@gmail.com>
> wrote:
> > Well, I have today the hardest one and the last one tomorrow morning.
> > But it doesn't affect my work week...
>
> Ok, all the best for your exams!
> -Bertrand
>

Re: SLING-1437 as a part of Google Summer of Code 2015

Posted by Bertrand Delacretaz <bd...@apache.org>.
On Mon, Jun 15, 2015 at 10:49 AM, Petr Shypila <ik...@gmail.com> wrote:
> Well, I have today the hardest one and the last one tomorrow morning.
> But it doesn't affect my work week...

Ok, all the best for your exams!
-Bertrand

Re: SLING-1437 as a part of Google Summer of Code 2015

Posted by Petr Shypila <ik...@gmail.com>.
Well, I have today the hardest one and the last one tomorrow morning. But it doesn't affect my work week. 

Best Regards,
Petr Shypila

> On 15 Jun 2015, at 10:41, Bertrand Delacretaz <bd...@apache.org> wrote:
> 
>> On Sun, Jun 14, 2015 at 7:36 PM, Petr Shypila <ik...@gmail.com> wrote:
>> Just have updated my weekly 3P report...
> 
> Thanks! I'll have a look at your patches hopefully today.
> 
> IIUC your exams are now over and you're back on this project full-time?
> 
> -Bertrand

Re: SLING-1437 as a part of Google Summer of Code 2015

Posted by Bertrand Delacretaz <bd...@apache.org>.
On Sun, Jun 14, 2015 at 7:36 PM, Petr Shypila <ik...@gmail.com> wrote:
> Just have updated my weekly 3P report...

Thanks! I'll have a look at your patches hopefully today.

IIUC your exams are now over and you're back on this project full-time?

-Bertrand

Re: SLING-1437 as a part of Google Summer of Code 2015

Posted by Petr Shypila <ik...@gmail.com>.
Just have updated my weekly 3P report.
Check it here:
https://cwiki.apache.org/confluence/display/SLING/GSoC+2015.+%5BSLING-1437%5D+Unit+and+Integration+tests

2015-06-07 23:22 GMT+03:00 Petr Shypila <ik...@gmail.com>:

> Just have updated a weekly 3P report.
> Check it there:
> https://cwiki.apache.org/confluence/display/SLING/GSoC+2015.+%5BSLING-1437%5D+Unit+and+Integration+tests
>
> -Petr
>
> 2015-05-31 16:27 GMT+03:00 Petr Shypila <ik...@gmail.com>:
>
>> Just have updated a weekly 3P report.
>>
>> 2015-05-28 11:01 GMT+03:00 Bertrand Delacretaz <bd...@apache.org>:
>>
>>> Hi Petr,
>>>
>>> On Wed, May 27, 2015 at 11:16 PM, Petr Shypila <ik...@gmail.com>
>>> wrote:
>>> > ...Just want to notify that I have updated my previous report. First
>>> for all I
>>> > have attached a new patch with new unit tests(But I think you should
>>> apply
>>> > previous one as well)...
>>>
>>> Ok I'll have a look at that later, thanks!
>>>
>>> > You can find an updated patch file on JIRA ticket and wiki page...
>>>
>>> Please include URLs when you mention these things, otherwise it's hard
>>> to make sense of that later in this list's archives.
>>>
>>> > ...As I wrote in my PPP report I'm going start to write new tests for
>>> > commons.threads module...
>>>
>>> In the meantime I have a new "mission" for you that fits well within
>>> this phase, see https://issues.apache.org/jira/browse/SLING-4757 and
>>> feel free to ask if any question arises!
>>>
>>> -Bertrand
>>>
>>
>>
>

Re: SLING-1437 as a part of Google Summer of Code 2015

Posted by Petr Shypila <ik...@gmail.com>.
Just have updated a weekly 3P report.
Check it there:
https://cwiki.apache.org/confluence/display/SLING/GSoC+2015.+%5BSLING-1437%5D+Unit+and+Integration+tests

-Petr

2015-05-31 16:27 GMT+03:00 Petr Shypila <ik...@gmail.com>:

> Just have updated a weekly 3P report.
>
> 2015-05-28 11:01 GMT+03:00 Bertrand Delacretaz <bd...@apache.org>:
>
>> Hi Petr,
>>
>> On Wed, May 27, 2015 at 11:16 PM, Petr Shypila <ik...@gmail.com>
>> wrote:
>> > ...Just want to notify that I have updated my previous report. First
>> for all I
>> > have attached a new patch with new unit tests(But I think you should
>> apply
>> > previous one as well)...
>>
>> Ok I'll have a look at that later, thanks!
>>
>> > You can find an updated patch file on JIRA ticket and wiki page...
>>
>> Please include URLs when you mention these things, otherwise it's hard
>> to make sense of that later in this list's archives.
>>
>> > ...As I wrote in my PPP report I'm going start to write new tests for
>> > commons.threads module...
>>
>> In the meantime I have a new "mission" for you that fits well within
>> this phase, see https://issues.apache.org/jira/browse/SLING-4757 and
>> feel free to ask if any question arises!
>>
>> -Bertrand
>>
>
>

Re: SLING-1437 as a part of Google Summer of Code 2015

Posted by Petr Shypila <ik...@gmail.com>.
Just have updated a weekly 3P report.

2015-05-28 11:01 GMT+03:00 Bertrand Delacretaz <bd...@apache.org>:

> Hi Petr,
>
> On Wed, May 27, 2015 at 11:16 PM, Petr Shypila <ik...@gmail.com>
> wrote:
> > ...Just want to notify that I have updated my previous report. First for
> all I
> > have attached a new patch with new unit tests(But I think you should
> apply
> > previous one as well)...
>
> Ok I'll have a look at that later, thanks!
>
> > You can find an updated patch file on JIRA ticket and wiki page...
>
> Please include URLs when you mention these things, otherwise it's hard
> to make sense of that later in this list's archives.
>
> > ...As I wrote in my PPP report I'm going start to write new tests for
> > commons.threads module...
>
> In the meantime I have a new "mission" for you that fits well within
> this phase, see https://issues.apache.org/jira/browse/SLING-4757 and
> feel free to ask if any question arises!
>
> -Bertrand
>

Re: SLING-1437 as a part of Google Summer of Code 2015

Posted by Bertrand Delacretaz <bd...@apache.org>.
Hi Petr,

On Wed, May 27, 2015 at 11:16 PM, Petr Shypila <ik...@gmail.com> wrote:
> ...Just want to notify that I have updated my previous report. First for all I
> have attached a new patch with new unit tests(But I think you should apply
> previous one as well)...

Ok I'll have a look at that later, thanks!

> You can find an updated patch file on JIRA ticket and wiki page...

Please include URLs when you mention these things, otherwise it's hard
to make sense of that later in this list's archives.

> ...As I wrote in my PPP report I'm going start to write new tests for
> commons.threads module...

In the meantime I have a new "mission" for you that fits well within
this phase, see https://issues.apache.org/jira/browse/SLING-4757 and
feel free to ask if any question arises!

-Bertrand

Re: SLING-1437 as a part of Google Summer of Code 2015

Posted by Petr Shypila <ik...@gmail.com>.
Hello Bertrand,

Just want to notify that I have updated my previous report. First for all I
have attached a new patch with new unit tests(But I think you should apply
previous one as well).
You can find an updated patch file on JIRA ticket and wiki page.
Last changes are also on my GitHub repo:
https://github.com/PetrShypila/sling
Should I create a new pull request with these changes?
As I wrote in my PPP report I'm going start to write new tests for
commons.threads module.
What do you think about that?

Best regards,
Petr


2015-05-24 22:02 GMT+03:00 Petr Shypila <ik...@gmail.com>:

> Hello Bertrand,
>
> At this time I have improved module code coverage up to 50%. Unfortunately
> it looks like sometimes I need more time to understand what the code does
> than to write tests for it.
> I started from pretty simple classes. Most of tests for them just are just
> testing references to objects after they were passed into methods(Does it
> make sense to spend a time on simple tests like these or it's redundant?).
> I have created a JIRA issue for this module: SLING-4735.
> And I also have updated a Confluence page. Please also take a look.
>
> Best regards,
> -Petr
>
> 2015-05-18 14:59 GMT+03:00 Bertrand Delacretaz <bd...@apache.org>:
>
>> On Mon, May 18, 2015 at 1:55 PM, Petr Shypila <ik...@gmail.com>
>> wrote:
>> > ...I'm going start to code today. So at the end of the week I will show
>> you
>> > some completed work...
>>
>> Ok great! Release early, release often, it doesn't have to be finished
>> before you show it to us!
>>
>> -Bertrand
>>
>
>

Re: SLING-1437 as a part of Google Summer of Code 2015

Posted by Petr Shypila <ik...@gmail.com>.
Hello Bertrand,

At this time I have improved module code coverage up to 50%. Unfortunately
it looks like sometimes I need more time to understand what the code does
than to write tests for it.
I started from pretty simple classes. Most of tests for them just are just
testing references to objects after they were passed into methods(Does it
make sense to spend a time on simple tests like these or it's redundant?).
I have created a JIRA issue for this module: SLING-4735.
And I also have updated a Confluence page. Please also take a look.

Best regards,
-Petr

2015-05-18 14:59 GMT+03:00 Bertrand Delacretaz <bd...@apache.org>:

> On Mon, May 18, 2015 at 1:55 PM, Petr Shypila <ik...@gmail.com> wrote:
> > ...I'm going start to code today. So at the end of the week I will show
> you
> > some completed work...
>
> Ok great! Release early, release often, it doesn't have to be finished
> before you show it to us!
>
> -Bertrand
>

Re: SLING-1437 as a part of Google Summer of Code 2015

Posted by Bertrand Delacretaz <bd...@apache.org>.
On Mon, May 18, 2015 at 1:55 PM, Petr Shypila <ik...@gmail.com> wrote:
> ...I'm going start to code today. So at the end of the week I will show you
> some completed work...

Ok great! Release early, release often, it doesn't have to be finished
before you show it to us!

-Bertrand

Re: SLING-1437 as a part of Google Summer of Code 2015

Posted by Petr Shypila <ik...@gmail.com>.
Sounds good for me.

I'm going start to code today. So at the end of the week I will show you
some completed work.
And also will take a look on spock framework.

-Petr

2015-05-18 14:49 GMT+03:00 Bertrand Delacretaz <bd...@apache.org>:

> Hi Petr,
>
> On Mon, May 18, 2015 at 1:38 PM, Petr Shypila <ik...@gmail.com> wrote:
> > .../bundles/commons/logservice
> > /bundles/commons/scheduler
> > /bundles/commons/threaddump
> > /bundles/commons/threads...
>
> Out of those I think scheduler would be a good starting point as it's
> got zero tests so far.
>
> My idea would be that you start creating some unit tests for this
> module, without going too far, and we review and decide if it also
> needs integration tests, which can then be implemented locally in that
> module, to have them "closer" than many modules which have their
> integration tests under launchpad/integration-tests. We can then
> discuss how to implement those integration tests, as several options
> are currently available.
>
> Would that work for you?
>
> Note that I briefly played with https://code.google.com/p/spock/
> recently and that looks very interesting. If you like it you might try
> creating tests with that framework so we can see how well that fits in
> our overall environment and maybe suggest that as an option going
> forward.
>
> -Bertrand
>

Re: SLING-1437 as a part of Google Summer of Code 2015

Posted by Bertrand Delacretaz <bd...@apache.org>.
Hi Petr,

On Mon, May 18, 2015 at 1:38 PM, Petr Shypila <ik...@gmail.com> wrote:
> .../bundles/commons/logservice
> /bundles/commons/scheduler
> /bundles/commons/threaddump
> /bundles/commons/threads...

Out of those I think scheduler would be a good starting point as it's
got zero tests so far.

My idea would be that you start creating some unit tests for this
module, without going too far, and we review and decide if it also
needs integration tests, which can then be implemented locally in that
module, to have them "closer" than many modules which have their
integration tests under launchpad/integration-tests. We can then
discuss how to implement those integration tests, as several options
are currently available.

Would that work for you?

Note that I briefly played with https://code.google.com/p/spock/
recently and that looks very interesting. If you like it you might try
creating tests with that framework so we can see how well that fits in
our overall environment and maybe suggest that as an option going
forward.

-Bertrand

Re: SLING-1437 as a part of Google Summer of Code 2015

Posted by Petr Shypila <ik...@gmail.com>.
Hello Bertrand,

Yesterday I started to look for a module, which I can start to cover with
tests. And I think I could start to cover modules under /bundles/commons
directory.

There are few modules which are still doesn't covered with tests:
/bundles/commons/logservice
/bundles/commons/scheduler
/bundles/commons/threaddump
/bundles/commons/threads

And it looks like there is not a big deal to cover them. I'm going to
create a subtask in JIRA for this work.
My forked repository is here: https://github.com/PetrShypila/sling



> Let's have all technical discussions on the sling dev mailing list!
> Others need to be aware of what's going on.

Sorry, I understand. Just didn't notice.

-Petr

Re: SLING-1437 as a part of Google Summer of Code 2015

Posted by Bertrand Delacretaz <bd...@apache.org>.
Hi,

On Fri, May 8, 2015 at 1:06 PM, Petr Shypila <ik...@gmail.com> wrote:
> ...My username in Confluence is petr.shypila ..

You should now be able to create and edit pages at
https://cwiki.apache.org/confluence/display/SLING

-Bertrand

Re: SLING-1437 as a part of Google Summer of Code 2015

Posted by Petr Shypila <ik...@gmail.com>.
Hi Bertrand,

Thank you for your email. Sorry for the delay, right now I prepare to exams
in a university and it takes almost all my free time.

As you have probably noticed, over the years we have used various
> testing techniques in Sling, it might be good as part of your project
> to collect a set of current best practices.  I suggest that you keep a
> log of your work on a new page at
> https://cwiki.apache.org/confluence/display/SLING/Index - please
> create an account and let us know the username so we can grant you
> access.


My username in Confluence is petr.shypila



For now I'd say the bundles/extensions/healthcheck and
> bundles/extensions/models modules are good examples


>
> ...2. As I wrote I plan to concentrate on classes under bundles
> directory. Do
> > you have some priority between modules and classes here or I can
> prioritize
> > it just like "low coverage first"?...
>
> I would suggest that you pick a first core module that can use more
> tests, and we can do a few iterations on that one until we're
> satisfied with the result, and probably start collecting best
> practices while doing this.
>
> We can then have a general review of where we need more tests, based
> on that first example.
>

Ok. Very good idea.
Here are my plans until coding period will start:
Today-May 17th(17.05) I will look on tests examples from
 bundles/extensions/healthcheck and
bundles/extensions/models modules.
And 17.05-24.05 I will look for some first module where I can start to work
on.

Any objections?

Best regards,
- Petr

Re: SLING-1437 as a part of Google Summer of Code 2015

Posted by Bertrand Delacretaz <bd...@apache.org>.
Hi Petr,

Congrats on being selected for GSoC 2015, and looking forward to your work here!

On Mon, May 4, 2015 at 7:50 AM, Petr Shypila <ik...@gmail.com> wrote:
> ...1. Where is a good point to start prepare for work?...

As you have probably noticed, over the years we have used various
testing techniques in Sling, it might be good as part of your project
to collect a set of current best practices.  I suggest that you keep a
log of your work on a new page at
https://cwiki.apache.org/confluence/display/SLING/Index - please
create an account and let us know the username so we can grant you
access.

For now I'd say the bundles/extensions/healthcheck and
bundles/extensions/models modules are good examples.

> ...2. As I wrote I plan to concentrate on classes under bundles directory. Do
> you have some priority between modules and classes here or I can prioritize
> it just like "low coverage first"?...

I would suggest that you pick a first core module that can use more
tests, and we can do a few iterations on that one until we're
satisfied with the result, and probably start collecting best
practices while doing this.

We can then have a general review of where we need more tests, based
on that first example.

> 3. Communication. How often could we communicate and which way is the best?..

Everything needs to happen on this list, one thread per topic and
we'll be good. Maybe use [gsoc] in the subject line for questions that
are very specific to your project. Feel free to reach out to me as
your mentor off-list if really needed, but all technical discussions
happen here.

>From the GSoC side of things I'll ask you to provide a short 3P
(Progress, Problems, Perspectives) report weekly once the coding
begins, best is to have that on the wiki as well and just ping us here
when a new report is ready. If something needs to be private you can
also report to me off-list, in addition to the technical report on the
wiki.

> ...4. If there is something I have missed, but it's important, please write me
> that. I really want to finish this project as good as I can...

I don't see anything special right now, let's start with those
iterations on a single module once the coding phase begins.

> ...In LinkedIn I saw that you're living in Switzerland...

Indeed, feel free to ping me if you're around!

-Bertrand