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

    https://github.com/apache/spark/pull/6707#discussion_r32359354
  
    --- Diff: 
streaming/src/test/scala/org/apache/spark/streaming/ReceivedBlockHandlerSuite.scala
 ---
    @@ -62,6 +61,19 @@ class ReceivedBlockHandlerSuite
       var blockManagerMaster: BlockManagerMaster = null
       var blockManager: BlockManager = null
       var tempDirectory: File = null
    +  var storageLevel = StorageLevel.MEMORY_ONLY_SER
    --- End diff --
    
    Aah I see what you have done. It was val but you made it a var so that it 
can be modified to set a different storage level which 
`withXYZBasedBlockHandler` can use. This is non-intuitive and changes global 
state which can affect other tests. Not a good idea. Rather make the 
storageLevel an *optional* parameter in `withXYZBasedBlockHandler` and the 
default value being the earlier global value `StorageLevel.MEMORY_ONLY_SER`. 
Then we dont even need to have the global variable `storageLeval` at all. 


---
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