22
33import org .apache .pulsar .client .admin .PulsarAdmin ;
44import org .apache .pulsar .client .admin .PulsarAdminException ;
5- import org .junit .Test ;
5+ import org .junit .jupiter . api . Test ;
66import org .testcontainers .utility .DockerImageName ;
77
88import java .time .Duration ;
99
1010import static org .assertj .core .api .Assertions .assertThat ;
1111import static org .assertj .core .api .Assertions .assertThatThrownBy ;
1212
13- public class PulsarContainerTest extends AbstractPulsar {
13+ class PulsarContainerTest extends AbstractPulsar {
1414
1515 private static final DockerImageName PULSAR_IMAGE = DockerImageName .parse ("apachepulsar/pulsar:3.0.0" );
1616
1717 @ Test
18- public void testUsage () throws Exception {
18+ void testUsage () throws Exception {
1919 try (
2020 // do not use PULSAR_IMAGE to make the doc looks easier
2121 // constructorWithVersion {
@@ -32,7 +32,7 @@ public void testUsage() throws Exception {
3232 }
3333
3434 @ Test
35- public void envVarsUsage () throws Exception {
35+ void envVarsUsage () throws Exception {
3636 try (
3737 // constructorWithEnv {
3838 PulsarContainer pulsar = new PulsarContainer (PULSAR_IMAGE )
@@ -45,7 +45,7 @@ public void envVarsUsage() throws Exception {
4545 }
4646
4747 @ Test
48- public void customClusterName () throws Exception {
48+ void customClusterName () throws Exception {
4949 try (
5050 PulsarContainer pulsar = new PulsarContainer (PULSAR_IMAGE )
5151 .withEnv ("PULSAR_PREFIX_clusterName" , "tc-cluster" );
@@ -56,7 +56,7 @@ public void customClusterName() throws Exception {
5656 }
5757
5858 @ Test
59- public void shouldNotEnableFunctionsWorkerByDefault () throws Exception {
59+ void shouldNotEnableFunctionsWorkerByDefault () throws Exception {
6060 try (PulsarContainer pulsar = new PulsarContainer (PULSAR_IMAGE )) {
6161 pulsar .start ();
6262
@@ -68,7 +68,7 @@ public void shouldNotEnableFunctionsWorkerByDefault() throws Exception {
6868 }
6969
7070 @ Test
71- public void shouldWaitForFunctionsWorkerStarted () throws Exception {
71+ void shouldWaitForFunctionsWorkerStarted () throws Exception {
7272 try (
7373 // constructorWithFunctionsWorker {
7474 PulsarContainer pulsar = new PulsarContainer (DockerImageName .parse ("apachepulsar/pulsar:3.0.0" ))
@@ -84,7 +84,7 @@ public void shouldWaitForFunctionsWorkerStarted() throws Exception {
8484 }
8585
8686 @ Test
87- public void testTransactions () throws Exception {
87+ void testTransactions () throws Exception {
8888 try (
8989 // constructorWithTransactions {
9090 PulsarContainer pulsar = new PulsarContainer (PULSAR_IMAGE ).withTransactions ();
@@ -100,7 +100,7 @@ public void testTransactions() throws Exception {
100100 }
101101
102102 @ Test
103- public void testTransactionsAndFunctionsWorker () throws Exception {
103+ void testTransactionsAndFunctionsWorker () throws Exception {
104104 try (PulsarContainer pulsar = new PulsarContainer (PULSAR_IMAGE ).withTransactions ().withFunctionsWorker ()) {
105105 pulsar .start ();
106106
@@ -113,7 +113,7 @@ public void testTransactionsAndFunctionsWorker() throws Exception {
113113 }
114114
115115 @ Test
116- public void testClusterFullyInitialized () throws Exception {
116+ void testClusterFullyInitialized () throws Exception {
117117 try (PulsarContainer pulsar = new PulsarContainer (PULSAR_IMAGE )) {
118118 pulsar .start ();
119119
@@ -124,7 +124,7 @@ public void testClusterFullyInitialized() throws Exception {
124124 }
125125
126126 @ Test
127- public void testStartupTimeoutIsHonored () {
127+ void testStartupTimeoutIsHonored () {
128128 try (PulsarContainer pulsar = new PulsarContainer (PULSAR_IMAGE ).withStartupTimeout (Duration .ZERO )) {
129129 assertThatThrownBy (pulsar ::start )
130130 .hasRootCauseMessage ("Precondition failed: timeout must be greater than zero" );
0 commit comments