-
Notifications
You must be signed in to change notification settings - Fork 182
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
80% code coverage for StorIO-Common #461
Conversation
YES, I've finally fixed the problem with test coverage of It was race condition which never happens on build machine with more than one Processor Core but on Travis CI and on our Jenkins we have only one core and test execution became different. @nikitin-da PTAL! |
476ac40
to
17ad764
Compare
field.set(null, prevValue); | ||
|
||
// Restoring FINAL modifier (for better tests performance) | ||
modifiersFieldOfTheField.setInt(field, field.getModifiers() & FINAL); |
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.
Why should it be faster withfinal
? As for me it's not uniquely (http://stackoverflow.com/a/4279442)
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.
Hm, I think it will be faster because of JIT.
27 июля 2015 г. 8:59 AM пользователь "Dmitrii Nikitin" <
notifications@github.com> написал:
In
storio-common/src/test/java/com/pushtorefresh/storio/internal/EnvironmentTest.java
#461 (comment):
field.set(null, false); // No Environment will think that RxJava is not in the ClassPath
try {
Environment.throwExceptionIfRxJavaIsNotAvailable("yolo");
fail();
} catch (IllegalStateException expected) {
assertEquals("yolo requires RxJava in classpath," +
" please add it as compile dependency to the application",
expected.getMessage()
);
} finally {
// Return previous value of the field
field.set(null, prevValue);
// Restoring FINAL modifier (for better tests performance)
modifiersFieldOfTheField.setInt(field, field.getModifiers() & FINAL);
Why should it be faster withfinal? As for me it's not uniquely (
http://stackoverflow.com/a/4279442)—
Reply to this email directly or view it on GitHub
https://github.com/pushtorefresh/storio/pull/461/files#r35507387.
80% code coverage for StorIO-Common
Well done! |
Part of #450.
This PR adds tests for StorIO-Common, now coverage of this module is about 99%.
@nikitin-da PTAL