Github user gaborgsomogyi commented on a diff in the pull request: https://github.com/apache/spark/pull/22598#discussion_r221608453 --- Diff: core/src/test/scala/org/apache/spark/deploy/security/HadoopDelegationTokenManagerSuite.scala --- @@ -111,6 +113,17 @@ class HadoopDelegationTokenManagerSuite extends SparkFunSuite with Matchers { creds.getAllTokens.size should be (0) } + test("Obtain tokens For Kafka") { + val hadoopConf = new Configuration() + sparkConf.set(KAFKA_DELEGATION_TOKEN_ENABLED, true) + + val kafkaTokenProvider = new KafkaDelegationTokenProvider() + val creds = new Credentials() + kafkaTokenProvider.obtainDelegationTokens(hadoopConf, sparkConf, creds) + + creds.getAllTokens.size should be (0) --- End diff -- I was thinking about this and don't see clean option to do it: * Adding kafka dependency to `HadoopDelegationTokenManagerSuite` is bad idea. * `KafkaMicroBatchSourceSuite` can't reach neither `HadoopDelegationTokenManager` nor `KafkaDelegationTokenProvider`. * KDC is not available in general.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org