Commit eb818a26 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

some annotators were crashing on old installations

parent 3e3adf2f
Pipeline #17290 failed with stage
in 18 minutes and 45 seconds
minerva (14.0.5) stable; urgency=medium
* Bug fix: copy-paste of genetic-variant data overlay into Add overlay
content dialog could crash upload (#1040)
* Bug fix: some annotators (like Cazy) were crashing on old installations
(#1029)
-- Piotr Gawron <piotr.gawron@uni.lu> Mon, 02 Dec 2019 16:00:00 +0200
minerva (14.0.4) stable; urgency=high
* Bug fix: some SBGN files uploaded to minerva could not be exported to SBML
......
package lcsb.mapviewer.annotation.services.annotators;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.*;
import java.io.IOException;
import java.util.*;
......@@ -34,7 +33,7 @@ import lcsb.mapviewer.persist.DbUtils;
public class ElementAnnotatorImplementationsTest extends AnnotationTestFunctions {
static ApplicationContext applicationContext;
@SuppressWarnings("unused")
private static Logger logger = LogManager.getLogger(ElementAnnotatorImplementationsTest.class);
private static Logger logger = LogManager.getLogger();
@Parameter
public String testName;
@Parameter(1)
......@@ -177,4 +176,17 @@ public class ElementAnnotatorImplementationsTest extends AnnotationTestFunctions
}
}
@Test
@Transactional
public void testCacheTypeExists() throws Exception {
ElementAnnotator annotator = applicationContext.getBean(elementAnnotator);
DbUtils dbUtils = applicationContext.getBean(DbUtils.class);
dbUtils.createSessionForCurrentThread();
try {
assertNotNull(annotator.getCacheType());
} finally {
dbUtils.closeSessionForCurrentThread();
}
}
}
INSERT INTO cache_type_table (validity, class_name)
select 365, 'lcsb.mapviewer.annotation.services.annotators.TairAnnotator'
where not exists (select 1 from cache_type_table where class_name = 'lcsb.mapviewer.annotation.services.annotators.TairAnnotator');
INSERT INTO cache_type_table (validity, class_name)
select 365, 'lcsb.mapviewer.annotation.services.annotators.CazyAnnotator'
where not exists (select 1 from cache_type_table where class_name = 'lcsb.mapviewer.annotation.services.annotators.CazyAnnotator');
INSERT INTO cache_type_table (validity, class_name)
select 365, 'lcsb.mapviewer.annotation.services.annotators.BrendaAnnotator'
where not exists (select 1 from cache_type_table where class_name = 'lcsb.mapviewer.annotation.services.annotators.BrendaAnnotator');
INSERT INTO cache_type_table (validity, class_name)
select 365, 'lcsb.mapviewer.annotation.services.annotators.StitchAnnotator'
where not exists (select 1 from cache_type_table where class_name = 'lcsb.mapviewer.annotation.services.annotators.StitchAnnotator');
INSERT INTO cache_type_table (validity, class_name)
select 365, 'lcsb.mapviewer.annotation.services.annotators.StringAnnotator'
where not exists (select 1 from cache_type_table where class_name = 'lcsb.mapviewer.annotation.services.annotators.StringAnnotator');
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment