Improve Spring Bus usage (remove stream direct use) (#2521)
* Improve Spring Bus usage (remove stream direct use) Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com> * Remove getApplicaton when creating remote events --------- Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -113,14 +113,6 @@
|
||||
<groupId>org.springframework.security</groupId>
|
||||
<artifactId>spring-security-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-stream-test-binder</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-stream-test-support</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.protostuff</groupId>
|
||||
<artifactId>protostuff-core</artifactId>
|
||||
|
||||
@@ -45,7 +45,7 @@ import org.eclipse.hawkbit.repository.TargetManagement;
|
||||
import org.eclipse.hawkbit.repository.TargetTagManagement;
|
||||
import org.eclipse.hawkbit.repository.TargetTypeManagement;
|
||||
import org.eclipse.hawkbit.repository.event.ApplicationEventFilter;
|
||||
import org.eclipse.hawkbit.repository.model.helper.EventPublisherHolder;
|
||||
import org.eclipse.hawkbit.repository.event.EventPublisherHolder;
|
||||
import org.eclipse.hawkbit.repository.rsql.VirtualPropertyReplacer;
|
||||
import org.eclipse.hawkbit.repository.rsql.VirtualPropertyResolver;
|
||||
import org.eclipse.hawkbit.repository.test.util.RolloutTestApprovalStrategy;
|
||||
@@ -271,4 +271,4 @@ public class TestConfiguration implements AsyncConfigurer {
|
||||
super.multicastEvent(event, eventType);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -73,9 +73,7 @@ import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.cloud.bus.ServiceMatcher;
|
||||
import org.springframework.cloud.stream.binder.test.TestChannelBinderConfiguration;
|
||||
import org.springframework.context.ApplicationEventPublisher;
|
||||
import org.springframework.context.annotation.Import;
|
||||
import org.springframework.data.auditing.AuditingHandler;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
@@ -95,7 +93,7 @@ import org.springframework.test.context.TestPropertySource;
|
||||
@WithUser(principal = "bumlux", allSpPermissions = true, authorities = { CONTROLLER_ROLE, SYSTEM_ROLE })
|
||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE)
|
||||
@ContextConfiguration(classes = { TestConfiguration.class })
|
||||
@Import(TestChannelBinderConfiguration.class)
|
||||
//@Import(TestChannelBinderConfiguration.class)
|
||||
// destroy the context after each test class because otherwise we get problem when context is
|
||||
// refreshed we e.g. get two instances of CacheManager which leads to very strange test failures.
|
||||
@DirtiesContext(classMode = ClassMode.AFTER_CLASS)
|
||||
@@ -151,8 +149,6 @@ public abstract class AbstractIntegrationTest {
|
||||
@Autowired
|
||||
protected ArtifactManagement artifactManagement;
|
||||
@Autowired
|
||||
protected AuditingHandler auditingHandler;
|
||||
@Autowired
|
||||
protected TenantAware tenantAware;
|
||||
@Autowired
|
||||
protected SystemManagement systemManagement;
|
||||
@@ -169,8 +165,6 @@ public abstract class AbstractIntegrationTest {
|
||||
@Autowired
|
||||
protected ArtifactRepository binaryArtifactRepository;
|
||||
@Autowired
|
||||
protected TenantAwareCacheManager cacheManager;
|
||||
@Autowired
|
||||
protected QuotaManagement quotaManagement;
|
||||
|
||||
protected SoftwareModuleType osType;
|
||||
|
||||
Reference in New Issue
Block a user