accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Newton <eric.new...@gmail.com>
Subject Re: src/start/TestMain.java - was this intended to do something?
Date Mon, 12 Mar 2012 12:34:57 GMT
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 <david.medinets@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);
>  }
> }
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message