Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#838 close body in RsPrint #879

Merged
merged 3 commits into from
Dec 6, 2018
Merged

#838 close body in RsPrint #879

merged 3 commits into from
Dec 6, 2018

Conversation

olenagerasimova
Copy link
Contributor

For #838 I've made RsPrint.printBody() close body and added corresponding test.

@0crat 0crat added the scope label Dec 1, 2018
@0crat
Copy link
Collaborator

0crat commented Dec 1, 2018

Job #879 is now in scope, role is REV

@codecov-io
Copy link

codecov-io commented Dec 1, 2018

Codecov Report

Merging #879 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #879      +/-   ##
============================================
- Coverage     75.45%   75.45%   -0.01%     
  Complexity      977      977              
============================================
  Files           220      220              
  Lines          4718     4717       -1     
  Branches        368      368              
============================================
- Hits           3560     3559       -1     
  Misses         1003     1003              
  Partials        155      155
Impacted Files Coverage Δ Complexity Δ
src/main/java/org/takes/rs/RsPrint.java 79.59% <100%> (-1.66%) 13 <0> (ø)
...a/org/takes/facets/auth/social/XeFacebookLink.java 90% <0%> (ø) 3% <0%> (ø) ⬇️
src/main/java/org/takes/rq/RqHeaders.java 83.92% <0%> (ø) 0% <0%> (ø) ⬇️
src/main/java/org/takes/rq/RqGreedy.java 87.5% <0%> (ø) 2% <0%> (ø) ⬇️
...ain/java/org/takes/facets/auth/codecs/CcPlain.java 87.5% <0%> (ø) 6% <0%> (ø) ⬇️
...c/main/java/org/takes/facets/fallback/FbChain.java 92.85% <0%> (ø) 2% <0%> (ø) ⬇️
...rc/main/java/org/takes/facets/auth/XeIdentity.java 84.61% <0%> (ø) 1% <0%> (ø) ⬇️
src/main/java/org/takes/facets/auth/Identity.java 75% <0%> (ø) 1% <0%> (ø) ⬇️
src/main/java/org/takes/tk/TkWithCookie.java 0% <0%> (ø) 0% <0%> (ø) ⬇️
... and 211 more

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 e6fc4cf...9ef766a. Read the comment docs.

@0crat
Copy link
Collaborator

0crat commented Dec 1, 2018

This pull request #879 is assigned to @g4s8/z, here is why; the budget is 15 minutes, see §4; please, read §27 and when you decide to accept the changes, inform @paulodamaso/z (the architect) right in this ticket; if you decide that this PR should not be accepted ever, also inform the architect; this blog post will help you understand what is expected from a code reviewer; there will be a monetary reward for this job

Copy link
Contributor

@g4s8 g4s8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@olenagerasimova please see few minor issues

new RsPrint(new RsText(input))
.printBody(output);
} catch (final IOException ex) {
if (!ex.equals(exception)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@olenagerasimova it's better to use assertions in tests instead of exception throwing:

MatcherAssert.assertThat("wrong exception", ex, new IsEquals(exception));

* Have input been closed?
* @return True, if input wes closed, false - otherwise
*/
public boolean haveClosed() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@olenagerasimova it would be more conventional to call method in present simple: haveClosed -> isClosed, because it describes current object state.

throw ex;
}
}
MatcherAssert.assertThat(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@olenagerasimova it's a good practice to add description text to assertThat if we have more than one assertions in test.

@olenagerasimova
Copy link
Contributor Author

@g4s8 thanks for comments, fixed

@g4s8
Copy link
Contributor

g4s8 commented Dec 6, 2018

@rultor merge

@rultor
Copy link
Collaborator

rultor commented Dec 6, 2018

@rultor merge

@g4s8 Thanks for your request. @yegor256 Please confirm this.

Copy link
Contributor

@paulodamaso paulodamaso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@olenagerasimova Just one comment, please take a look

new RsPrint(new RsText(input))
.printBody(output);
} catch (final IOException ex) {
MatcherAssert.assertThat(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@olenagerasimova What are we asserting with this? We should have just one assertion per test, so please remove it and create another test method for it if this assertion is relevant.

@olenagerasimova
Copy link
Contributor Author

@paulodamaso updated

@paulodamaso
Copy link
Contributor

@olenagerasimova Right, thanks. Just for clarification, that exception is not relevant to that test case, right?

@olenagerasimova
Copy link
Contributor Author

@paulodamaso I don't think it's relevant, this particular test method is not about exception, it's about flush.

@paulodamaso
Copy link
Contributor

@olenagerasimova Great, thanks

@paulodamaso
Copy link
Contributor

@rultor merge

@rultor
Copy link
Collaborator

rultor commented Dec 6, 2018

@rultor merge

@paulodamaso OK, I'll try to merge now. You can check the progress of the merge here

@rultor rultor merged commit 9ef766a into yegor256:master Dec 6, 2018
@rultor
Copy link
Collaborator

rultor commented Dec 6, 2018

@rultor merge

@paulodamaso Done! FYI, the full log is here (took me 23min)

@0crat
Copy link
Collaborator

0crat commented Dec 6, 2018

@ypshenychka/z please review this job completed by @g4s8/z, as in §30; the job will be fully closed and all payments will be made when the quality review is completed

@0crat 0crat removed the scope label Dec 6, 2018
@0crat
Copy link
Collaborator

0crat commented Dec 6, 2018

The job #879 is now out of scope

@0crat
Copy link
Collaborator

0crat commented Dec 6, 2018

Payment to ARC for a closed pull request, as in §28: +10 point(s) just awarded to @paulodamaso/z

@ypshenychka
Copy link

@0crat quality good

@0crat
Copy link
Collaborator

0crat commented Dec 6, 2018

Order was finished, quality is "good": +20 point(s) just awarded to @g4s8/z

@0crat
Copy link
Collaborator

0crat commented Dec 6, 2018

Quality review completed: +8 point(s) just awarded to @ypshenychka/z

@olenagerasimova olenagerasimova deleted the 838 branch December 11, 2018 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants