move job running status from database to memory

This commit is contained in:
ryanzhao
2023-05-04 15:30:09 +10:00
parent 7a14c3f8be
commit d868021f0a
4 changed files with 17 additions and 30 deletions

View File

@@ -74,16 +74,6 @@ public class FastJobStorageTest {
assertEquals(DataSet1.JOB_2, subject.getJobSpec(DataSet1.JOB_2.getId()));
}
@Test
public void updateAllJobsToBePending_writesToDatabase() {
JobDatabase database = noopDatabase();
FastJobStorage subject = new FastJobStorage(database);
subject.updateAllJobsToBePending();
verify(database).updateAllJobsToBePending();
}
@Test
public void updateAllJobsToBePending_allArePending() {
FullSpec fullSpec1 = new FullSpec(new JobSpec("1", AvatarDownloadJob.KEY, null, 1, 1, 1, 1, 1, 1, 1, EMPTY_DATA, true),