Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cta
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dCache
cta
Commits
e6f5804b
Commit
e6f5804b
authored
9 years ago
by
Daniele Kruse
Browse files
Options
Downloads
Patches
Plain Diff
Slightly changed RecallTaskInjectorTest to use more understandable parameters
parent
d3c191c9
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
tapeserver/castor/tape/tapeserver/daemon/RecallTaskInjectorTest.cpp
+7
-6
7 additions, 6 deletions
.../castor/tape/tapeserver/daemon/RecallTaskInjectorTest.cpp
with
7 additions
and
6 deletions
tapeserver/castor/tape/tapeserver/daemon/RecallTaskInjectorTest.cpp
+
7
−
6
View file @
e6f5804b
...
...
@@ -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
;
...
...
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