gobblin icon indicating copy to clipboard operation
gobblin copied to clipboard

UnitTest for KafkaSource

Open ZihanLi58 opened this issue 5 years ago • 4 comments

Dear Gobblin maintainers,

Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!

JIRA

  • [x] My PR addresses the following Gobblin JIRA issues and references them in the PR title. For example, "[GOBBLIN-XXX] My Gobblin PR"
    • https://issues.apache.org/jira/browse/GOBBLIN-715

Description

  • [x] Here are some details about my PR, including screenshots (if applicable): We have an abstract class KafkaSource which contains a function called getWorkunits that be used in many use cases. But we have no unit test for this function. We should implement a simple subclass of KafkaSource and have a unit test to test the logic inside the function to make sure it returns the desired WorkUnits.

Tests

  • [x] My PR adds the following unit tests OR does not need testing for this extremely good reason:

Commits

  • [x] My commits all reference JIRA issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"

ZihanLi58 avatar Mar 27 '19 21:03 ZihanLi58

@ibuenros @htran1 @autumnust

ZihanLi58 avatar Mar 27 '19 22:03 ZihanLi58

@htran1 can you merge?

ibuenros avatar Apr 01 '19 18:04 ibuenros

+1

ibuenros avatar Apr 23 '19 16:04 ibuenros

Codecov Report

Merging #2582 (c94e99b) into master (f4a9966) will increase coverage by 0.04%. The diff coverage is n/a.

@@             Coverage Diff              @@
##             master    #2582      +/-   ##
============================================
+ Coverage     47.14%   47.19%   +0.04%     
- Complexity    10897    10900       +3     
============================================
  Files          2148     2148              
  Lines         85045    85045              
  Branches       9439     9439              
============================================
+ Hits          40093    40135      +42     
+ Misses        41309    41269      -40     
+ Partials       3643     3641       -2     

see 8 files with indirect coverage changes

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov-commenter avatar Sep 05 '23 23:09 codecov-commenter