Commit 25cc18e8 authored by Stephen Nimmo's avatar Stephen Nimmo
Browse files

Added Kafka client-id to KafkaAdminConfiguration, import cleanup

parent 360ffc3f
Pipeline #74700 failed with stage
in 1 minute and 14 seconds
......@@ -10,7 +10,6 @@ import org.springframework.kafka.core.KafkaAdmin;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ExecutionException;
@Configuration
public class KafkaAdminConfiguration {
......@@ -27,10 +26,11 @@ public class KafkaAdminConfiguration {
}
@Bean
public AdminClient adminClient() throws ExecutionException, InterruptedException {
Map<String, Object> configs = new HashMap<>();
configs.put(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG, bootstrapAddress);
AdminClient adminClient = KafkaAdminClient.create(configs);
public AdminClient adminClient() {
Map<String, Object> configurationMap = new HashMap<>();
configurationMap.put(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG, bootstrapAddress);
configurationMap.put(AdminClientConfig.CLIENT_ID_CONFIG, "stream_admin_service");
AdminClient adminClient = KafkaAdminClient.create(configurationMap);
return adminClient;
}
......
......@@ -6,7 +6,9 @@ import org.opengroup.osdu.streaming.model.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import java.util.*;
import java.util.Collections;
import java.util.Optional;
import java.util.UUID;
import static org.assertj.core.api.Assertions.assertThat;
......
......@@ -11,7 +11,6 @@ import io.kubernetes.client.util.Config;
import java.io.IOException;
import java.util.Collections;
import java.util.Map;
public class KubeApiTestMain {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment