Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix intermittent race condition in SyncCalendarTests

Fixes this problem, which (presumably) happens when the test starts before
the calendar has been synced:

junit.framework.AssertionFailedError: Daily recurring event should have been deleted. expected:< 1 > but was:< 319 >
at com.android.providers.calendar.SyncCalendarTest.testCreateAndDeleteNewRecurringEvent(SyncCalendarTest.java:54)
[...]
  • Loading branch information...
commit d052b31665e9b65874edc491ff6ffd4939afe34d 1 parent 159534b
Omari Stephens authored
View
1  tests/src/com/android/providers/calendar/SyncCalendarTest.java
@@ -45,6 +45,7 @@ public void testCreateNewEvent() throws Exception {
}
public void testCreateAndDeleteNewRecurringEvent() throws Exception {
+ syncCalendar();
int countBeforeNewEvent = getEventsCount();
Uri insertUri = insertEvent(dailyRecurringEvent);
Please sign in to comment.
Something went wrong with that request. Please try again.