forked from upstream-mirrors/OpenTracks
Make a change to make testSplitSetting() runs more stable.
This commit is contained in:
+6
-2
@@ -262,8 +262,9 @@ public class CreateAndSendTrackTest extends ActivityInstrumentationTestCase2<Tra
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests whether the split marker is created as setting.
|
* Tests whether the split marker is created as setting.
|
||||||
|
* @throws InterruptedException
|
||||||
*/
|
*/
|
||||||
public void testSplitSetting() {
|
public void testSplitSetting() throws InterruptedException {
|
||||||
EndToEndTestUtils.startRecording();
|
EndToEndTestUtils.startRecording();
|
||||||
|
|
||||||
EndToEndTestUtils.findMenuItem(activityMyTracks.getString(R.string.menu_split_frequency), true);
|
EndToEndTestUtils.findMenuItem(activityMyTracks.getString(R.string.menu_split_frequency), true);
|
||||||
@@ -278,8 +279,11 @@ public class CreateAndSendTrackTest extends ActivityInstrumentationTestCase2<Tra
|
|||||||
.getButtonOnScreen(activityMyTracks.getString(R.string.generic_ok), true, true);
|
.getButtonOnScreen(activityMyTracks.getString(R.string.generic_ok), true, true);
|
||||||
// Send Gps to give a distance more than one kilometer or one mile.
|
// Send Gps to give a distance more than one kilometer or one mile.
|
||||||
EndToEndTestUtils.sendGps(20);
|
EndToEndTestUtils.sendGps(20);
|
||||||
|
// Wait the GPS signal is obtained by MyTracks.
|
||||||
|
EndToEndTestUtils.SOLO.wait(EndToEndTestUtils.SHORT_WAIT_TIME);
|
||||||
|
|
||||||
EndToEndTestUtils.findMenuItem(activityMyTracks.getString(R.string.menu_markers), true);
|
assertTrue(EndToEndTestUtils.findMenuItem(activityMyTracks.getString(R.string.menu_markers),
|
||||||
|
true));
|
||||||
instrumentation.waitForIdleSync();
|
instrumentation.waitForIdleSync();
|
||||||
if (EndToEndTestUtils.hasGpsSingal) {
|
if (EndToEndTestUtils.hasGpsSingal) {
|
||||||
assertTrue(EndToEndTestUtils.SOLO.getCurrentListViews().get(0).getCount() > 0);
|
assertTrue(EndToEndTestUtils.SOLO.getCurrentListViews().get(0).getCount() > 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user