How to use shutdownPool method of be.seeseemelk.mockbukkit.scheduler.BukkitSchedulerMock class

Best MockBukkit code snippet using be.seeseemelk.mockbukkit.scheduler.BukkitSchedulerMock.shutdownPool

Source:BukkitSchedulerMock.java Github

copy

Full Screen

...65 */66 public void shutdown()67 {68 waitAsyncTasksFinished();69 shutdownPool(pool);70 if (asyncException.get() != null)71 throw new AsyncTaskException(asyncException.get());72 waitAsyncEventsFinished();73 shutdownPool(asyncEventExecutor);74 }75 /**76 * Shuts down the given executor service, waiting up to the shutdown timeout for all tasks to finish.77 *78 * @param pool The pool to shut down.79 * @see #setShutdownTimeout(long)80 */81 private void shutdownPool(@NotNull ExecutorService pool)82 {83 pool.shutdown();84 try85 {86 if (!pool.awaitTermination(this.executorTimeout, TimeUnit.MILLISECONDS))87 {88 pool.shutdownNow();89 }90 }91 catch (InterruptedException e)92 {93 pool.shutdownNow();94 Thread.currentThread().interrupt();95 }...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful