Skip to content

Commit c196e0d

Browse files
committed
Very simple possibility to control timeout via parameter
1 parent 2578f8a commit c196e0d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main/java/org/utplsql/cli/RunCommand.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@ public class RunCommand implements ICommand {
112112
description = "Outputs a load of debug information to console")
113113
private boolean logDebug = false;
114114

115+
@Parameter(
116+
names = {"-t", "--timeout"},
117+
description = "Sets the timeout in minutes after which the cli will abort. Default 60")
118+
private int timeoutInMinutes = 60;
119+
115120
private CompatibilityProxy compatibilityProxy;
116121
private ReporterFactory reporterFactory;
117122
private ReporterManager reporterManager;
@@ -216,7 +221,7 @@ public int run() {
216221
getReporterManager().startReporterGatherers(executorService, dataSource, returnCode);
217222

218223
executorService.shutdown();
219-
executorService.awaitTermination(60, TimeUnit.MINUTES);
224+
executorService.awaitTermination(timeoutInMinutes, TimeUnit.MINUTES);
220225

221226
logger.info("--------------------------------------");
222227
logger.info("All tests done.");

0 commit comments

Comments
 (0)