mirror of
https://github.com/valitydev/deanonimus.git
synced 2024-11-06 02:05:16 +00:00
remove redundant
This commit is contained in:
parent
39279fffb3
commit
9d68e432ef
@ -25,41 +25,16 @@ import java.util.Map;
|
||||
@ExtendWith({KafkaContainerExtension.class, ElasticsearchContainerExtension.class})
|
||||
@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_CLASS)
|
||||
@SpringBootTest
|
||||
//@ContextConfiguration(initializers = AbstractIntegrationTest.Initializer.class)
|
||||
public abstract class AbstractIntegrationTest {
|
||||
|
||||
private static final String TOPIC_NAME = "mg-events-party";
|
||||
|
||||
// private static final String CONFLUENT_PLATFORM_VERSION = "5.0.1";
|
||||
//
|
||||
// @ClassRule
|
||||
// public static ElasticsearchContainer elastic =
|
||||
// new ElasticsearchContainer("docker.elastic.co/elasticsearch/elasticsearch:7.8.0");
|
||||
//
|
||||
// @ClassRule
|
||||
// public static KafkaContainer kafka = new KafkaContainer(CONFLUENT_PLATFORM_VERSION).withEmbeddedZookeeper();
|
||||
|
||||
@DynamicPropertySource
|
||||
static void containersProps(DynamicPropertyRegistry registry) {
|
||||
registry.add("kafka.bootstrap-servers", KafkaContainerExtension.KAFKA::getBootstrapServers);
|
||||
registry.add("spring.elasticsearch.rest.uris",
|
||||
ElasticsearchContainerExtension.ELASTIC_SEARCH::getHttpHostAddress);
|
||||
}
|
||||
//
|
||||
// public static class Initializer implements ApplicationContextInitializer<ConfigurableApplicationContext> {
|
||||
// @SneakyThrows
|
||||
// @Override
|
||||
// public void initialize(ConfigurableApplicationContext configurableApplicationContext) {
|
||||
// TestPropertyValues
|
||||
// .of("kafka.bootstrap-servers=" + kafka.getBootstrapServers(),
|
||||
// "spring.elasticsearch.rest.uris=" + elastic.getHttpHostAddress())
|
||||
// .applyTo(configurableApplicationContext.getEnvironment());
|
||||
// }
|
||||
// }
|
||||
|
||||
public static void sendMessage(SinkEvent sinkEvent) {
|
||||
createProducer().send(new ProducerRecord<>(TOPIC_NAME, sinkEvent.getEvent().getSourceId(), sinkEvent));
|
||||
}
|
||||
|
||||
public static void sendMessages(List<SinkEvent> sinkEvents) {
|
||||
final Producer<String, SinkEvent> producer = createProducer();
|
||||
|
Loading…
Reference in New Issue
Block a user