Skip to content

Commit

Permalink
Increase timeouts in HostAllocSuite to avoid timeout failures on slow…
Browse files Browse the repository at this point in the history
… machines (#10150)

Signed-off-by: Jim Brennan <[email protected]>
  • Loading branch information
jbrennan333 authored Jan 4, 2024
1 parent 48b7988 commit beba547
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023, NVIDIA CORPORATION.
* Copyright (c) 2023-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -37,6 +37,7 @@ class HostAllocSuite extends AnyFunSuite with BeforeAndAfterEach with
BeforeAndAfterAll with TimeLimits {
private val sqlConf = new SQLConf()
private val rc = new RapidsConf(sqlConf)
private val timeoutMs = 10000

def setMockContext(taskAttemptId: Long): Unit = {
val context = mock[TaskContext]
Expand Down Expand Up @@ -128,7 +129,7 @@ class HostAllocSuite extends AnyFunSuite with BeforeAndAfterEach with

override def toString: String = s"INIT TASK $name TASK $taskId"
})
waitForStart.get(1000, TimeUnit.MILLISECONDS)
waitForStart.get(timeoutMs, TimeUnit.MILLISECONDS)
}

def done: Future[Void] = {
Expand Down Expand Up @@ -217,7 +218,7 @@ class HostAllocSuite extends AnyFunSuite with BeforeAndAfterEach with
var fc: Option[Future[Void]] = None

def waitForAlloc(): Unit = {
fb.get(1000, TimeUnit.MILLISECONDS)
fb.get(timeoutMs, TimeUnit.MILLISECONDS)
}

def assertAllocSize(expectedSize: Long): Unit = synchronized {
Expand All @@ -239,7 +240,7 @@ class HostAllocSuite extends AnyFunSuite with BeforeAndAfterEach with

def waitForSpillable(): Unit = {
if (fsb.isEmpty) makeSpillableOnThread()
fsb.get.get(1000, TimeUnit.MILLISECONDS)
fsb.get.get(timeoutMs, TimeUnit.MILLISECONDS)
}

def freeOnThread(): Unit = {
Expand All @@ -256,7 +257,7 @@ class HostAllocSuite extends AnyFunSuite with BeforeAndAfterEach with

def waitForFree(): Unit = {
if (fc.isEmpty) freeOnThread()
fc.get.get(1000, TimeUnit.MILLISECONDS)
fc.get.get(timeoutMs, TimeUnit.MILLISECONDS)
}

def freeAndWait(): Unit = {
Expand Down

0 comments on commit beba547

Please sign in to comment.