Merge "Fix JobStoreTest after adding defensive copy to NetworkRequest.Builder" am: 41cd5e5f0d am: 9688c4c3bb
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2103684 Change-Id: Ic969df012090443740db5ec8bfcb46cbe8b61e97 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -493,15 +493,16 @@ public class JobStoreTest {
|
||||
* Helper function to kick a {@link JobInfo} through a persistence cycle and
|
||||
* assert that it's unchanged.
|
||||
*/
|
||||
private void assertPersistedEquals(JobInfo first) throws Exception {
|
||||
private void assertPersistedEquals(JobInfo firstInfo) throws Exception {
|
||||
mTaskStoreUnderTest.clear();
|
||||
mTaskStoreUnderTest.add(JobStatus.createFromJobInfo(first, SOME_UID, null, -1, null));
|
||||
JobStatus first = JobStatus.createFromJobInfo(firstInfo, SOME_UID, null, -1, null);
|
||||
mTaskStoreUnderTest.add(first);
|
||||
waitForPendingIo();
|
||||
|
||||
final JobSet jobStatusSet = new JobSet();
|
||||
mTaskStoreUnderTest.readJobMapFromDisk(jobStatusSet, true);
|
||||
final JobStatus second = jobStatusSet.getAllJobs().iterator().next();
|
||||
assertTasksEqual(first, second.getJob());
|
||||
assertTasksEqual(first.getJob(), second.getJob());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user