Add a wait after sending Gps Signal.

This commit is contained in:
youtaol
2012-08-03 15:22:35 +08:00
parent e94d62f6a9
commit 221155979e
2 changed files with 3 additions and 4 deletions
@@ -278,10 +278,7 @@ public class CreateAndSendTrackTest extends ActivityInstrumentationTestCase2<Tra
EndToEndTestUtils
.getButtonOnScreen(activityMyTracks.getString(R.string.generic_ok), true, true);
// Send Gps to give a distance more than one kilometer or one mile.
EndToEndTestUtils.sendGps(20);
// Wait the GPS signal is obtained by MyTracks.
EndToEndTestUtils.SOLO.wait(EndToEndTestUtils.SHORT_WAIT_TIME);
EndToEndTestUtils.sendGps(20);
assertTrue(EndToEndTestUtils.findMenuItem(activityMyTracks.getString(R.string.menu_markers),
true));
instrumentation.waitForIdleSync();
@@ -186,6 +186,8 @@ public class EndToEndTestUtils {
longitude += DELTA_LONGITUDE;
latitude += DELTA_LADITUDE;
}
// Wait the GPS signal can be obtained by MyTracks.
Thread.sleep(SHORT_WAIT_TIME);
} catch (UnknownHostException e) {
System.exit(-1);
} catch (IOException e) {