Introduce cache for rollouts status computation. (#509)
* Introduce cache for rollouts status computation. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Disable cache during tests. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Move cache into core. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * package private event listener. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Fix cache invalidation. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Fix sonar issues. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Fixed a test that assumes that target to group assignment follows a rule which si not the case. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>
This commit is contained in:
@@ -22,6 +22,7 @@ import org.eclipse.hawkbit.cache.DefaultDownloadIdCache;
|
||||
import org.eclipse.hawkbit.cache.DownloadIdCache;
|
||||
import org.eclipse.hawkbit.cache.TenantAwareCacheManager;
|
||||
import org.eclipse.hawkbit.event.BusProtoStuffMessageConverter;
|
||||
import org.eclipse.hawkbit.repository.RolloutStatusCache;
|
||||
import org.eclipse.hawkbit.repository.SystemManagement;
|
||||
import org.eclipse.hawkbit.repository.model.helper.EventPublisherHolder;
|
||||
import org.eclipse.hawkbit.repository.rsql.VirtualPropertyReplacer;
|
||||
@@ -75,6 +76,14 @@ import org.springframework.util.AntPathMatcher;
|
||||
@EnableAutoConfiguration
|
||||
public class TestConfiguration implements AsyncConfigurer {
|
||||
|
||||
/**
|
||||
* Disables caching during test to avoid concurrency failures during test.
|
||||
*/
|
||||
@Bean
|
||||
RolloutStatusCache rolloutStatusCache(final TenantAware tenantAware) {
|
||||
return new RolloutStatusCache(tenantAware, 0);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public LockRegistry lockRegistry() {
|
||||
return new DefaultLockRegistry();
|
||||
|
||||
Reference in New Issue
Block a user