dcapwell commented on code in PR #1948:
URL: https://github.com/apache/cassandra/pull/1948#discussion_r1003826576
##########
test/simulator/main/org/apache/cassandra/simulator/paxos/AccordSimulationRunner.java:
##########
@@ -60,19 +60,27 @@ public static class Help extends
HelpCommand<AccordClusterSimulation.Builder> {}
/**
* See {@link org.apache.cassandra.simulator} package info for execution
tips
*/
- public static void main(String[] args) throws IOException
+ public static void main(String... args) throws IOException
{
AccordClusterSimulation.Builder builder = new
AccordClusterSimulation.Builder();
builder.unique(uniqueNum.getAndIncrement());
- Cli.<ICommand<AccordClusterSimulation.Builder>>builder("accord")
- .withCommand(Run.class)
- .withCommand(Reconcile.class)
- .withCommand(Record.class)
- .withCommand(Help.class)
- .withDefaultCommand(Help.class)
- .build()
- .parse(args)
- .run(builder);
+ try
+ {
+ Cli.<ICommand<AccordClusterSimulation.Builder>>builder("accord")
+ .withCommand(Run.class)
+ .withCommand(Reconcile.class)
+ .withCommand(Record.class)
+ .withCommand(Help.class)
+ .withDefaultCommand(Help.class)
+ .build()
+ .parse(args)
+ .run(builder);
+ System.exit(0);
+ }
+ catch (Throwable t)
+ {
+ System.exit(1);
Review Comment:
feel that all simulator runners need this... when an error is throw the
`main` thread dies, but not the background non-daemon threads...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]