99import org .apache .kafka .common .errors .SaslAuthenticationException ;
1010import org .apache .kafka .common .errors .TopicAuthorizationException ;
1111import org .awaitility .Awaitility ;
12- import org .junit .Test ;
12+ import org .junit .jupiter . api . Test ;
1313import org .testcontainers .AbstractKafka ;
1414import org .testcontainers .Testcontainers ;
1515import org .testcontainers .images .builder .Transferable ;
2424import static org .assertj .core .api .Assertions .assertThat ;
2525import static org .assertj .core .api .Assertions .assertThatThrownBy ;
2626
27- public class KafkaContainerTest extends AbstractKafka {
27+ class KafkaContainerTest extends AbstractKafka {
2828
2929 private static final DockerImageName KAFKA_TEST_IMAGE = DockerImageName .parse ("confluentinc/cp-kafka:6.2.1" );
3030
@@ -35,15 +35,15 @@ public class KafkaContainerTest extends AbstractKafka {
3535 );
3636
3737 @ Test
38- public void testUsage () throws Exception {
38+ void testUsage () throws Exception {
3939 try (KafkaContainer kafka = new KafkaContainer (KAFKA_TEST_IMAGE )) {
4040 kafka .start ();
4141 testKafkaFunctionality (kafka .getBootstrapServers ());
4242 }
4343 }
4444
4545 @ Test
46- public void testUsageWithSpecificImage () throws Exception {
46+ void testUsageWithSpecificImage () throws Exception {
4747 try (
4848 // constructorWithVersion {
4949 KafkaContainer kafka = new KafkaContainer (DockerImageName .parse ("confluentinc/cp-kafka:6.2.1" ))
@@ -59,15 +59,15 @@ public void testUsageWithSpecificImage() throws Exception {
5959 }
6060
6161 @ Test
62- public void testUsageWithVersion () throws Exception {
62+ void testUsageWithVersion () throws Exception {
6363 try (KafkaContainer kafka = new KafkaContainer ("6.2.1" )) {
6464 kafka .start ();
6565 testKafkaFunctionality (kafka .getBootstrapServers ());
6666 }
6767 }
6868
6969 @ Test
70- public void testExternalZookeeperWithExternalNetwork () throws Exception {
70+ void testExternalZookeeperWithExternalNetwork () throws Exception {
7171 try (
7272 Network network = Network .newNetwork ();
7373 // withExternalZookeeper {
@@ -89,23 +89,23 @@ public void testExternalZookeeperWithExternalNetwork() throws Exception {
8989 }
9090
9191 @ Test
92- public void testConfluentPlatformVersion7 () throws Exception {
92+ void testConfluentPlatformVersion7 () throws Exception {
9393 try (KafkaContainer kafka = new KafkaContainer (DockerImageName .parse ("confluentinc/cp-kafka:7.2.2" ))) {
9494 kafka .start ();
9595 testKafkaFunctionality (kafka .getBootstrapServers ());
9696 }
9797 }
9898
9999 @ Test
100- public void testConfluentPlatformVersion5 () throws Exception {
100+ void testConfluentPlatformVersion5 () throws Exception {
101101 try (KafkaContainer kafka = new KafkaContainer (DockerImageName .parse ("confluentinc/cp-kafka:5.4.3" ))) {
102102 kafka .start ();
103103 testKafkaFunctionality (kafka .getBootstrapServers ());
104104 }
105105 }
106106
107107 @ Test
108- public void testWithHostExposedPort () throws Exception {
108+ void testWithHostExposedPort () throws Exception {
109109 Testcontainers .exposeHostPorts (12345 );
110110 try (KafkaContainer kafka = new KafkaContainer (KAFKA_TEST_IMAGE )) {
111111 kafka .start ();
@@ -114,7 +114,7 @@ public void testWithHostExposedPort() throws Exception {
114114 }
115115
116116 @ Test
117- public void testWithHostExposedPortAndExternalNetwork () throws Exception {
117+ void testWithHostExposedPortAndExternalNetwork () throws Exception {
118118 Testcontainers .exposeHostPorts (12345 );
119119 try (KafkaContainer kafka = new KafkaContainer (KAFKA_TEST_IMAGE ).withNetwork (Network .newNetwork ())) {
120120 kafka .start ();
@@ -123,7 +123,7 @@ public void testWithHostExposedPortAndExternalNetwork() throws Exception {
123123 }
124124
125125 @ Test
126- public void testUsageKraftBeforeConfluentPlatformVersion74 () throws Exception {
126+ void testUsageKraftBeforeConfluentPlatformVersion74 () throws Exception {
127127 try (
128128 KafkaContainer kafka = new KafkaContainer (DockerImageName .parse ("confluentinc/cp-kafka:7.0.1" )).withKraft ()
129129 ) {
@@ -133,7 +133,7 @@ public void testUsageKraftBeforeConfluentPlatformVersion74() throws Exception {
133133 }
134134
135135 @ Test
136- public void testUsageKraftAfterConfluentPlatformVersion74 () throws Exception {
136+ void testUsageKraftAfterConfluentPlatformVersion74 () throws Exception {
137137 try (
138138 // withKraftMode {
139139 KafkaContainer kafka = new KafkaContainer (DockerImageName .parse ("confluentinc/cp-kafka:7.4.0" )).withKraft ()
@@ -145,7 +145,7 @@ public void testUsageKraftAfterConfluentPlatformVersion74() throws Exception {
145145 }
146146
147147 @ Test
148- public void testNotSupportedKraftVersion () {
148+ void testNotSupportedKraftVersion () {
149149 try (
150150 KafkaContainer kafka = new KafkaContainer (DockerImageName .parse ("confluentinc/cp-kafka:6.2.1" )).withKraft ()
151151 ) {} catch (IllegalArgumentException e ) {
@@ -157,7 +157,7 @@ public void testNotSupportedKraftVersion() {
157157 }
158158
159159 @ Test
160- public void testKraftZookeeperMutualExclusion () {
160+ void testKraftZookeeperMutualExclusion () {
161161 try (
162162 KafkaContainer kafka = new KafkaContainer (KAFKA_KRAFT_TEST_IMAGE ).withKraft ().withExternalZookeeper ("" )
163163 ) {} catch (IllegalStateException e ) {
@@ -178,15 +178,15 @@ public void testKraftZookeeperMutualExclusion() {
178178 }
179179
180180 @ Test
181- public void testKraftPrecedenceOverEmbeddedZookeeper () throws Exception {
181+ void testKraftPrecedenceOverEmbeddedZookeeper () throws Exception {
182182 try (KafkaContainer kafka = new KafkaContainer (KAFKA_KRAFT_TEST_IMAGE ).withEmbeddedZookeeper ().withKraft ()) {
183183 kafka .start ();
184184 testKafkaFunctionality (kafka .getBootstrapServers ());
185185 }
186186 }
187187
188188 @ Test
189- public void testUsageWithListener () throws Exception {
189+ void testUsageWithListener () throws Exception {
190190 try (
191191 Network network = Network .newNetwork ();
192192 KafkaContainer kafka = new KafkaContainer (KAFKA_KRAFT_TEST_IMAGE )
@@ -216,7 +216,7 @@ public void testUsageWithListener() throws Exception {
216216
217217 @ SneakyThrows
218218 @ Test
219- public void shouldConfigureAuthenticationWithSaslUsingJaas () {
219+ void shouldConfigureAuthenticationWithSaslUsingJaas () {
220220 try (
221221 KafkaContainer kafka = new KafkaContainer (DockerImageName .parse ("confluentinc/cp-kafka:6.2.1" ))
222222 .withEnv ("KAFKA_LISTENER_SECURITY_PROTOCOL_MAP" , "PLAINTEXT:SASL_PLAINTEXT,BROKER:SASL_PLAINTEXT" )
@@ -234,7 +234,7 @@ public void shouldConfigureAuthenticationWithSaslUsingJaas() {
234234
235235 @ SneakyThrows
236236 @ Test
237- public void shouldConfigureAuthenticationWithSaslScramUsingJaas () {
237+ void shouldConfigureAuthenticationWithSaslScramUsingJaas () {
238238 try (
239239 KafkaContainer kafka = new KafkaContainer (DockerImageName .parse ("confluentinc/cp-kafka:7.7.0" )) {
240240 protected String commandKraft () {
@@ -265,7 +265,7 @@ protected String commandKraft() {
265265
266266 @ SneakyThrows
267267 @ Test
268- public void enableSaslWithUnsuccessfulTopicCreation () {
268+ void enableSaslWithUnsuccessfulTopicCreation () {
269269 try (
270270 KafkaContainer kafka = new KafkaContainer (DockerImageName .parse ("confluentinc/cp-kafka:6.2.1" ))
271271 .withEnv ("KAFKA_LISTENER_SECURITY_PROTOCOL_MAP" , "PLAINTEXT:SASL_PLAINTEXT,BROKER:SASL_PLAINTEXT" )
@@ -306,7 +306,7 @@ public void enableSaslWithUnsuccessfulTopicCreation() {
306306
307307 @ SneakyThrows
308308 @ Test
309- public void enableSaslAndWithAuthenticationError () {
309+ void enableSaslAndWithAuthenticationError () {
310310 String jaasConfig = getJaasConfig ();
311311 try (
312312 KafkaContainer kafka = new KafkaContainer (DockerImageName .parse ("confluentinc/cp-kafka:6.2.1" ))
0 commit comments