Hi Sherry,
Sherry Shen wrote:
> Hi Kedar,
>
> It is great that you added admin CLI in QL and explained how it works.
>
> For some admin CLI issues in v3 b21 such as
> 5741 create-jdbc-connection-pool failed with NoClassDefFoundError
> QL would catch it before the build is release. Right?
Yes! In fact, such issues prompted us to add these tests.
>
> Thanks a lot for your contribution and expertise. :-)
I am glad you like it. Can you add a test for your favorite asadmin
command now? :-)
I really need to know how easy/hard it was for you to add a new
test.
Regards,
Kedar
>
> Sherry
> PS:
> By the way, here is the lrelated report of asadmin CLI tests from QL in
> the build machine from release engineering. Nice work!
> asadmin_tests — passed
> test.admin.JdbcConnectionPoolTests createPool (pulse)
> <http://gf-hudson.sfbay/hudson/job/prelude-ql/ws/test-output-felix/emailable-report.html#m10>
> 1 236
> deletePool (pulse)
> <http://gf-hudson.sfbay/hudson/job/prelude-ql/ws/test-output-felix/emailable-report.html#m11>
> 1 74
> deletedPoolDoesNotExist (pulse)
> <http://gf-hudson.sfbay/hudson/job/prelude-ql/ws/test-output-felix/emailable-report.html#m12>
> 1 55
> ensureCreatedPoolExists (pulse)
> <http://gf-hudson.sfbay/hudson/job/prelude-ql/ws/test-output-felix/emailable-report.html#m13>
> 1 64
> pingPool (pulse)
> <http://gf-hudson.sfbay/hudson/job/prelude-ql/ws/test-output-felix/emailable-report.html#m14>
> 1 5595
> test.admin.WebtierTests createListener (pulse)
> <http://gf-hudson.sfbay/hudson/job/prelude-ql/ws/test-output-felix/emailable-report.html#m15>
> 1 97
> deleteListener (pulse)
> <http://gf-hudson.sfbay/hudson/job/prelude-ql/ws/test-output-felix/emailable-report.html#m16>
> 1 53
> ensureCreatedListenerExists (pulse)
> <http://gf-hudson.sfbay/hudson/job/prelude-ql/ws/test-output-felix/emailable-report.html#m17>
> 1 54
> ensureDeletedListenerDoesNotExist (pulse)
> <http://gf-hudson.sfbay/hudson/job/prelude-ql/ws/test-output-felix/emailable-report.html#m18>
> 1 65
>
>
>
> Kedar Mhaswade wrote, On 8/30/2008 6:38 PM:
>>
>>
>> Judy Tang wrote:
>>> Fist feedback is thank you so much Kedar :-)
>> You are welcome.
>>>
>>> Would like to know how do you test if command is pass or fail, do you
>>> look for
>>> return code or return message paten match, or both ?
>>
>> The asadmin protocol is based on Manifests (java.util.jar fame) and
>> what is
>> written into them.
>>
>> Whenever a command fails, it should set the Manifest (main) attribute
>> named
>> "exit-code" to "FAILURE". When this is true, usually another Manifest
>> (main) attribute named "cause" should contain the message. Thus,
>> whether a
>> command succeeds is determined by the "exit-code" Manifest attribute
>> which can one of the following three values: "SUCCESS", "FAILURE",
>> "WARNING" (not sure
>> what "WARNING" means). This is the gist of the programmatic asadmin API.
>>
>> This is how command developers (like me) are supposed to write commands.
>>
>> For better or for worse, the values that we (developers) put into
>> Manifest
>> attributes named ("exit-code", "cause", "children", "message") have
>> become
>> the public interface of GlassFish v3. These strings have some
>> restrictions, for
>> example, the value of "children" is supposed to be a list of items
>> delimited by ';', they can't contain new-line character etc.
>>
>> I don't think this is likely to change soon, although this is rather
>> risky and fragile. I hope all command developers and users are aware
>> of this fact.
>>
>> -Kedar
>>
>>>
>>> Thanks,
>>> Judy
>>>
>>> Kedar Mhaswade wrote:
>>>
>>>> I have increased the coverage of v3 QL test suite by 60%! :-P
>>>>
>>>> No kidding, but now the number of tests is (only) 24 in number (from
>>>> an earlier 15). All these tests are written to test asadmin commands.
>>>> So, if you have written an AdminCommand, consider adding a test
>>>> to test it out. IMO, adding an asadmin command test is easier than
>>>> ever before and is documented at [1]. This is because I ended up
>>>> writing a small framework to write tests for remote asadmin
>>>> commands. It's
>>>> still being improved to handle some corner cases, but you should be
>>>> able to test your asadmin command out.
>>>>
>>>> I am looking for feedback.
>>>>
>>>> See https://glassfish.dev.java.net/issues/show_bug.cgi?id=5760 for
>>>> details.
>>>>
>>>> Regards,
>>>> Kedar
>>>>
>>>> 1- http://tinyurl.com/5q3pzh
>>>>
>>>> PS - Sorry if you received multiple copies of this message.
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
>>>> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
> --------------------------------------------------------------------- To
> unsubscribe, e-mail: quality-unsubscribe_at_glassfish.dev.java.net For
> additional commands, e-mail: quality-help_at_glassfish.dev.java.net