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/03/12 02:44:38 UTC
src/start/TestMain.java - was this intended to do something?
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);
}
}
Re: src/start/TestMain.java - was this intended to do something?
Posted by David Medinets <da...@gmail.com>.
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);
>> }
>> }
>>
Re: src/start/TestMain.java - was this intended to do something?
Posted by Eric Newton <er...@gmail.com>.
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);
> }
> }
>