Skip to content

Commit

Permalink
Implement 10 minute timeout on integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
restingbull committed Aug 21, 2024
1 parent ebdbabb commit db74e0d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
Empty file added examples/deps/exclude/6.0.0
Empty file.
Empty file added examples/deps/exclude/6.4.0
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import java.nio.charset.StandardCharsets.UTF_8
import java.nio.file.FileSystems
import java.nio.file.Files
import java.nio.file.Path
import java.util.concurrent.TimeUnit
import java.util.zip.GZIPInputStream
import kotlin.io.path.createDirectories
import kotlin.io.path.exists
Expand Down Expand Up @@ -163,9 +164,10 @@ object BazelIntegrationTestRunner {
.directory(inDirectory.toFile())
.start()
.let { process ->
if (process.waitFor() == 0) {
if (process.waitFor(10, TimeUnit.MINUTES) && process.exitValue() == 0) {
return Result.success(process)
}
process.destroyForcibly()
return Result.failure(
AssertionError(
"""
Expand Down

0 comments on commit db74e0d

Please sign in to comment.