Skip to content

Commit 7e12a39

Browse files
committed
Remove disabled tests
1 parent 34ea6d4 commit 7e12a39

1 file changed

Lines changed: 0 additions & 37 deletions

File tree

cluster-api/src/test/java/io/aiven/klaw/clusterapi/utils/GetAdminClientTest.java

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
import org.apache.kafka.clients.admin.ListTopicsResult;
1717
import org.apache.kafka.common.KafkaFuture;
1818
import org.junit.jupiter.api.BeforeEach;
19-
import org.junit.jupiter.api.Disabled;
2019
import org.junit.jupiter.api.Test;
2120
import org.junit.jupiter.api.extension.ExtendWith;
2221
import org.mockito.Mock;
@@ -68,42 +67,6 @@ public void getAdminClient1() throws Exception {
6867
}
6968
}
7069

71-
@Test
72-
@Disabled
73-
public void getAdminClient2() throws Exception {
74-
try (MockedStatic<AdminClient> mocked = mockStatic(AdminClient.class)) {
75-
mocked.when(() -> AdminClient.create(any(Properties.class))).thenReturn(adminClient);
76-
// Commented out to avoid UnnecessaryStubbingException
77-
// when(env.getProperty(any())).thenReturn("true");
78-
when(adminClient.listTopics()).thenReturn(listTopicsResult);
79-
when(listTopicsResult.names()).thenReturn(kafkaFuture);
80-
Set<String> setStr = new HashSet<>();
81-
when(kafkaFuture.get()).thenReturn(setStr);
82-
83-
AdminClient result =
84-
getAdminClient.getAdminClient(LOCALHOST_9092, KafkaSupportedProtocol.PLAINTEXT, "");
85-
assertThat(result).isNotNull();
86-
}
87-
}
88-
89-
@Test
90-
@Disabled
91-
public void getAdminClient3() throws Exception {
92-
try (MockedStatic<AdminClient> mocked = mockStatic(AdminClient.class)) {
93-
mocked.when(() -> AdminClient.create(any(Properties.class))).thenReturn(adminClient);
94-
// Commented out to avoid UnnecessaryStubbingException
95-
when(env.getProperty(any())).thenReturn("false");
96-
when(adminClient.listTopics()).thenReturn(listTopicsResult);
97-
when(listTopicsResult.names()).thenReturn(kafkaFuture);
98-
Set<String> setStr = new HashSet<>();
99-
when(kafkaFuture.get()).thenReturn(setStr);
100-
101-
AdminClient result =
102-
getAdminClient.getAdminClient(LOCALHOST_9092, KafkaSupportedProtocol.PLAINTEXT, "");
103-
assertThat(result).isNotNull();
104-
}
105-
}
106-
10770
@Test
10871
public void getPlainProperties() {
10972
Properties props = getAdminClient.getPlainProperties(LOCALHOST);

0 commit comments

Comments
 (0)