From 0f2eec624efd96cd44c4c727231a2dcc825b2b01 Mon Sep 17 00:00:00 2001 From: nkumar2 Date: Wed, 24 Jan 2024 12:28:27 +0000 Subject: [PATCH 1/2] updating scheduled time for testing --- .../uk/ac/ebi/eva/contigalias/scheduler/ChecksumSetter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/uk/ac/ebi/eva/contigalias/scheduler/ChecksumSetter.java b/src/main/java/uk/ac/ebi/eva/contigalias/scheduler/ChecksumSetter.java index c1063c50..3cda4420 100644 --- a/src/main/java/uk/ac/ebi/eva/contigalias/scheduler/ChecksumSetter.java +++ b/src/main/java/uk/ac/ebi/eva/contigalias/scheduler/ChecksumSetter.java @@ -36,7 +36,7 @@ public ChecksumSetter(ChromosomeService chromosomeService, Md5ChecksumRetriever this.md5ChecksumRetriever = md5ChecksumRetriever; } - @Scheduled(cron = "0 0 0 ? * TUE") + @Scheduled(cron = "0 0 1 ? * THU") public void updateMd5CheckSumForAllAssemblies() { scheduledToRunMD5ChecksumUpdateTasks = new HashSet<>(); List assemblyList = chromosomeService.getAssembliesWhereChromosomeMd5ChecksumIsNull(); From da6dfc279026c4286f8b17bb11c471ceee253a5d Mon Sep 17 00:00:00 2001 From: nkumar2 Date: Wed, 24 Jan 2024 13:11:11 +0000 Subject: [PATCH 2/2] deleting all data in db before and after test --- .../service/ChromosomeServiceIntegrationTest.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/test/java/uk/ac/ebi/eva/contigalias/service/ChromosomeServiceIntegrationTest.java b/src/test/java/uk/ac/ebi/eva/contigalias/service/ChromosomeServiceIntegrationTest.java index e73cda35..9bdd68c3 100644 --- a/src/test/java/uk/ac/ebi/eva/contigalias/service/ChromosomeServiceIntegrationTest.java +++ b/src/test/java/uk/ac/ebi/eva/contigalias/service/ChromosomeServiceIntegrationTest.java @@ -29,6 +29,7 @@ import uk.ac.ebi.eva.contigalias.entities.ChromosomeEntity; import uk.ac.ebi.eva.contigalias.entitygenerator.AssemblyGenerator; import uk.ac.ebi.eva.contigalias.entitygenerator.ChromosomeGenerator; +import uk.ac.ebi.eva.contigalias.repo.ChromosomeRepository; import java.util.Collections; import java.util.List; @@ -47,14 +48,18 @@ public class ChromosomeServiceIntegrationTest { @Autowired private ChromosomeService service; + @Autowired + private ChromosomeRepository chromosomeRepository; + @BeforeEach void setup() { + chromosomeRepository.deleteAll(); service.insertChromosome(entity); } @AfterEach void tearDown() { - service.deleteChromosome(entity); + chromosomeRepository.deleteAll(); } @Test