Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
minerva
core
Commits
eb818a26
Commit
eb818a26
authored
Dec 02, 2019
by
Piotr Gawron
Browse files
some annotators were crashing on old installations
parent
3e3adf2f
Pipeline
#17290
failed with stage
in 18 minutes and 45 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
eb818a26
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
...
...
annotation/src/test/java/lcsb/mapviewer/annotation/services/annotators/ElementAnnotatorImplementationsTest.java
View file @
eb818a26
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
();
}
}
}
persist/src/main/resources/db/migration/14.0.5/V14.0.5.20191202__annotators_miss_cache_type_entries.sql
0 → 100644
View file @
eb818a26
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'
);
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment