From: Kai Moritz Date: Wed, 13 Sep 2023 20:39:53 +0000 (+0200) Subject: WIP X-Git-Tag: rebase--2023-09-14--22-59~22 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=248cc89e31c8fe7c2bc7b00fe2ad8dc235fde287;p=demos%2Fkafka%2Fchat WIP --- 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(); }