Java Code Examples for org.awaitility.Awaitility#setDefaultPollInterval()
The following examples show how to use
org.awaitility.Awaitility#setDefaultPollInterval() .
These examples are extracted from open source projects.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: apollo File: AppNamespaceServiceWithCacheTest.java License: Apache License 2.0 | 6 votes |
@Before public void setUp() throws Exception { appNamespaceServiceWithCache = new AppNamespaceServiceWithCache(appNamespaceRepository, bizConfig); scanInterval = 50; scanIntervalTimeUnit = TimeUnit.MILLISECONDS; when(bizConfig.appNamespaceCacheRebuildInterval()).thenReturn(scanInterval); when(bizConfig.appNamespaceCacheRebuildIntervalTimeUnit()).thenReturn(scanIntervalTimeUnit); when(bizConfig.appNamespaceCacheScanInterval()).thenReturn(scanInterval); when(bizConfig.appNamespaceCacheScanIntervalTimeUnit()).thenReturn(scanIntervalTimeUnit); Awaitility.reset(); Awaitility.setDefaultTimeout(scanInterval * 100, scanIntervalTimeUnit); Awaitility.setDefaultPollInterval(scanInterval, scanIntervalTimeUnit); }
Example 2
Source Project: apollo File: AccessKeyServiceWithCacheTest.java License: Apache License 2.0 | 5 votes |
@Before public void setUp() { accessKeyServiceWithCache = new AccessKeyServiceWithCache(accessKeyRepository, bizConfig); scanInterval = 50; scanIntervalTimeUnit = TimeUnit.MILLISECONDS; when(bizConfig.accessKeyCacheScanInterval()).thenReturn(scanInterval); when(bizConfig.accessKeyCacheScanIntervalTimeUnit()).thenReturn(scanIntervalTimeUnit); when(bizConfig.accessKeyCacheRebuildInterval()).thenReturn(scanInterval); when(bizConfig.accessKeyCacheRebuildIntervalTimeUnit()).thenReturn(scanIntervalTimeUnit); Awaitility.reset(); Awaitility.setDefaultTimeout(scanInterval * 100, scanIntervalTimeUnit); Awaitility.setDefaultPollInterval(scanInterval, scanIntervalTimeUnit); }
Example 3
Source Project: spring-cloud-dataflow File: DataFlowIT.java License: Apache License 2.0 | 5 votes |
@BeforeEach public void before() { dataFlowOperations = new DataFlowTemplate(URI.create(testProperties.getDataflowServerUrl())); runtimeApps = new RuntimeApplicationHelper(dataFlowOperations, testProperties.getPlatformName(), testProperties.getKubernetesAppHostSuffix()); tasks = new Tasks(dataFlowOperations); restTemplate = new RestTemplate(); // used for HTTP post in tests Awaitility.setDefaultPollInterval(Duration.ofSeconds(5)); Awaitility.setDefaultTimeout(Duration.ofMinutes(10)); }