From 248cc89e31c8fe7c2bc7b00fe2ad8dc235fde287 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Wed, 13 Sep 2023 22:39:53 +0200 Subject: [PATCH] WIP --- .../kafka/KafkaChatHomeServiceTest.java | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/test/java/de/juplo/kafka/chat/backend/implementation/kafka/KafkaChatHomeServiceTest.java b/src/test/java/de/juplo/kafka/chat/backend/implementation/kafka/KafkaChatHomeServiceTest.java index 6e6fcb14..204b34e6 100644 --- a/src/test/java/de/juplo/kafka/chat/backend/implementation/kafka/KafkaChatHomeServiceTest.java +++ b/src/test/java/de/juplo/kafka/chat/backend/implementation/kafka/KafkaChatHomeServiceTest.java @@ -76,20 +76,13 @@ public class KafkaChatHomeServiceTest extends ChatHomeServiceWithShardsTest @BeforeAll - public static void sendAndLoadStoredData( - @Autowired - KafkaTemplate messageTemplate, - @Autowired - KafkaServicesApplicationRunner applicationRunner) - throws Exception + public static void sendAndLoadStoredData(@Autowired KafkaTemplate messageTemplate) { send(messageTemplate, "5c73531c-6fc4-426c-adcb-afc5c140a0f7","{ \"id\": \"5c73531c-6fc4-426c-adcb-afc5c140a0f7\", \"shard\": 2, \"name\": \"FOO\" }", "command_create_chatroom"); send(messageTemplate,"5c73531c-6fc4-426c-adcb-afc5c140a0f7","{ \"id\" : 1, \"user\" : \"peter\", \"text\" : \"Hallo, ich heiße Peter!\" }", "event_chatmessage_received"); send(messageTemplate,"5c73531c-6fc4-426c-adcb-afc5c140a0f7","{ \"id\" : 1, \"user\" : \"ute\", \"text\" : \"Ich bin Ute...\" }", "event_chatmessage_received"); send(messageTemplate,"5c73531c-6fc4-426c-adcb-afc5c140a0f7","{ \"id\" : 2, \"user\" : \"peter\", \"text\" : \"Willst du mit mir gehen?\" }", "event_chatmessage_received"); send(messageTemplate,"5c73531c-6fc4-426c-adcb-afc5c140a0f7","{ \"id\" : 1, \"user\" : \"klaus\", \"text\" : \"Ja? Nein? Vielleicht??\" }", "event_chatmessage_received"); - - applicationRunner.run(new DefaultApplicationArguments()); } static void send(KafkaTemplate kafkaTemplate, String key, String value, String typeId) @@ -105,9 +98,7 @@ public class KafkaChatHomeServiceTest extends ChatHomeServiceWithShardsTest } @AfterAll - static void joinConsumerJob( - @Autowired - KafkaServicesApplicationRunner applicationRunner) + static void joinConsumerJob(@Autowired KafkaServicesApplicationRunner applicationRunner) { applicationRunner.joinChatRoomChannelConsumerJob(); } -- 2.20.1