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
5e53eb78
Commit
5e53eb78
authored
14 years ago
by
kaloyane
Browse files
Options
Downloads
Patches
Plain Diff
minor: improve reliability of tests
SVN: 19331
parent
4b4a50f5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/plugin/generic/ExperimentRegistrationTest.java
+13
-6
13 additions, 6 deletions
...systemtest/plugin/generic/ExperimentRegistrationTest.java
with
13 additions
and
6 deletions
openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/plugin/generic/ExperimentRegistrationTest.java
+
13
−
6
View file @
5e53eb78
...
...
@@ -19,6 +19,7 @@ package ch.systemsx.cisd.openbis.systemtest.plugin.generic;
import
static
org
.
testng
.
AssertJUnit
.
assertEquals
;
import
static
org
.
testng
.
AssertJUnit
.
fail
;
import
java.io.UnsupportedEncodingException
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Collections
;
...
...
@@ -28,6 +29,7 @@ import java.util.List;
import
org.apache.commons.lang.StringEscapeUtils
;
import
org.testng.annotations.Test
;
import
ch.systemsx.cisd.common.utilities.UnicodeUtils
;
import
ch.systemsx.cisd.openbis.generic.client.web.client.dto.ListSampleDisplayCriteria
;
import
ch.systemsx.cisd.openbis.generic.client.web.client.dto.ResultSetWithEntityTypes
;
import
ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException
;
...
...
@@ -214,7 +216,7 @@ public class ExperimentRegistrationTest extends GenericSystemTestCase
}
@Test
public
void
testBulkUpdateExperiments
()
public
void
testBulkUpdateExperiments
()
throws
UnsupportedEncodingException
{
logIntoCommonClientService
();
...
...
@@ -228,7 +230,8 @@ public class ExperimentRegistrationTest extends GenericSystemTestCase
String
bulkUpdateString
=
createBulkUpdateString
(
expIds
,
codes
,
values
);
// Update the experiments
addMultiPartFile
(
EXPERIMENTS_SESSION_KEY
,
"experiments.txt"
,
bulkUpdateString
.
getBytes
());
addMultiPartFile
(
EXPERIMENTS_SESSION_KEY
,
"experiments.txt"
,
bulkUpdateString
.
getBytes
(
UnicodeUtils
.
DEFAULT_UNICODE_CHARSET
));
ExperimentType
experimentType
=
new
ExperimentType
();
experimentType
.
setCode
(
"SIRNA_HCS"
);
List
<
BatchRegistrationResult
>
results
=
...
...
@@ -244,7 +247,7 @@ public class ExperimentRegistrationTest extends GenericSystemTestCase
}
@Test
public
void
testBulkUpdateExperimentsWithProjectChanges
()
public
void
testBulkUpdateExperimentsWithProjectChanges
()
throws
UnsupportedEncodingException
{
logIntoCommonClientService
();
...
...
@@ -258,7 +261,8 @@ public class ExperimentRegistrationTest extends GenericSystemTestCase
String
bulkUpdateString
=
createBulkUpdateString
(
expIds
,
"/cisd/nemo"
,
codes
,
values
);
// Update the experiments
addMultiPartFile
(
EXPERIMENTS_SESSION_KEY
,
"experiments.txt"
,
bulkUpdateString
.
getBytes
());
addMultiPartFile
(
EXPERIMENTS_SESSION_KEY
,
"experiments.txt"
,
bulkUpdateString
.
getBytes
(
UnicodeUtils
.
DEFAULT_UNICODE_CHARSET
));
ExperimentType
experimentType
=
new
ExperimentType
();
experimentType
.
setCode
(
"SIRNA_HCS"
);
List
<
BatchRegistrationResult
>
results
=
...
...
@@ -373,6 +377,7 @@ public class ExperimentRegistrationTest extends GenericSystemTestCase
@Test
public
void
testBulkUpdateExperimentsDeletingNonMandatoryProperty
()
throws
UnsupportedEncodingException
{
logIntoCommonClientService
();
...
...
@@ -386,7 +391,8 @@ public class ExperimentRegistrationTest extends GenericSystemTestCase
String
bulkUpdateString
=
createBulkUpdateString
(
expIds
,
codes
,
values
);
// Add/Modify some properties
addMultiPartFile
(
EXPERIMENTS_SESSION_KEY
,
"experiments.txt"
,
bulkUpdateString
.
getBytes
());
addMultiPartFile
(
EXPERIMENTS_SESSION_KEY
,
"experiments.txt"
,
bulkUpdateString
.
getBytes
(
UnicodeUtils
.
DEFAULT_UNICODE_CHARSET
));
ExperimentType
experimentType
=
new
ExperimentType
();
experimentType
.
setCode
(
"SIRNA_HCS"
);
...
...
@@ -400,7 +406,8 @@ public class ExperimentRegistrationTest extends GenericSystemTestCase
{
"--DELETE--"
};
bulkUpdateString
=
createBulkUpdateString
(
expIds
,
codes
,
values
);
addMultiPartFile
(
EXPERIMENTS_SESSION_KEY
,
"experiments.txt"
,
bulkUpdateString
.
getBytes
());
addMultiPartFile
(
EXPERIMENTS_SESSION_KEY
,
"experiments.txt"
,
bulkUpdateString
.
getBytes
(
UnicodeUtils
.
DEFAULT_UNICODE_CHARSET
));
genericClientService
.
updateExperiments
(
experimentType
,
EXPERIMENTS_SESSION_KEY
);
verifyBulkUpdate
(
expIds
,
new
String
[]
...
...
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