Github user attilapiros commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22598#discussion_r221588791
  
    --- 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 have seen this is follows the `Obtain tokens For HBase` but the using 
`creds.getAllTokens.size should be (0)` for both the positive and negative case 
(if I understand correctly) is quite strange. Can you somehow mock a relevant 
method (i.e. in TokenUtil) to get back something? 


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to