You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@accumulo.apache.org by David Medinets <da...@gmail.com> on 2012/07/26 00:58:03 UTC

Re: src/start/TestMain.java - was this intended to do something?

It's been four months but I finally added Eric's comments to the code base. :)

On Mon, Mar 12, 2012 at 8:34 AM, Eric Newton <er...@gmail.com> wrote:
> Heh... this should be used in the system-level tests:
>
> $ ./bin/accumulo org.apache.accumulo.start.TestMain
> $ ./bin/accumulo org.apache.accumulo.start.TestMain badExit
> $ ./bin/accumulo org.apache.accumulo.start.TestMain throw
>
> Each case tests proper exit code propagated to the shell, the last case
> tests the proper logging of an exception.
>
> -Eric
>
> On Sun, Mar 11, 2012 at 9:44 PM, David Medinets <da...@gmail.com>wrote:
>
>> This is the file contents. Where there plans or intentions to make it
>> into something more?
>>
>> package org.apache.accumulo.start;
>>
>> public class TestMain {
>>  public static void main(String[] args) {
>>    if (args.length > 0) {
>>      if (args[0].equals("success"))
>>        System.exit(0);
>>      if (args[0].equals("throw"))
>>        throw new RuntimeException("This is an exception");
>>    }
>>    System.exit(-1);
>>  }
>> }
>>