Github user hmcl commented on the issue:

    https://github.com/apache/storm/pull/2465
  
    These two changes address your comment: "_test that when you call 
findNextCommitOffset, it returns the metadata you put in)_"
    
    
https://github.com/hmcl/storm-apache/blob/baaf1fe6ab725ec50ecb09238f8957bc22a4e290/external/storm-kafka-client/src/test/java/org/apache/storm/kafka/spout/internal/OffsetManagerTest.java#L67
    
    
https://github.com/hmcl/storm-apache/blob/baaf1fe6ab725ec50ecb09238f8957bc22a4e290/external/storm-kafka-client/src/test/java/org/apache/storm/kafka/spout/internal/OffsetManagerTest.java#L82
    
    As for the other tests, I started working on adding tests for scenarios 
around EARLIEST/LATEST and topology id. However, after working on it for 
awhile, it didn't feel natural that to test such a simple thing I had to mock 
so many objects (including KafkaSpoutConfig) and run the whole spout code. Then 
I decided that I would evaluate if the tests, code, or both should be 
considered for refactoring to make it easier to test. I need to dig into this 
further, but it seems to me that system tests are coupled with unit tests, and 
that makes it hard to write pure unit tests.
    
    Let's merge https://github.com/apache/storm/pull/2464 and I will put my 
patch on top of it.



---

Reply via email to