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
822ba665
Commit
822ba665
authored
16 years ago
by
brinn
Browse files
Options
Downloads
Patches
Plain Diff
[DMV-31] improve error message on spurious unit test failure
SVN: 7193
parent
1a81b264
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
datamover/sourceTest/java/ch/systemsx/cisd/datamover/MainTest.java
+19
-9
19 additions, 9 deletions
.../sourceTest/java/ch/systemsx/cisd/datamover/MainTest.java
with
19 additions
and
9 deletions
datamover/sourceTest/java/ch/systemsx/cisd/datamover/MainTest.java
+
19
−
9
View file @
822ba665
...
@@ -70,17 +70,19 @@ public final class MainTest
...
@@ -70,17 +70,19 @@ public final class MainTest
private
static
final
int
QUIET_PERIOD
=
2
;
private
static
final
int
QUIET_PERIOD
=
2
;
private
static
final
int
WAITING_TIME_OUT
=
30
;
private
static
final
int
WAITING_TIME_OUT
=
30
;
private
static
final
File
unitTestRootDirectory
=
private
static
final
File
unitTestRootDirectory
=
new
File
(
"targets"
+
File
.
separator
+
"unit-test-wd"
);
new
File
(
"targets"
+
File
.
separator
+
"unit-test-wd"
);
private
static
final
File
workingDirectory
=
private
static
final
File
workingDirectory
=
new
File
(
unitTestRootDirectory
,
MainTest
.
class
.
getSimpleName
());
new
File
(
unitTestRootDirectory
,
MainTest
.
class
.
getSimpleName
());
private
static
final
File
ORIGINAL_SCRIPT_FILE
=
new
File
(
new
File
(
"dist"
),
ShellScriptTest
.
SCRIPT_FILE_NAME
);
private
static
final
File
ORIGINAL_SCRIPT_FILE
=
new
File
(
new
File
(
"dist"
),
ShellScriptTest
.
SCRIPT_FILE_NAME
);
private
static
final
File
SCRIPT_FILE
=
new
File
(
workingDirectory
,
ShellScriptTest
.
SCRIPT_FILE_NAME
);
private
static
final
File
SCRIPT_FILE
=
new
File
(
workingDirectory
,
ShellScriptTest
.
SCRIPT_FILE_NAME
);
@BeforeClass
(
alwaysRun
=
true
)
@BeforeClass
(
alwaysRun
=
true
)
public
void
init
()
public
void
init
()
{
{
...
@@ -88,7 +90,7 @@ public final class MainTest
...
@@ -88,7 +90,7 @@ public final class MainTest
unitTestRootDirectory
.
mkdirs
();
unitTestRootDirectory
.
mkdirs
();
assertTrue
(
unitTestRootDirectory
.
isDirectory
());
assertTrue
(
unitTestRootDirectory
.
isDirectory
());
}
}
@BeforeMethod
(
alwaysRun
=
true
)
@BeforeMethod
(
alwaysRun
=
true
)
public
void
setUp
()
public
void
setUp
()
{
{
...
@@ -362,9 +364,17 @@ public final class MainTest
...
@@ -362,9 +364,17 @@ public final class MainTest
}
}
Thread
.
sleep
(
1000
);
Thread
.
sleep
(
1000
);
}
}
fail
(
"Not finished after "
+
WAITING_TIME_OUT
+
" seconds."
);
final
StringBuilder
buf
=
new
StringBuilder
();
for
(
File
f
:
getProcessingMarkerFiles
())
{
buf
.
append
(
f
.
getAbsoluteFile
());
buf
.
append
(
", "
);
}
buf
.
setLength
(
Math
.
max
(
0
,
buf
.
length
()
-
2
));
fail
(
String
.
format
(
"Not finished after %d seconds, processing files still existing: %s."
,
WAITING_TIME_OUT
,
buf
.
toString
()));
}
}
private
File
[]
getProcessingMarkerFiles
()
private
File
[]
getProcessingMarkerFiles
()
{
{
File
[]
files
=
new
File
(
"."
).
listFiles
(
new
FileFilter
()
File
[]
files
=
new
File
(
"."
).
listFiles
(
new
FileFilter
()
...
@@ -756,7 +766,7 @@ public final class MainTest
...
@@ -756,7 +766,7 @@ public final class MainTest
assertEquals
(
2
*
size
,
dirs
.
outgoing
.
list
().
length
);
assertEquals
(
2
*
size
,
dirs
.
outgoing
.
list
().
length
);
assertTrue
(
terminable
.
terminate
());
assertTrue
(
terminable
.
terminate
());
}
}
@Test
(
groups
=
@Test
(
groups
=
{
"slow"
})
{
"slow"
})
// some data are in incoming, test the whole pipeline taking manual intervention and cleansing
// some data are in incoming, test the whole pipeline taking manual intervention and cleansing
...
...
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