Skip to content

Commit dad0349

Browse files
committed
Deflake TPC-DS build
1 parent b9a0c56 commit dad0349

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sql/core/src/test/scala/org/apache/spark/sql/TPCDSQueryTestSuite.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,11 @@ class TPCDSQueryTestSuite extends QueryTest with TPCDSBase with SQLQueryTestHelp
180180
classLoader = Thread.currentThread().getContextClassLoader)
181181
test(name) {
182182
val goldenFile = new File(s"$baseResourcePath/v1_4", s"$name.sql.out")
183+
System.gc() // Workaround for GitHub Actions memory limitation, see also SPARK-37368
183184
runQuery(queryString, goldenFile, joinConfSet.head.toSeq, false)
184185
if (!regenerateGoldenFiles) {
185186
joinConfSet.tail.foreach { conf =>
187+
System.gc() // SPARK-37368
186188
runQuery(queryString, goldenFile, conf.toSeq, true)
187189
}
188190
}
@@ -194,9 +196,11 @@ class TPCDSQueryTestSuite extends QueryTest with TPCDSBase with SQLQueryTestHelp
194196
classLoader = Thread.currentThread().getContextClassLoader)
195197
test(s"$name-v2.7") {
196198
val goldenFile = new File(s"$baseResourcePath/v2_7", s"$name.sql.out")
199+
System.gc() // SPARK-37368
197200
runQuery(queryString, goldenFile, joinConfSet.head.toSeq, false)
198201
if (!regenerateGoldenFiles) {
199202
joinConfSet.tail.foreach { conf =>
203+
System.gc() // SPARK-37368
200204
runQuery(queryString, goldenFile, conf.toSeq, true)
201205
}
202206
}

0 commit comments

Comments
 (0)