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

Run liblocation test in CI #338

Merged
merged 8 commits into from
Feb 20, 2019
Merged

Run liblocation test in CI #338

merged 8 commits into from
Feb 20, 2019

Conversation

Chaoba
Copy link
Contributor

@Chaoba Chaoba commented Feb 12, 2019

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.

@Chaoba Chaoba self-assigned this Feb 12, 2019
@Chaoba Chaoba force-pushed the liblocation_test branch 3 times, most recently from 465ff64 to fee3455 Compare February 13, 2019 06:59
@codecov
Copy link

codecov bot commented Feb 13, 2019

Codecov Report

Merging #338 into master will increase coverage by 1.56%.
The diff coverage is n/a.

@@             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

@Chaoba Chaoba force-pushed the liblocation_test branch 4 times, most recently from f47417b to e446058 Compare February 13, 2019 08:49

}

private static LocationEngineRequest getRequest(long interval, int priority) {
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

@andrlee andrlee Feb 15, 2019

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?

Copy link
Contributor

@andrlee andrlee left a 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..

@Chaoba
Copy link
Contributor Author

Chaoba commented Feb 20, 2019

@andrlee All fixed now.


@RunWith(AndroidJUnit4.class)
public class LocationEngineInstrumentedTest {
private static final long INTERVAL = 1000L;
private static final long INTERVAL = 100L;
Copy link
Contributor

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?

Copy link
Contributor

@andrlee andrlee left a 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. ;)

@andrlee andrlee merged commit 036d95c into master Feb 20, 2019
@Chaoba Chaoba deleted the liblocation_test branch February 21, 2019 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants