Github user vanzin commented on a diff in the pull request:
https://github.com/apache/spark/pull/22598#discussion_r222776402
--- 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 --
Agree with Attila that this is not helping much. If you can have better
tests on the kafka connector side, and exercise the
`KafkaDelegationTokenProvider` code from there, it would be better.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]