You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm-dev@maven.apache.org by Torbjørn Smørgrav <ts...@stavanger.oilfield.slb.com> on 2006/02/14 08:56:14 UTC

ScmResult conventions

I see that some unit tests are asserting that the provider message in a
ScmResult
is null if the result is successfull. Is there any reason for that?
For me I would like to have the ability to get feedback from the provider
even on success.

Now if its a reason, is the success field in the ScmResult class redundant?

The patch I attatched to issue SCM-160 removed some of those asserts... I'll
put them back if
they are required.

Regards
Torbjørn

-----Original Message-----
From: Emmanuel Venisse (JIRA) [mailto:jira@codehaus.org]
Sent: 13. februar 2006 21:37
To: scm-dev@maven.apache.org
Subject: [jira] Commented: (SCM-160) Refactored tck tests, added
changelog tck test and added changelog, diff test for the bazaar
provider


    [ http://jira.codehaus.org/browse/SCM-160?page=comments#action_58542 ]

Emmanuel Venisse commented on SCM-160:
--------------------------------------

ScmTckTestCase is missing

> Refactored tck tests, added changelog tck test and added changelog, diff
test for the bazaar provider
> --------------------------------------------------------------------------
---------------------------
>
>          Key: SCM-160
>          URL: http://jira.codehaus.org/browse/SCM-160
>      Project: Maven SCM
>         Type: Improvement

>   Components: maven-scm-provider-bazaar
>     Versions: 1.0-beta-3
>  Environment: Tested on WinXp and Linux for cvs, svn and bazaar
>     Reporter: Torbjørn EIkli Smørgrav
>  Attachments: MNG-160-maven-scm-provider-bazaar.patch,
MNG-160-maven-scm-test.patch
>
>
> Short summary: Refactored code into a new baseclass: ScmTckTestCase. Added
tests to Bazaar.
> Working with my bazaar tests I found out that the tck test module had some
redundant code.
> So I took the liberty to refactor the tck package a bit before I added the
final tests to the bazaar provider.
> I tested the refactored test module with cvs, svn and bazaar on WinXp and
Linux.
> (Bazaar had trouble with linux and bazaar 0.6, but that turned out to be a
Bazaar bug that was fixed in post 0.6 versions of Bazaar)
> The refactoring consist mainly of centralizing duplicated blocks of code
into a new test base class: ScmTckTestCase. And
> using a common setUp() method for all tck tests.
> If you find this class ok - then you will most likly find the rest ok.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Re: ScmResult conventions

Posted by Emmanuel Venisse <em...@venisse.net>.

Torbjørn Smørgrav a écrit :
>>if command is in success, provider message will be always null.
> 
> 
> By definition of the API?

Ok, i checked some sources, it's possible to define the provider message and the command output when 
result is in success. So we can remove the assertNull on provider message after a check of all 
ScmResult classes.

> 
> 
>>What do you want exactly? Is it a provider message or the command output?
> 
> 
> Both. On success, the provider could have given some warnings or
> configuration details that
> we want to propagate to the client. Its not used now but since its a public
> API we are making we should
> either make it impossible to construct ScmResults with a message and success
> or we should
> simply allow it.
> 
> 
>>I'd prefer you put them back.

not need to put them back.

> 
> 
>>Emmanuel
> 
> 
> Torbjørn Smørgrav a écrit :
> 
>>I see that some unit tests are asserting that the provider message in a
>>ScmResult
>>is null if the result is successfull. Is there any reason for that?
>>For me I would like to have the ability to get feedback from the provider
>>even on success.
>>
>>Now if its a reason, is the success field in the ScmResult class
> 
> redundant?
> 
>>The patch I attatched to issue SCM-160 removed some of those asserts...
> 
> I'll
> 
>>put them back if
>>they are required.
>>
>>Regards
>>Torbjørn
>>
>>-----Original Message-----
>>From: Emmanuel Venisse (JIRA) [mailto:jira@codehaus.org]
>>Sent: 13. februar 2006 21:37
>>To: scm-dev@maven.apache.org
>>Subject: [jira] Commented: (SCM-160) Refactored tck tests, added
>>changelog tck test and added changelog, diff test for the bazaar
>>provider
>>
>>
>>    [ http://jira.codehaus.org/browse/SCM-160?page=comments#action_58542 ]
>>
>>Emmanuel Venisse commented on SCM-160:
>>--------------------------------------
>>
>>ScmTckTestCase is missing
>>
>>
>>
>>>Refactored tck tests, added changelog tck test and added changelog, diff
>>
>>test for the bazaar provider
>>
>>
>>>--------------------------------------------------------------------------
>>
>>---------------------------
>>
>>
>>>        Key: SCM-160
>>>        URL: http://jira.codehaus.org/browse/SCM-160
>>>    Project: Maven SCM
>>>       Type: Improvement
>>
>>
>>> Components: maven-scm-provider-bazaar
>>>   Versions: 1.0-beta-3
>>>Environment: Tested on WinXp and Linux for cvs, svn and bazaar
>>>   Reporter: Torbjørn EIkli Smørgrav
>>>Attachments: MNG-160-maven-scm-provider-bazaar.patch,
>>
>>MNG-160-maven-scm-test.patch
>>
>>
>>>Short summary: Refactored code into a new baseclass: ScmTckTestCase. Added
>>
>>tests to Bazaar.
>>
>>
>>>Working with my bazaar tests I found out that the tck test module had some
>>
>>redundant code.
>>
>>
>>>So I took the liberty to refactor the tck package a bit before I added the
>>
>>final tests to the bazaar provider.
>>
>>
>>>I tested the refactored test module with cvs, svn and bazaar on WinXp and
>>
>>Linux.
>>
>>
>>>(Bazaar had trouble with linux and bazaar 0.6, but that turned out to be a
>>
>>Bazaar bug that was fixed in post 0.6 versions of Bazaar)
>>
>>
>>>The refactoring consist mainly of centralizing duplicated blocks of code
>>
>>into a new test base class: ScmTckTestCase. And
>>
>>
>>>using a common setUp() method for all tck tests.
>>>If you find this class ok - then you will most likly find the rest ok.
>>
>>
>>--
>>This message is automatically generated by JIRA.
>>-
>>If you think it was sent incorrectly contact one of the administrators:
>>   http://jira.codehaus.org/secure/Administrators.jspa
>>-
>>For more information on JIRA, see:
>>   http://www.atlassian.com/software/jira
>>
>>
>>
>>
> 
> 
> 
> 
> 


RE: ScmResult conventions

Posted by Torbjørn Smørgrav <ts...@stavanger.oilfield.slb.com>.
> if command is in success, provider message will be always null.

By definition of the API?

> What do you want exactly? Is it a provider message or the command output?

Both. On success, the provider could have given some warnings or
configuration details that
we want to propagate to the client. Its not used now but since its a public
API we are making we should
either make it impossible to construct ScmResults with a message and success
or we should
simply allow it.

> I'd prefer you put them back.

> Emmanuel

Torbjørn Smørgrav a écrit :
> I see that some unit tests are asserting that the provider message in a
> ScmResult
> is null if the result is successfull. Is there any reason for that?
> For me I would like to have the ability to get feedback from the provider
> even on success.
>
> Now if its a reason, is the success field in the ScmResult class
redundant?
>
> The patch I attatched to issue SCM-160 removed some of those asserts...
I'll
> put them back if
> they are required.
>
> Regards
> Torbjørn
>
> -----Original Message-----
> From: Emmanuel Venisse (JIRA) [mailto:jira@codehaus.org]
> Sent: 13. februar 2006 21:37
> To: scm-dev@maven.apache.org
> Subject: [jira] Commented: (SCM-160) Refactored tck tests, added
> changelog tck test and added changelog, diff test for the bazaar
> provider
>
>
>     [ http://jira.codehaus.org/browse/SCM-160?page=comments#action_58542 ]
>
> Emmanuel Venisse commented on SCM-160:
> --------------------------------------
>
> ScmTckTestCase is missing
>
>
>>Refactored tck tests, added changelog tck test and added changelog, diff
>
> test for the bazaar provider
>
>>--------------------------------------------------------------------------
>
> ---------------------------
>
>>         Key: SCM-160
>>         URL: http://jira.codehaus.org/browse/SCM-160
>>     Project: Maven SCM
>>        Type: Improvement
>
>
>>  Components: maven-scm-provider-bazaar
>>    Versions: 1.0-beta-3
>> Environment: Tested on WinXp and Linux for cvs, svn and bazaar
>>    Reporter: Torbjørn EIkli Smørgrav
>> Attachments: MNG-160-maven-scm-provider-bazaar.patch,
>
> MNG-160-maven-scm-test.patch
>
>>
>>Short summary: Refactored code into a new baseclass: ScmTckTestCase. Added
>
> tests to Bazaar.
>
>>Working with my bazaar tests I found out that the tck test module had some
>
> redundant code.
>
>>So I took the liberty to refactor the tck package a bit before I added the
>
> final tests to the bazaar provider.
>
>>I tested the refactored test module with cvs, svn and bazaar on WinXp and
>
> Linux.
>
>>(Bazaar had trouble with linux and bazaar 0.6, but that turned out to be a
>
> Bazaar bug that was fixed in post 0.6 versions of Bazaar)
>
>>The refactoring consist mainly of centralizing duplicated blocks of code
>
> into a new test base class: ScmTckTestCase. And
>
>>using a common setUp() method for all tck tests.
>>If you find this class ok - then you will most likly find the rest ok.
>
>
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators:
>    http://jira.codehaus.org/secure/Administrators.jspa
> -
> For more information on JIRA, see:
>    http://www.atlassian.com/software/jira
>
>
>
>


Re: ScmResult conventions

Posted by Emmanuel Venisse <em...@venisse.net>.
if command is in success, provider message will be always null.

What do you want exactly? Is it a provider message or the command output?

I'd prefer you put them back.

Emmanuel

Torbjørn Smørgrav a écrit :
> I see that some unit tests are asserting that the provider message in a
> ScmResult
> is null if the result is successfull. Is there any reason for that?
> For me I would like to have the ability to get feedback from the provider
> even on success.
> 
> Now if its a reason, is the success field in the ScmResult class redundant?
> 
> The patch I attatched to issue SCM-160 removed some of those asserts... I'll
> put them back if
> they are required.
> 
> Regards
> Torbjørn
> 
> -----Original Message-----
> From: Emmanuel Venisse (JIRA) [mailto:jira@codehaus.org]
> Sent: 13. februar 2006 21:37
> To: scm-dev@maven.apache.org
> Subject: [jira] Commented: (SCM-160) Refactored tck tests, added
> changelog tck test and added changelog, diff test for the bazaar
> provider
> 
> 
>     [ http://jira.codehaus.org/browse/SCM-160?page=comments#action_58542 ]
> 
> Emmanuel Venisse commented on SCM-160:
> --------------------------------------
> 
> ScmTckTestCase is missing
> 
> 
>>Refactored tck tests, added changelog tck test and added changelog, diff
> 
> test for the bazaar provider
> 
>>--------------------------------------------------------------------------
> 
> ---------------------------
> 
>>         Key: SCM-160
>>         URL: http://jira.codehaus.org/browse/SCM-160
>>     Project: Maven SCM
>>        Type: Improvement
> 
> 
>>  Components: maven-scm-provider-bazaar
>>    Versions: 1.0-beta-3
>> Environment: Tested on WinXp and Linux for cvs, svn and bazaar
>>    Reporter: Torbjørn EIkli Smørgrav
>> Attachments: MNG-160-maven-scm-provider-bazaar.patch,
> 
> MNG-160-maven-scm-test.patch
> 
>>
>>Short summary: Refactored code into a new baseclass: ScmTckTestCase. Added
> 
> tests to Bazaar.
> 
>>Working with my bazaar tests I found out that the tck test module had some
> 
> redundant code.
> 
>>So I took the liberty to refactor the tck package a bit before I added the
> 
> final tests to the bazaar provider.
> 
>>I tested the refactored test module with cvs, svn and bazaar on WinXp and
> 
> Linux.
> 
>>(Bazaar had trouble with linux and bazaar 0.6, but that turned out to be a
> 
> Bazaar bug that was fixed in post 0.6 versions of Bazaar)
> 
>>The refactoring consist mainly of centralizing duplicated blocks of code
> 
> into a new test base class: ScmTckTestCase. And
> 
>>using a common setUp() method for all tck tests.
>>If you find this class ok - then you will most likly find the rest ok.
> 
> 
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators:
>    http://jira.codehaus.org/secure/Administrators.jspa
> -
> For more information on JIRA, see:
>    http://www.atlassian.com/software/jira
> 
> 
> 
>