Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
308bc63f
Commit
308bc63f
authored
10 years ago
by
felmer
Browse files
Options
Downloads
Patches
Plain Diff
SSDM-579: Bug fixed: Databases for data sets in trash can have been deleted.
SVN: 32061
parent
4fd0ae4f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/plugins/BlastDatabaseCreationMaintenanceTaskTest.java
+6
-14
6 additions, 14 deletions
...ver/plugins/BlastDatabaseCreationMaintenanceTaskTest.java
with
6 additions
and
14 deletions
datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/plugins/BlastDatabaseCreationMaintenanceTaskTest.java
+
6
−
14
View file @
308bc63f
...
...
@@ -45,6 +45,7 @@ import ch.systemsx.cisd.openbis.dss.generic.shared.IHierarchicalContentProvider;
import
ch.systemsx.cisd.openbis.dss.generic.shared.utils.BlastUtils
;
import
ch.systemsx.cisd.openbis.generic.shared.basic.dto.AbstractExternalData
;
import
ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataSetArchivingStatus
;
import
ch.systemsx.cisd.openbis.generic.shared.basic.dto.DeletedDataSet
;
import
ch.systemsx.cisd.openbis.generic.shared.basic.dto.TrackingDataSetCriteria
;
import
ch.systemsx.cisd.openbis.generic.shared.basic.dto.builders.ContainerDataSetBuilder
;
import
ch.systemsx.cisd.openbis.generic.shared.basic.dto.builders.DataSetBuilder
;
...
...
@@ -393,7 +394,7 @@ public class BlastDatabaseCreationMaintenanceTaskTest extends AbstractFileSystem
FileUtilities
.
writeToFile
(
new
File
(
dataSetFolder1
,
"fasta.txt"
),
">1\nGATTACA\n"
);
prepareContentProvider
(
ds1
,
dataSetFolder1
);
maintenanceTask
.
execute
();
prepareListsDataSets
(
"-"
+
ds1
.
getCode
());
prepareListsD
eletedD
ataSets
(
ds1
.
getCode
());
AbstractExternalData
ds2
=
new
DataSetBuilder
(
12L
).
type
(
"BLAST"
).
code
(
"DS2"
)
.
status
(
DataSetArchivingStatus
.
AVAILABLE
).
getDataSet
();
lastSeenIdMatcher
=
prepareListNewerDataSet
(
ds2
);
...
...
@@ -406,7 +407,6 @@ public class BlastDatabaseCreationMaintenanceTaskTest extends AbstractFileSystem
+
INFO_PREFIX
+
"Temp folder '"
+
tempFolder
+
"' created.\n"
+
INFO_PREFIX
+
"Scan 1 data sets for creating BLAST databases.\n"
+
INFO_PREFIX
+
"BLAST database DS1-nucl successfully deleted.\n"
+
INFO_PREFIX
+
"BLAST database DS1-prot successfully deleted.\n"
+
INFO_PREFIX
+
"Scan 1 data sets for creating BLAST databases."
,
logRecorder
.
getLogContent
());
assertEquals
(
"/usr/bin/blast/makeblastdb -version\n"
+
"/usr/bin/blast/makeblastdb -in "
+
tempFolder
.
getAbsolutePath
()
+
"/DS1-nucl.fa"
...
...
@@ -434,25 +434,17 @@ public class BlastDatabaseCreationMaintenanceTaskTest extends AbstractFileSystem
});
}
private
void
prepareListsDataSets
(
final
String
...
dataSetCodes
)
private
void
prepareListsD
eletedD
ataSets
(
final
String
...
dataSetCodes
)
{
context
.
checking
(
new
Expectations
()
{
{
List
<
AbstractExternalData
>
result
=
new
ArrayList
<
AbstractExternalData
>();
List
<
String
>
codes
=
new
ArrayList
<
String
>();
List
<
DeletedDataSet
>
result
=
new
ArrayList
<
DeletedDataSet
>();
for
(
String
dataSetCode
:
dataSetCodes
)
{
if
(
dataSetCode
.
startsWith
(
"-"
)
==
false
)
{
result
.
add
(
new
DataSetBuilder
().
code
(
dataSetCode
).
getDataSet
());
codes
.
add
(
dataSetCode
);
}
else
{
codes
.
add
(
dataSetCode
.
substring
(
1
));
}
result
.
add
(
new
DeletedDataSet
(
0
,
dataSetCode
));
}
one
(
service
).
listD
ataSetsByCode
(
codes
);
one
(
service
).
listD
eletedDataSets
(
null
,
null
);
will
(
returnValue
(
result
));
}
});
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment