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
1754731a
Commit
1754731a
authored
16 years ago
by
felmer
Browse files
Options
Downloads
Patches
Plain Diff
fix test
SVN: 6942
parent
5b7958fc
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
+13
-9
13 additions, 9 deletions
...ava/ch/systemsx/cisd/datamover/IncomingProcessorTest.java
with
13 additions
and
9 deletions
datamover/sourceTest/java/ch/systemsx/cisd/datamover/IncomingProcessorTest.java
+
13
−
9
View file @
1754731a
...
...
@@ -138,12 +138,6 @@ public final class IncomingProcessorTest
FileUtilities
.
deleteRecursively
(
TEST_FOLDER
);
TEST_FOLDER
.
mkdirs
();
exampleScript
=
new
File
(
TEST_FOLDER
,
EXAMPLE_SCRIPT_NAME
);
if
(
OSUtilities
.
isWindows
()
==
false
)
{
Logger
logger
=
LogFactory
.
getLogger
(
LogCategory
.
OPERATION
,
getClass
());
List
<
String
>
cmd
=
Arrays
.
asList
(
"chmod"
,
"755"
,
exampleScript
.
getAbsolutePath
());
ProcessExecutionHelper
.
run
(
cmd
,
logger
,
logger
);
}
incomingDir
=
new
File
(
TEST_FOLDER
,
INCOMING_DIR
);
incomingDir
.
mkdir
();
copyInProgressDir
=
new
File
(
TEST_FOLDER
,
COPY_IN_PROGRESS_DIR
);
...
...
@@ -194,7 +188,7 @@ public final class IncomingProcessorTest
@Test
public
void
testWithDataCompletedScript
()
throws
IOException
{
FileUtilities
.
writeToFile
(
e
xampleScript
,
EXAMPLE_SCRIPT
);
createE
xampleScript
(
EXAMPLE_SCRIPT
);
final
File
testDataFile
=
new
File
(
incomingDir
,
"test-data.txt"
);
testDataFile
.
createNewFile
();
context
.
checking
(
new
Expectations
()
...
...
@@ -231,8 +225,7 @@ public final class IncomingProcessorTest
@Test
public
void
testWithDataCompletedScriptWhichFailsInitially
()
throws
IOException
{
FileUtilities
.
writeToFile
(
exampleScript
,
EXAMPLE_SCRIPT
+
"\nrm -v "
+
TEST_FILE
.
toString
().
replace
(
'\\'
,
'/'
));
createExampleScript
(
EXAMPLE_SCRIPT
+
"\nrm -v "
+
TEST_FILE
.
toString
().
replace
(
'\\'
,
'/'
));
final
File
testDataFile
=
new
File
(
incomingDir
,
"test-data.txt"
);
testDataFile
.
createNewFile
();
context
.
checking
(
new
Expectations
()
...
...
@@ -268,6 +261,17 @@ public final class IncomingProcessorTest
context
.
assertIsSatisfied
();
}
private
void
createExampleScript
(
String
text
)
{
FileUtilities
.
writeToFile
(
exampleScript
,
text
);
if
(
OSUtilities
.
isWindows
()
==
false
)
{
Logger
logger
=
LogFactory
.
getLogger
(
LogCategory
.
OPERATION
,
getClass
());
List
<
String
>
cmd
=
Arrays
.
asList
(
"chmod"
,
"755"
,
exampleScript
.
getAbsolutePath
());
ProcessExecutionHelper
.
run
(
cmd
,
logger
,
logger
);
}
}
private
TimerTask
getInstrumentedTimerTaskFrom
(
final
DataMoverProcess
process
)
{
TimerTask
timerTask
=
process
.
getTimerTask
();
...
...
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