mridulm commented on code in PR #43387:
URL: https://github.com/apache/spark/pull/43387#discussion_r1368097008
##########
core/src/test/scala/org/apache/spark/network/netty/NettyBlockTransferSecuritySuite.scala:
##########
@@ -38,11 +38,20 @@ import org.apache.spark.internal.config.Network
import org.apache.spark.network.{BlockDataManager, BlockTransferService}
import org.apache.spark.network.buffer.{ManagedBuffer, NioManagedBuffer}
import org.apache.spark.network.shuffle.BlockFetchingListener
+import org.apache.spark.network.ssl.SslSampleConfigs
import org.apache.spark.serializer.{JavaSerializer, SerializerManager}
import org.apache.spark.storage.{BlockId, ShuffleBlockId}
import org.apache.spark.util.ThreadUtils
class NettyBlockTransferSecuritySuite extends SparkFunSuite with MockitoSugar
with Matchers {
Review Comment:
The tests are just duplicating what already exists.
Why not simply parameterize it ? This has been done in other suites already
(See more below)
For exmaple:
```
class NettyBlockTransferSecuritySuite extends SparkFunSuite ... {
protected def createSparkConf(): SparkConf = new SparkConf()
test("security default off") {
val conf = createSparkConf()
...
}
...
}
class SSLNettyBlockTransferSecuritySuite extends
NettyBlockTransferSecuritySuite(" for ssl") {
protected def createSparkConf(): SparkConf = <what is in sparkConfWithSsl>
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]