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?
Thanks a lot for your contribution and expertise.
:-)
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!
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@glassfish.dev.java.net
For additional commands, e-mail: admin-help@glassfish.dev.java.net
---------------------------------------------------------------------
To unsubscribe, e-mail: admin-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: admin-help@glassfish.dev.java.net
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: dev-help@glassfish.dev.java.net