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
298c3fb7
Commit
298c3fb7
authored
16 years ago
by
brinn
Browse files
Options
Downloads
Patches
Plain Diff
fix: strange test failure, make test robust
SVN: 7474
parent
c43b34e2
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
datamover/sourceTest/java/ch/systemsx/cisd/datamover/IncomingProcessorTest.java
+6
-4
6 additions, 4 deletions
...ava/ch/systemsx/cisd/datamover/IncomingProcessorTest.java
with
6 additions
and
4 deletions
datamover/sourceTest/java/ch/systemsx/cisd/datamover/IncomingProcessorTest.java
+
6
−
4
View file @
298c3fb7
...
...
@@ -88,8 +88,6 @@ public final class IncomingProcessorTest
private
static
final
String
EXAMPLE_SCRIPT
=
"echo hello world"
;
private
static
final
File
TEST_FILE
=
new
File
(
TEST_FOLDER
,
"blabla.txt"
);
private
BufferedAppender
logRecorder
;
private
Mockery
context
;
...
...
@@ -301,7 +299,7 @@ public final class IncomingProcessorTest
@Test
public
void
testWithDataCompletedScriptWhichFailsInitially
()
throws
IOException
{
createExampleScript
(
EXAMPLE_SCRIPT
+
"\nrm -v "
+
TEST_FILE
.
toString
().
replace
(
'\\'
,
'/'
)
);
createExampleScript
(
"exit 1"
);
final
File
testDataFile
=
new
File
(
incomingDir
,
"test-data.txt"
);
testDataFile
.
createNewFile
();
final
File
markerFile
=
new
File
(
incomingDir
,
MarkerFile
.
createRequiresDeletionBeforeCreationMarker
().
getName
());
...
...
@@ -318,7 +316,11 @@ public final class IncomingProcessorTest
markerFile
.
renameTo
(
result
);
return
result
;
}
});
one
(
mover
).
tryMove
(
testDataFile
,
copyCompleteDir
,
""
);
will
(
returnValue
(
new
File
(
copyCompleteDir
,
testDataFile
.
getName
())));
}
});
...
...
@@ -339,7 +341,7 @@ public final class IncomingProcessorTest
logRecorder
.
resetLogContent
();
operationAppender
.
reset
();
TEST_FILE
.
createNewFile
();
createExampleScript
(
"exit 0"
);
// now the script will run fine
dataMoverTimerTask
.
run
();
// 4. round finds changed status, thus log
assertTrue
(
logRecorder
.
getLogContent
().
length
()
>
0
);
operationAppender
.
verifyLogHasHappened
();
...
...
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