-
Notifications
You must be signed in to change notification settings - Fork 48
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
Run liblocation test in CI #338
Conversation
465ff64
to
fee3455
Compare
Codecov Report
@@ Coverage Diff @@
## master #338 +/- ##
============================================
+ Coverage 53.42% 54.99% +1.56%
Complexity 493 493
============================================
Files 106 106
Lines 3266 3266
Branches 219 219
============================================
+ Hits 1745 1796 +51
+ Misses 1435 1384 -51
Partials 86 86 |
f47417b
to
e446058
Compare
...c/androidTest/java/com/mapbox/android/core/location/FusedLocationEngineInstrumentedTest.java
Outdated
Show resolved
Hide resolved
|
||
} | ||
|
||
private static LocationEngineRequest getRequest(long interval, int priority) { |
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.
can we cover intervals, fastest intervals, max wait time with integration tests?
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.
These params are handled by android framework, so IMHO we don't need to test these.
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.
@Chaoba the location engines that we support are not in complete feature parity, hence not all configs are seamlessly handled by framework. a good example is fastest interval: MapboxFusedLocationEngine
doesn't support it: #312. Would be nice if we could create a test to cover all basic supported configs and verify expected behavior for future reference just in case someone decides to implement a new engine. Does that make sense?
.../androidTest/java/com/mapbox/android/core/location/GoogleLocationEngineInstrumentedTest.java
Outdated
Show resolved
Hide resolved
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.
@Chaoba good start, a few of comments below..
e446058
to
2421972
Compare
2421972
to
d48bc5e
Compare
d48bc5e
to
c0cbd42
Compare
liblocation/src/main/java/com/mapbox/android/core/location/GoogleLocationEngineImpl.java
Outdated
Show resolved
Hide resolved
4be77c6
to
7959683
Compare
liblocation/src/main/java/com/mapbox/android/core/location/GoogleLocationEngineImpl.java
Outdated
Show resolved
Hide resolved
liblocation/src/test/java/com/mapbox/android/core/location/GoogleLocationEngineImplTest2.java
Outdated
Show resolved
Hide resolved
liblocation/src/test/java/com/mapbox/android/core/location/GoogleLocationEngineImplTest2.java
Outdated
Show resolved
Hide resolved
@andrlee All fixed now. |
|
||
@RunWith(AndroidJUnit4.class) | ||
public class LocationEngineInstrumentedTest { | ||
private static final long INTERVAL = 1000L; | ||
private static final long INTERVAL = 100L; |
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 100ms interval? is it typo?
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.
a minor note, our branch naming convention: dev's initials followed by feature description, i.e. something like kl-liblocation-tests
would work. ;)
Currently
liblocation
android instrumentation tests are not running as part of pre-commit tests, this PR will add them to CI and run on firebase.What's more, rewrite test cases with mock.