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

    https://github.com/apache/spark/pull/11250#discussion_r53565173
  
    --- Diff: 
extras/kinesis-asl/src/test/scala/org/apache/spark/streaming/kinesis/KinesisStreamSuite.scala
 ---
    @@ -268,21 +270,23 @@ abstract class KinesisStreamTests(aggregateTestData: 
Boolean) extends KinesisFun
     
         // Verify that the recomputed RDDs are KinesisBackedBlockRDDs with the 
same sequence ranges
         // and return the same data
    -    val times = collectedData.keySet
    -    times.foreach { time =>
    -      val (arrayOfSeqNumRanges, data) = collectedData(time)
    -      val rdd = 
recoveredKinesisStream.getOrCompute(time).get.asInstanceOf[RDD[Array[Byte]]]
    -      rdd shouldBe a [KinesisBackedBlockRDD[_]]
    -
    -      // Verify the recovered sequence ranges
    -      val kRdd = rdd.asInstanceOf[KinesisBackedBlockRDD[Array[Byte]]]
    -      assert(kRdd.arrayOfseqNumberRanges.size === arrayOfSeqNumRanges.size)
    -      arrayOfSeqNumRanges.zip(kRdd.arrayOfseqNumberRanges).foreach { case 
(expected, found) =>
    -        assert(expected.ranges.toSeq === found.ranges.toSeq)
    +    collectedData.synchronized {
    +      val times = collectedData.keySet
    +      times.foreach { time =>
    --- End diff --
    
    Also not necessary that you change this, but it looks like these 3 lines 
around here could have been
    
    ```
    collectedData.foreach { case (time, (arrayOfSeqNumRanges, data)) =>
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to