Permalink
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...
1 parent 159534b commit d052b31665e9b65874edc491ff6ffd4939afe34d Omari Stephens committed Dec 4, 2009
Showing with 1 addition and 0 deletions.
  1. +1 −0 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);

0 comments on commit d052b31

Please sign in to comment.