Skip to content
Snippets Groups Projects
Commit 541208a8 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

adding miriam creates a refresh job

parent 861ea5f9
No related branches found
No related tags found
1 merge request!1832Merge 18.0.8
Pipeline #99292 passed
......@@ -71,7 +71,7 @@ public class MinervaJobServiceTest extends TestUtils {
}
@Test
public void testRefreshTask() throws Exception {
public void testRefreshTask() {
for (int i = 0; i < 5; i++) {
CacheQuery entry = cache.getByQuery(query + "?" + i, type);
if (entry != null) {
......@@ -187,15 +187,12 @@ public class MinervaJobServiceTest extends TestUtils {
}
@Test
public void testAddDuplicates() throws Exception {
public void testAddDuplicates() {
minervaJobService.disableQueue();
try {
MiriamData md = new MiriamData(MiriamType.PUBMED, "12345");
miriamService.add(md);
long originalCount = minervaJobService.getCount(MinervaJobStatus.PENDING);
RefreshMiriamInfoMinervaJob params = new RefreshMiriamInfoMinervaJob(md.getId());
RefreshMiriamInfoMinervaJob params = new RefreshMiriamInfoMinervaJob(-1);
MinervaJob job = new MinervaJob(MinervaJobType.REFRESH_MIRIAM_INFO, MinervaJobPriority.MEDIUM, params);
assertTrue(minervaJobService.addJob(job));
assertEquals(originalCount + 1, minervaJobService.getCount(MinervaJobStatus.PENDING));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment