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:
@@ -28,8 +28,6 @@ import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
||||
import org.springframework.amqp.rabbit.junit.RabbitAvailable;
|
||||
import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cloud.stream.binder.test.TestChannelBinderConfiguration;
|
||||
import org.springframework.context.annotation.Import;
|
||||
import org.springframework.test.annotation.DirtiesContext;
|
||||
import org.springframework.test.annotation.DirtiesContext.ClassMode;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
@@ -37,7 +35,6 @@ import org.springframework.test.context.ContextConfiguration;
|
||||
@Slf4j
|
||||
@RabbitAvailable
|
||||
@ContextConfiguration(classes = { RepositoryApplicationConfiguration.class, AmqpTestConfiguration.class, TestConfiguration.class })
|
||||
@Import(TestChannelBinderConfiguration.class)
|
||||
// Dirty context is necessary to create a new vhost and recreate all necessary beans after every test class.
|
||||
@DirtiesContext(classMode = ClassMode.AFTER_CLASS)
|
||||
@SuppressWarnings("java:S6813") // constructor injects are not possible for test classes
|
||||
|
||||
Reference in New Issue
Block a user