-
Notifications
You must be signed in to change notification settings - Fork 202
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
#876 corrected test for PsFacebook #885
Conversation
Job #885 is now in scope, role is |
@paulodamaso no reviewer was assigned here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@krzyk Please take a look at the comment
@@ -52,15 +53,20 @@ | |||
@Test | |||
public final void canLogin() throws Exception { | |||
final String identifier = RandomStringUtils.randomAlphanumeric(10); | |||
final RandomStringGenerator generator = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@krzyk I think that we could replace RandomStringGenerator
and RandomStringUtils
usage with RandomText
from cactoos, WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@paulodamaso But RandomText
configuration is cumbersome, I would need to list all UTF characters there and do filtering, all this is done automatically byt RandomStringGenerator and RandomStringUtils.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@krzyk RandomText
comes with an pre-defined set of characters, so you'd just need to filter the unwanted ones, I think that it'll be enough for our test cases, WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@paulodamaso OK, and are you OK with IntStream for generating the list of characters (because I need characters that are not ASCII)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@krzyk Yes, there is something that should I be worried about?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@paulodamaso No, I was worried that I would need to embed zillions of classes from cactoos (because there is no direct way to generate a List or Iterator with provided seed and function) to get the same thing I can do in 4-5 lines with streams :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@paulodamaso So after reviewing it more, it is impossible to do. RandomText should accept a list of codepoints, but it accepts only Characters. One codepoint can result in mutliple chars (and the order is important here). And here we want to test unicode chars that can be outside of the simple 64k space that can be represented by a single char.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@krzyk Okay, so that's nothing else to do here, thanks!
@krzyk Please just see why your build is failing on travis |
@paulodamaso done |
Codecov Report
@@ Coverage Diff @@
## master #885 +/- ##
============================================
+ Coverage 75.45% 75.48% +0.03%
- Complexity 977 981 +4
============================================
Files 220 220
Lines 4717 4724 +7
Branches 368 369 +1
============================================
+ Hits 3559 3566 +7
Misses 1003 1003
Partials 155 155
Continue to review full report at Codecov.
|
@rultor merge |
@paulodamaso OK, I'll try to merge now. You can check the progress of the merge here |
@paulodamaso Done! FYI, the full log is here (took me 23min) |
Job |
The job #885 is now out of scope |
#876
random()
was generating those and that's why the test was sometimes failing)