Skip to content

Commit d33ae2e

Browse files
MaxGekkdongjoon-hyun
authored andcommitted
[SPARK-26953][CORE][TEST] Disable result checking in the test: java.lang.ArrayIndexOutOfBoundsException in TimSort
## What changes were proposed in this pull request? I propose to disable (comment) result checking in `SorterSuite`.`java.lang.ArrayIndexOutOfBoundsException in TimSort` because: 1. The check is optional, and correctness of TimSort is checked by another tests. Purpose of the test is to check that TimSort doesn't fail with `ArrayIndexOutOfBoundsException`. 2. Significantly drops execution time of the test. Here are timing of running the test locally: ``` Sort: 1.4 seconds Result checking: 15.6 seconds ``` ## How was this patch tested? By `SorterSuite`. Closes apache#24343 from MaxGekk/timsort-test-speedup. Authored-by: Maxim Gekk <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
1 parent 4177292 commit d33ae2e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/src/test/scala/org/apache/spark/util/collection/SorterSuite.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ class SorterSuite extends SparkFunSuite with Logging {
154154
// The sort must finish without ArrayIndexOutOfBoundsException
155155
// The arrayToSort contains runLengths.length elements of 1, and others are 0.
156156
// Those 1 must be placed at the end of arrayToSort after sorting.
157+
/*
157158
var i: Int = 0
158159
sum = 0
159160
val amountOfZeros = arrayToSort.length - runLengths.length
@@ -169,6 +170,7 @@ class SorterSuite extends SparkFunSuite with Logging {
169170
i += 1
170171
} while (i < sizeOfArrayToSort)
171172
assert(sum === runLengths.length)
173+
*/
172174
}
173175

174176
/** Runs an experiment several times. */

0 commit comments

Comments
 (0)