public ConditionFactory pollExecutorService ( ExecutorService executorService ) { if ( executorService != null && executorService instanceof ScheduledExecutorService ) { throw new IllegalArgumentException ( "Poll executor service cannot be an instance of " + ScheduledExecutorService . class . getName ( ) ) ; } return new ConditionFactory ( alias , timeoutConstraint , pollInterval , pollDelay , false , exceptionsIgnorer , conditionEvaluationListener , ExecutorLifecycle . withoutCleanup ( executorService ) ) ; }
Specify the executor service whose threads will be used to evaluate the poll condition in Awaitility . Note that the executor service must be shutdown manually!