File tree Expand file tree Collapse file tree 2 files changed +2
-10
lines changed
tests/codegen/service-codegen-tests Expand file tree Collapse file tree 2 files changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ kotlin {
3838 compilerOptions {
3939 freeCompilerArgs.addAll(
4040 " -opt-in=kotlin.io.path.ExperimentalPathApi" ,
41- " -opt-in=kotlinx.serialization.ExperimentalSerializationApi"
41+ " -opt-in=kotlinx.serialization.ExperimentalSerializationApi" ,
4242 )
4343 }
4444}
Original file line number Diff line number Diff line change @@ -449,7 +449,7 @@ internal fun ServiceGeneratorTest.cleanupService(proc: Process) {
449449 }
450450
451451 try {
452- killProcess( proc)
452+ proc.destroy( )
453453 val exited = proc.waitFor(gracefulWindow, TimeUnit .MILLISECONDS )
454454
455455 if (! exited) {
@@ -469,14 +469,6 @@ internal fun ServiceGeneratorTest.cleanupService(proc: Process) {
469469
470470private fun isWindows () = System .getProperty(" os.name" ).lowercase().contains(" windows" )
471471
472- private fun killProcess (proc : Process ) {
473- if (isWindows()) {
474- Runtime .getRuntime().exec(" taskkill /F /T /PID ${proc.pid()} " )
475- } else {
476- proc.destroy()
477- }
478- }
479-
480472internal fun waitForPort (port : Int , timeoutSec : Long = 180): Boolean {
481473 val deadline = System .currentTimeMillis() + TimeUnit .SECONDS .toNanos(timeoutSec)
482474 while (System .currentTimeMillis() < deadline) {
You can’t perform that action at this time.
0 commit comments