Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dCache
cta
Commits
ff502c06
Commit
ff502c06
authored
Sep 04, 2015
by
Daniele Kruse
Browse files
Slightly changed RecallTaskInjectorTest to use more understandable parameters
parent
01ed5ed4
Changes
1
Hide whitespace changes
Inline
Side-by-side
tapeserver/castor/tape/tapeserver/daemon/RecallTaskInjectorTest.cpp
View file @
ff502c06
...
...
@@ -147,14 +147,15 @@ namespace unitTests
};
TEST_F
(
castor_tape_tapeserver_daemonTest
,
RecallTaskInjectorNominal
)
{
const
int
nbJobs
=
5
;
const
int
nbJobs
=
15
;
const
int
maxNbJobsInjectedAtOnce
=
6
;
castor
::
log
::
StringLogger
log
(
"castor_tape_tapeserver_daemon_RecallTaskInjectorTest"
);
castor
::
log
::
LogContext
lc
(
log
);
RecallMemoryManager
mm
(
50U
,
50U
,
lc
);
castor
::
tape
::
tapeserver
::
drive
::
FakeDrive
drive
;
MockRetrieveMount
trm
(
nbJobs
);
EXPECT_CALL
(
trm
,
internalGetNextJob
()).
Times
(
8
);
EXPECT_CALL
(
trm
,
internalGetNextJob
()).
Times
(
nbJobs
+
1
);
FakeDiskWriteThreadPool
diskWrite
(
lc
);
castor
::
messages
::
AcsProxyDummy
acs
;
...
...
@@ -169,11 +170,11 @@ namespace unitTests
castor
::
tape
::
tapeserver
::
daemon
::
TapeServerReporter
gsr
(
initialProcess
,
DriveConfig
(),
"0.0.0.0"
,
volume
,
lc
);
castor
::
server
::
ProcessCapDummy
cap
;
FakeSingleTapeReadThread
tapeRead
(
drive
,
mc
,
gsr
,
volume
,
cap
,
lc
);
tapeserver
::
daemon
::
RecallTaskInjector
rti
(
mm
,
tapeRead
,
diskWrite
,
trm
,
6
,
blockSize
,
lc
);
tapeserver
::
daemon
::
RecallTaskInjector
rti
(
mm
,
tapeRead
,
diskWrite
,
trm
,
maxNbJobsInjectedAtOnce
,
blockSize
,
lc
);
ASSERT_EQ
(
true
,
rti
.
synchronousInjection
());
ASSERT_EQ
(
n
bJobs
,
diskWrite
.
m_tasks
.
size
());
ASSERT_EQ
(
n
bJobs
,
tapeRead
.
m_tasks
.
size
());
ASSERT_EQ
(
maxN
bJobs
InjectedAtOnce
+
1
,
diskWrite
.
m_tasks
.
size
());
ASSERT_EQ
(
maxN
bJobs
InjectedAtOnce
+
1
,
tapeRead
.
m_tasks
.
size
());
rti
.
startThreads
();
rti
.
requestInjection
(
false
);
...
...
@@ -211,7 +212,7 @@ namespace unitTests
castor
::
tape
::
tapeserver
::
drive
::
FakeDrive
drive
;
MockRetrieveMount
trm
(
0
);
EXPECT_CALL
(
trm
,
internalGetNextJob
()).
Times
(
1
);
EXPECT_CALL
(
trm
,
internalGetNextJob
()).
Times
(
1
);
//no work: single call to getnextjob
FakeDiskWriteThreadPool
diskWrite
(
lc
);
castor
::
messages
::
AcsProxyDummy
acs
;
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment