Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Very simple possibility to control timeout via parameter
  • Loading branch information
pesse committed Feb 14, 2019
commit c196e0d25222edc6de7adca4595ff1111fbb0549
7 changes: 6 additions & 1 deletion src/main/java/org/utplsql/cli/RunCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ public class RunCommand implements ICommand {
description = "Outputs a load of debug information to console")
private boolean logDebug = false;

@Parameter(
names = {"-t", "--timeout"},
description = "Sets the timeout in minutes after which the cli will abort. Default 60")
private int timeoutInMinutes = 60;

private CompatibilityProxy compatibilityProxy;
private ReporterFactory reporterFactory;
private ReporterManager reporterManager;
Expand Down Expand Up @@ -216,7 +221,7 @@ public int run() {
getReporterManager().startReporterGatherers(executorService, dataSource, returnCode);

executorService.shutdown();
executorService.awaitTermination(60, TimeUnit.MINUTES);
executorService.awaitTermination(timeoutInMinutes, TimeUnit.MINUTES);

logger.info("--------------------------------------");
logger.info("All tests done.");
Expand Down