Set mServiceCreated to false when onDestroy().
If tests call shutdownService() themselves, we should not call onDestroy() again from tearDown(). Set mServiceCreated to false when we call onDestroy to prevent this. Change-Id: I618cb770cb43072273abdd2fdffd3390911203a1
This commit is contained in:
@@ -263,6 +263,7 @@ public abstract class ServiceTestCase<T extends Service> extends AndroidTestCase
|
||||
}
|
||||
if (mServiceCreated) {
|
||||
mService.onDestroy();
|
||||
mServiceCreated = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user