Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qualification tool: Update RunningQualificationApp tests #5598

Merged
merged 1 commit into from
May 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,6 @@ class QualificationSuite extends FunSuite with BeforeAndAfterEach with Logging {
}

// TODO - update the running qualification app once everything else done
/*
test("running qualification app join") {
val qualApp = new RunningQualificationApp()
ToolTestUtils.runAndCollect("streaming") { spark =>
Expand Down Expand Up @@ -641,9 +640,9 @@ class QualificationSuite extends FunSuite with BeforeAndAfterEach with Logging {
assert(headers.size ==
QualOutputWriter.getSummaryHeaderStringsAndSizes(Seq(appInfo.get), 0).keys.size)
assert(values.size == headers.size)
// 2 should be the SQL DF Duration
assert(headers(2).contains("SQL DF"))
assert(values(2).toInt > 0)
// 3 should be the SQL DF Duration
assert(headers(3).contains("SQL DF"))
assert(values(3).toInt > 0)
val csvDetailedOut = qualApp.getDetailed(",", false)
val rowsDetailedOut = csvDetailedOut.split("\n")
assert(rowsDetailedOut.size == 2)
Expand All @@ -652,9 +651,9 @@ class QualificationSuite extends FunSuite with BeforeAndAfterEach with Logging {
assert(headersDetailed.size == QualOutputWriter
.getDetailedHeaderStringsAndSizes(Seq(qualApp.aggregateStats.get), false).keys.size)
assert(valuesDetailed.size == headersDetailed.size)
// 2 should be the Score
assert(headersDetailed(2).contains("Score"))
assert(valuesDetailed(2).toDouble > 0)
// 5 should be the Gpu Opportunity
assert(headersDetailed(5).contains("GPU Opportunity"))
assert(valuesDetailed(5).toDouble > 0)
}

test("running qualification app files") {
Expand Down Expand Up @@ -684,19 +683,15 @@ class QualificationSuite extends FunSuite with BeforeAndAfterEach with Logging {
assert(headers.size ==
QualOutputWriter.getSummaryHeaderStringsAndSizes(Seq(appInfo.get), 0).keys.size)
assert(values.size == headers.size)
// 2 should be the SQL DF Duration
assert(headers(2).contains("SQL DF"))
assert(values(2).toInt > 0)
// 3 should be the SQL DF Duration
assert(headers(3).contains("SQL DF"))
assert(values(3).toInt > 0)
val detailedOut = qualApp.getDetailed(":", prettyPrint = false, reportReadSchema = true)
val rowsDetailedOut = detailedOut.split("\n")
assert(rowsDetailedOut.size == 2)
val headersDetailed = rowsDetailedOut(0).split(":")
val valuesDetailed = rowsDetailedOut(1).split(":")
// Read File Format Score
assert(headersDetailed(12).contains("Read File Format Score"))
assert(valuesDetailed(12).toDouble == 50.0)
assert(headersDetailed(13).contains("Read File Formats"))
assert(valuesDetailed(13).contains("JSON"))
// Check Read Schema contains json and parquet
val readSchemaIndex = headersDetailed.length - 1
assert(headersDetailed(readSchemaIndex).contains("Read Schema"))
assert(
Expand All @@ -705,7 +700,6 @@ class QualificationSuite extends FunSuite with BeforeAndAfterEach with Logging {
}
}
}
*/
}

class ToolTestListener extends SparkListener {
Expand Down