* TenantAwareCacheManager define CacheEvictEvent which could be used to evict entities in general way * JpaTenantConfigurationManagement start using genera cache approach Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -409,8 +409,7 @@ public abstract class AbstractIntegrationTest {
|
||||
return assignDistributionSet(pset, Collections.singletonList(target));
|
||||
}
|
||||
|
||||
protected DistributionSetAssignmentResult assignDistributionSet(final long dsId, final String targetId,
|
||||
final int weight) {
|
||||
protected DistributionSetAssignmentResult assignDistributionSet(final long dsId, final String targetId, final int weight) {
|
||||
return assignDistributionSet(dsId, Collections.singletonList(targetId), weight);
|
||||
}
|
||||
|
||||
|
||||
@@ -15,8 +15,9 @@ import jakarta.validation.constraints.NotNull;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.eclipse.hawkbit.repository.SystemManagement;
|
||||
import org.eclipse.hawkbit.repository.event.EventPublisherHolder;
|
||||
import org.eclipse.hawkbit.security.SystemSecurityContext;
|
||||
import org.eclipse.hawkbit.tenancy.TenantAwareCacheManager;
|
||||
import org.eclipse.hawkbit.tenancy.TenantAwareCacheManager.CacheEvictEvent;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
@@ -55,6 +56,7 @@ public class CleanupTestExecutionListener extends AbstractTestExecutionListener
|
||||
log.error("Error while delete tenant", e);
|
||||
}
|
||||
});
|
||||
TenantAwareCacheManager.getInstance().evictTenant(null);
|
||||
// evict global cache
|
||||
EventPublisherHolder.getInstance().getEventPublisher().publishEvent(new CacheEvictEvent.Default(null, null, null));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user