Skip to content

Commit 2f9573c

Browse files
cgwaltersopenshift-merge-robot
authored andcommitted
testiso: Time out after 15 minutes
So we're not stuck for a long time if we hit issues.
1 parent da40517 commit 2f9573c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

mantle/cmd/kola/testiso.go

+6
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ var (
6363
)
6464

6565
const (
66+
installTimeout = 15 * time.Minute
67+
6668
scenarioPXEInstall = "pxe-install"
6769
scenarioISOInstall = "iso-install"
6870
scenarioISOLiveLogin = "iso-live-login"
@@ -260,6 +262,10 @@ func runTestIso(cmd *cobra.Command, args []string) error {
260262

261263
func awaitCompletion(inst *platform.QemuInstance, qchan *os.File, expected []string) error {
262264
errchan := make(chan error)
265+
go func() {
266+
time.Sleep(installTimeout)
267+
errchan <- fmt.Errorf("timed out after %v", installTimeout)
268+
}()
263269
go func() {
264270
if err := inst.WaitAll(); err != nil {
265271
errchan <- err

0 commit comments

Comments
 (0)