This is an automated email from the ASF dual-hosted git repository.
peter-toth pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new b5777c4087d0 [SPARK-56885][CORE][TESTS] Make `CompressionCodecSuite`
be independent from the default value of io compression codec
b5777c4087d0 is described below
commit b5777c4087d0bb9e12f939c56cb37d793e80670a
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Sat May 16 09:35:43 2026 +0200
[SPARK-56885][CORE][TESTS] Make `CompressionCodecSuite` be independent from
the default value of io compression codec
### What changes were proposed in this pull request?
This PR makes the `default compression codec` test in
`CompressionCodecSuite` derive the expected codec class from
`IO_COMPRESSION_CODEC.defaultValueString` instead of hard-coding
`classOf[LZ4CompressionCodec]`.
### Why are the changes needed?
To keep the test aligned with the actual default of
`spark.io.compression.codec` so it survives any future default change without
modification.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Pass the CIs.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Opus 4.7
Closes #55909 from dongjoon-hyun/SPARK-56885.
Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Peter Toth <[email protected]>
---
core/src/test/scala/org/apache/spark/io/CompressionCodecSuite.scala | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git
a/core/src/test/scala/org/apache/spark/io/CompressionCodecSuite.scala
b/core/src/test/scala/org/apache/spark/io/CompressionCodecSuite.scala
index d6f0bfd237e4..d153800acf3f 100644
--- a/core/src/test/scala/org/apache/spark/io/CompressionCodecSuite.scala
+++ b/core/src/test/scala/org/apache/spark/io/CompressionCodecSuite.scala
@@ -21,7 +21,7 @@ import java.io.{ByteArrayInputStream, ByteArrayOutputStream}
import java.util.Locale
import org.apache.spark.{SparkConf, SparkFunSuite,
SparkIllegalArgumentException}
-import org.apache.spark.internal.config.IO_COMPRESSION_ZSTD_BUFFERPOOL_ENABLED
+import org.apache.spark.internal.config.{IO_COMPRESSION_CODEC,
IO_COMPRESSION_ZSTD_BUFFERPOOL_ENABLED}
import org.apache.spark.util.Utils
class CompressionCodecSuite extends SparkFunSuite {
@@ -47,7 +47,9 @@ class CompressionCodecSuite extends SparkFunSuite {
test("default compression codec") {
val codec = CompressionCodec.createCodec(conf)
- assert(codec.getClass === classOf[LZ4CompressionCodec])
+ assert(codec.getClass.getName ===
+ CompressionCodec.shortCompressionCodecNames(
+ IO_COMPRESSION_CODEC.defaultValueString))
testCodec(codec)
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]