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
e7e2f4b7
Commit
e7e2f4b7
authored
16 years ago
by
ribeaudc
Browse files
Options
Downloads
Patches
Plain Diff
fix: - DataMover tests.
SVN: 6616
parent
b13ff6cd
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
common/sourceTest/java/ch/systemsx/cisd/common/concurrent/TerminableCallableTest.java
+7
-4
7 additions, 4 deletions
...stemsx/cisd/common/concurrent/TerminableCallableTest.java
with
7 additions
and
4 deletions
common/sourceTest/java/ch/systemsx/cisd/common/concurrent/TerminableCallableTest.java
+
7
−
4
View file @
e7e2f4b7
...
@@ -16,7 +16,10 @@
...
@@ -16,7 +16,10 @@
package
ch.systemsx.cisd.common.concurrent
;
package
ch.systemsx.cisd.common.concurrent
;
import
static
org
.
testng
.
AssertJUnit
.*;
import
static
org
.
testng
.
AssertJUnit
.
assertEquals
;
import
static
org
.
testng
.
AssertJUnit
.
assertFalse
;
import
static
org
.
testng
.
AssertJUnit
.
assertNull
;
import
static
org
.
testng
.
AssertJUnit
.
assertTrue
;
import
java.util.concurrent.CountDownLatch
;
import
java.util.concurrent.CountDownLatch
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeUnit
;
...
@@ -52,7 +55,7 @@ public class TerminableCallableTest
...
@@ -52,7 +55,7 @@ public class TerminableCallableTest
final
private
Strategy
strategy
;
final
private
Strategy
strategy
;
volatile
FinishCause
cause
;
volatile
FinishCause
cause
;
volatile
int
cleanUpCount
;
volatile
int
cleanUpCount
;
public
TestRunnable
(
CountDownLatch
launchLatch
,
CountDownLatch
milestoneLatch
,
public
TestRunnable
(
CountDownLatch
launchLatch
,
CountDownLatch
milestoneLatch
,
...
@@ -197,7 +200,7 @@ public class TerminableCallableTest
...
@@ -197,7 +200,7 @@ public class TerminableCallableTest
assertEquals
(
1
,
sensor
.
cleanUpCount
);
assertEquals
(
1
,
sensor
.
cleanUpCount
);
}
}
@Test
@Test
(
invocationCount
=
10
)
public
void
testThrowException
()
throws
Exception
public
void
testThrowException
()
throws
Exception
{
{
final
CountDownLatch
launchLatch
=
new
CountDownLatch
(
1
);
final
CountDownLatch
launchLatch
=
new
CountDownLatch
(
1
);
...
@@ -209,7 +212,7 @@ public class TerminableCallableTest
...
@@ -209,7 +212,7 @@ public class TerminableCallableTest
t
.
start
();
t
.
start
();
launchLatch
.
await
();
launchLatch
.
await
();
milestoneLatch
.
await
();
milestoneLatch
.
await
();
assertTrue
(
callableUnderTest
.
terminate
(
0L
));
assertTrue
(
callableUnderTest
.
terminate
());
assertTrue
(
milestoneLatch
.
await
(
0
,
TimeUnit
.
MILLISECONDS
));
assertTrue
(
milestoneLatch
.
await
(
0
,
TimeUnit
.
MILLISECONDS
));
assertTrue
(
describe
(
sensor
.
cause
),
FinishCause
.
EXCEPTION
.
equals
(
sensor
.
cause
));
assertTrue
(
describe
(
sensor
.
cause
),
FinishCause
.
EXCEPTION
.
equals
(
sensor
.
cause
));
assertEquals
(
1
,
sensor
.
cleanUpCount
);
assertEquals
(
1
,
sensor
.
cleanUpCount
);
...
...
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