File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
library/src/test/java/com/alibaba/dcm/agent
tool/src/test/java/com/alibaba/dcm/tool Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package com.alibaba.dcm.agent
22
33import com.alibaba.dcm.DnsCacheManipulator
44import io.kotest.core.spec.style.AnnotationSpec
5+ import io.kotest.engine.spec.tempfile
56import io.kotest.matchers.collections.shouldBeEmpty
67import io.kotest.matchers.collections.shouldContainExactly
78import io.kotest.matchers.nulls.shouldBeNull
@@ -24,7 +25,7 @@ class DcmAgentTests : AnnotationSpec() {
2425
2526 @Before
2627 fun setUp () {
27- outputFile = File .createTempFile (" dcm-output-" , " .log" )
28+ outputFile = tempfile (" dcm-output-" , " .log" )
2829 outputFile.length() shouldBe 0
2930 println (" Prepared output file: " + outputFile.absolutePath)
3031
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package com.alibaba.dcm.tool
33import io.kotest.assertions.fail
44import io.kotest.core.spec.style.AnnotationSpec
55import io.kotest.core.test.config.TestCaseConfig
6+ import io.kotest.engine.spec.tempfile
67import io.kotest.matchers.shouldBe
78import org.apache.commons.io.FileUtils
89import org.apache.commons.lang3.SystemUtils
@@ -36,7 +37,7 @@ class DcmToolTests : AnnotationSpec() {
3637
3738 @BeforeEach
3839 fun setUp () {
39- val outputFile = File .createTempFile (" dcm-output-" , " .log" )
40+ val outputFile = tempfile (" dcm-output-" , " .log" )
4041 outputFile.length() shouldBe 0
4142
4243 val outputFilePath = outputFile.canonicalPath
You can’t perform that action at this time.
0 commit comments