Arquisoft / InciManager_i2b

InciManager_i2b
MIT License
1 stars 2 forks source link

Services coverage #34

Closed ulitol97 closed 6 years ago

ulitol97 commented 6 years ago

Better code coverage for the services, as part of #29

carmee-en commented 6 years ago

(Speculation here) About InsertSampleDataServiceTest, could it be failing because the finalize method (which removes the incidents and agents created) in InsertSampleDataService has already been executed? Either that or the service never initialised.

The code seems okay to me, so I honestly don't understand.

ulitol97 commented 6 years ago

Thanks for the advice. I think the error must be in that direction. Anyway, it was late night when I was trying to do that, so I tried some quick fixes (my bad) and decided to sleep a little. I'll think quietly about it today and should be done by the end of day ^^

codecov[bot] commented 6 years ago

Codecov Report

Merging #34 into master will increase coverage by 7.05%. The diff coverage is 25%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #34      +/-   ##
============================================
+ Coverage      68.7%   75.75%   +7.05%     
- Complexity      110      122      +12     
============================================
  Files            22       22              
  Lines           393      396       +3     
  Branches         44       44              
============================================
+ Hits            270      300      +30     
+ Misses          106       77      -29     
- Partials         17       19       +2
Impacted Files Coverage Δ Complexity Δ
...rc/main/java/com/uniovi/services/KafkaService.java 11.11% <ø> (ø) 2 <0> (ø) :arrow_down:
...a/com/uniovi/services/InsertSampleDataService.java 82.75% <0%> (+5.83%) 3 <0> (+1) :arrow_up:
...rc/main/java/com/uniovi/services/TopicService.java 93.33% <100%> (+13.33%) 7 <0> (+1) :arrow_up:
src/main/java/com/uniovi/entities/Incident.java 65% <0%> (+11.66%) 21% <0%> (+4%) :arrow_up:
...ain/java/com/uniovi/services/IncidentsService.java 100% <0%> (+46.66%) 9% <0%> (+4%) :arrow_up:
...c/main/java/com/uniovi/services/AgentsService.java 83.33% <0%> (+55.55%) 6% <0%> (+2%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update bc2f89c...e7a475d. Read the comment docs.

ulitol97 commented 6 years ago

I see the codecov/patch check complaining about what seems to be the InsertSampleDataService , despite this, which I don't understand at all, the service is used for testing and the project's codecov is increasing as expected, so I'd personally merge this.

carmee-en commented 6 years ago

From what I understand 'codecov/patch 25% of diff hit (target 68.7%)' means that of the total lines you modified (i guess not including test files), only 25% are covered. I think that is mostly because the postConstruct in InsertSampleDataService, where some lines where added, is not tested.

Don't worry about it though, the codecov increased and that is the most important.