Skip to content

Commit

Permalink
Update AutoTuner tests
Browse files Browse the repository at this point in the history
Signed-off-by: Partho Sarthi <[email protected]>
  • Loading branch information
parthosa committed Jan 14, 2025
1 parent 27e08da commit 051bf95
Show file tree
Hide file tree
Showing 2 changed files with 320 additions and 219 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,21 @@ abstract class BaseAutoTunerSuite extends FunSuite with BeforeAndAfterEach with
sparkVersion, rapidsJars, distinctLocationPct, redundantReadSize, meanInput, meanShuffleRead,
shuffleStagesWithPosSpilling, shuffleSkewStages)
}

/**
* Helper method to compare the expected results with the actual output from the AutoTuner.
*
* In case of a mismatch, displays the complete output, which is useful for updating the
* expected results.
*/
protected def compareOutput(expectedResults: String, autoTunerOutput: String): Unit = {
val outputsMatch = expectedResults == autoTunerOutput
assert(outputsMatch,
s"""|=== Expected ===
|$expectedResults
|
|=== Actual ===
|$autoTunerOutput
|""".stripMargin)
}
}
Loading

0 comments on commit 051bf95

Please sign in to comment.