@Test void testGetCurrentJobExecutorQueueSizeExpiredCache() { flowableJobExecutorInformation = new FlowableJobExecutorInformation(asyncExecutor) { @Override protected void updateTime() { lastUpdateTime = Instant.now() .minusSeconds(120); } }; prepareJobExecutor(JOBS_IN_QUEUE); flowableJobExecutorInformation.getCurrentJobExecutorQueueSize(); prepareJobExecutor(UPDATED_JOBS_IN_QUEUE); int currentJobExecutorQueueSize = flowableJobExecutorInformation.getCurrentJobExecutorQueueSize(); assertEquals(UPDATED_JOBS_IN_QUEUE, currentJobExecutorQueueSize); }
public int getCurrentJobExecutorQueueSize() { if (lastUpdateTime == null || isPastCacheTimeout()) { updateCurrentJobExecutorQueueSize(); } return currentJobExecutorQueueSize; }
FlowableJobExecutorInformation { public int getCurrentJobExecutorQueueSize() { if (lastUpdateTime == null || isPastCacheTimeout()) { updateCurrentJobExecutorQueueSize(); } return currentJobExecutorQueueSize; } }
FlowableJobExecutorInformation { public int getCurrentJobExecutorQueueSize() { if (lastUpdateTime == null || isPastCacheTimeout()) { updateCurrentJobExecutorQueueSize(); } return currentJobExecutorQueueSize; } @Inject  FlowableJobExecutorInformation(DefaultAsyncJobExecutor jobExecutor); }
FlowableJobExecutorInformation { public int getCurrentJobExecutorQueueSize() { if (lastUpdateTime == null || isPastCacheTimeout()) { updateCurrentJobExecutorQueueSize(); } return currentJobExecutorQueueSize; } @Inject  FlowableJobExecutorInformation(DefaultAsyncJobExecutor jobExecutor); int getCurrentJobExecutorQueueSize(); }
FlowableJobExecutorInformation { public int getCurrentJobExecutorQueueSize() { if (lastUpdateTime == null || isPastCacheTimeout()) { updateCurrentJobExecutorQueueSize(); } return currentJobExecutorQueueSize; } @Inject  FlowableJobExecutorInformation(DefaultAsyncJobExecutor jobExecutor); int getCurrentJobExecutorQueueSize();  }