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
a6cb47bd
Commit
a6cb47bd
authored
13 years ago
by
cramakri
Browse files
Options
Downloads
Patches
Plain Diff
LMS-2738 Refactored test code into superclass.
SVN: 24171
parent
32077192
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
screening/sourceTest/java/ch/systemsx/cisd/openbis/screening/systemtests/AggregatedFeatureVectorsTest.java
+1
-33
1 addition, 33 deletions
...s/screening/systemtests/AggregatedFeatureVectorsTest.java
with
1 addition
and
33 deletions
screening/sourceTest/java/ch/systemsx/cisd/openbis/screening/systemtests/AggregatedFeatureVectorsTest.java
+
1
−
33
View file @
a6cb47bd
...
...
@@ -21,12 +21,10 @@ import static ch.systemsx.cisd.openbis.dss.generic.shared.utils.DssPropertyParam
import
java.io.File
;
import
java.io.IOException
;
import
org.apache.commons.io.FileUtils
;
import
org.testng.annotations.BeforeMethod
;
import
org.testng.annotations.Test
;
import
ch.systemsx.cisd.common.filesystem.FileUtilities
;
import
ch.systemsx.cisd.common.logging.BufferedAppender
;
import
ch.systemsx.cisd.etlserver.DefaultStorageProcessor
;
import
ch.systemsx.cisd.openbis.dss.etl.featurevector.FeatureVectorStorageProcessor
;
import
ch.systemsx.cisd.openbis.dss.etl.jython.JythonPlateDataSetHandler
;
...
...
@@ -51,15 +49,11 @@ import ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.WellSearchCrit
{
"slow"
,
"systemtest"
})
public
class
AggregatedFeatureVectorsTest
extends
AbstractScreeningSystemTestCase
{
private
static
final
String
DATA_SET_IMPORTED_LOG_MARKER
=
"Successfully registered data set"
;
private
String
sessionToken
;
private
ICommonServer
commonServer
;
private
IScreeningServer
screeningServer
;
private
BufferedAppender
logAppender
;
@Override
protected
void
setUpTestThread
()
{
...
...
@@ -75,7 +69,6 @@ public class AggregatedFeatureVectorsTest extends AbstractScreeningSystemTestCas
@BeforeMethod
public
void
setUp
()
{
logAppender
=
new
BufferedAppender
();
commonServer
=
(
ICommonServer
)
applicationContext
.
getBean
(
ch
.
systemsx
.
cisd
.
openbis
.
generic
.
shared
.
ResourceNames
.
COMMON_SERVER
);
...
...
@@ -91,7 +84,7 @@ public class AggregatedFeatureVectorsTest extends AbstractScreeningSystemTestCas
public
void
testDummy
()
throws
Exception
{
File
exampleDataSet
=
createExampleIncoming
();
FileUtils
.
moveDirectoryToDirectory
(
exampleDataSet
,
getIncomingDirectory
(),
false
);
moveFileToIncoming
(
exampleDataSet
);
// get feature vector information
waitUntilDataSetImported
();
Material
geneG
=
commonServer
.
getMaterialInfo
(
sessionToken
,
new
MaterialIdentifier
(
"G"
,
"GENE"
));
...
...
@@ -111,31 +104,6 @@ public class AggregatedFeatureVectorsTest extends AbstractScreeningSystemTestCas
assertFeatureSummary
(
"B"
,
2.0
,
summaryResult
);
}
private
void
waitUntilDataSetImported
()
throws
Exception
{
boolean
dataSetImported
=
false
;
String
logContent
=
""
;
final
int
maxLoops
=
20
;
for
(
int
loops
=
0
;
loops
<
maxLoops
&&
dataSetImported
==
false
;
loops
++)
{
Thread
.
sleep
(
1000
);
logContent
=
logAppender
.
getLogContent
();
if
(
logContent
.
contains
(
DATA_SET_IMPORTED_LOG_MARKER
))
{
dataSetImported
=
true
;
}
else
{
assertFalse
(
logContent
,
logContent
.
contains
(
"ERROR"
));
}
}
if
(
dataSetImported
==
false
)
{
fail
(
"Failed to determine whether data set import was successful:"
+
logContent
);
}
}
private
void
assertFeatureSummary
(
String
feature
,
double
featureMedianValue
,
MaterialReplicaFeatureSummaryResult
summaryResult
)
{
...
...
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