Skip to content

Commit cb6ed61

Browse files
committed
test: migrate S3FileDownloaderTest from JUnit 4 to JUnit 5
- Replace @BeforeClass/@afterclass with @BeforeAll/@afterall - Replace @after with @AfterEach - Update imports to use JUnit 5 API
1 parent f48e4c3 commit cb6ed61

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

core/config-resolver-s3/src/test/java/io/gatehill/imposter/config/S3FileDownloaderTest.kt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,8 @@ import io.gatehill.imposter.config.support.TestSupport.uploadFileToS3
5151
import io.gatehill.imposter.util.TestEnvironmentUtil.assumeDockerAccessible
5252
import io.vertx.core.AsyncResult
5353
import io.vertx.core.Vertx
54-
import org.junit.*
54+
import org.junit.jupiter.api.*
5555
import org.junit.jupiter.api.Assertions.assertTrue
56-
import org.junit.jupiter.api.BeforeEach
5756
import java.io.File
5857
import java.nio.file.Files
5958

@@ -84,7 +83,7 @@ class S3FileDownloaderTest {
8483
uploadFileToS3(s3Mock!!, "/config", "unused-subdir/")
8584
}
8685

87-
@After
86+
@AfterEach
8887
fun tearDown() {
8988
try {
9089
s3Mock?.takeIf { it.isRunning }?.stop()
@@ -122,13 +121,13 @@ class S3FileDownloaderTest {
122121
private var vertx: Vertx? = null
123122

124123
@JvmStatic
125-
@BeforeClass
124+
@BeforeAll
126125
fun beforeClass() {
127126
vertx = Vertx.vertx()
128127
}
129128

130129
@JvmStatic
131-
@AfterClass
130+
@AfterAll
132131
@Throws(Exception::class)
133132
fun afterClass() {
134133
blockWait<AsyncResult<Void>?> { completionHandler -> vertx!!.close(completionHandler) }

0 commit comments

Comments
 (0)