Skip to content

Commit

Permalink
chore: Add time in httpv2 tests to reduce flakiness on build VMs
Browse files Browse the repository at this point in the history
  • Loading branch information
mhamilton723 committed Mar 17, 2020
1 parent c7eed5a commit c79dd12
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/main/scala/com/microsoft/ml/spark/io/http/Parsers.scala
Expand Up @@ -242,7 +242,9 @@ class CustomOutputParser(val uid: String) extends HTTPOutputParser with ComplexP
}
def setUDF[T: TypeTag](f: HTTPResponseData => T): this.type = {
val fromRow = HTTPResponseData.makeFromRowConverter
setUDF(udf({ x: Row => f(fromRow(x)) }))
setUDF(udf({ x: Option[Row] =>
x.map(r =>
f(fromRow(r))) }))
}

override def transform(dataset: Dataset[_]): DataFrame = {
Expand Down
Expand Up @@ -42,7 +42,7 @@ trait LinuxOnly extends TestBase {

trait Flaky extends TestBase {

val retyMillis: Array[Int] = Array(0, 100, 100)
val retyMillis: Array[Int] = Array(0, 1000, 5000)

override def test(testName: String, testTags: Tag*)(testFun: => Any)(implicit pos: Position): Unit = {
super.test(testName, testTags: _*) {
Expand Down

0 comments on commit c79dd12

Please sign in to comment.