admin@glassfish.java.net

Re: Admin DevTests goodie

From: Byron Nevins <byron.nevins_at_oracle.com>
Date: Thu, 14 Apr 2011 12:27:56 -0700

Run any asadmin command with "--echo", look at output. Repeat without
"--echo"

unecho will take the former output and convert to the latter output.

p.s. the Admin Devtests have "--echo" hard-coded in for every asadmin call.

I stole the idea from Tom Mueller. It's simple. The echo'd command is
always closed with a linefeed -- so that's what I chop off -- everything
before the linefeed.


On 4/14/2011 10:59 AM, Bobby Bissett wrote:
>> String neatCleanOutput = admin.TestUtils.unecho(String hugeAsadminReturnString)
> I'm not set up to run right the dev tests right now, but I don't want to forget this (the admin dev tests are the upgrade schmuck's best friend). Do you have an example of what unecho() does to hugeAsadminReturnString?
>
> Thanks,
> Bobby
>
>

-- 
Oracle <http://www.oracle.com>
Byron Nevins | Principal MTS
Phone: +1 6503958992 <tel:+1%206503958992>
Green Oracle <http://www.oracle.com/commitment> Oracle is committed to 
developing practices and products that help protect the environment