use of org.opencastproject.transcription.ibmwatson.persistence.TranscriptionJobControl in project opencast by opencast.
the class TranscriptionDatabaseTest method testStoreJobControl.
@Test
public void testStoreJobControl() throws Exception {
long dt1 = System.currentTimeMillis();
database.storeJobControl(MP_ID, TRACK_ID, JOB_ID, STATUS, TRACK_DURATION);
long dt2 = System.currentTimeMillis();
TranscriptionJobControl j = database.findByJob(JOB_ID);
Assert.assertNotNull(j);
Assert.assertEquals(MP_ID, j.getMediaPackageId());
Assert.assertEquals(TRACK_ID, j.getTrackId());
Assert.assertEquals(STATUS, j.getStatus());
Assert.assertEquals(TRACK_DURATION, j.getTrackDuration());
long created = j.getDateCreated().getTime();
Assert.assertTrue(dt1 <= created && created <= dt2);
}
Aggregations