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
45009058
Commit
45009058
authored
Apr 10, 2014
by
David COME
Browse files
Fixed for SLC5 DiskWriteThreadPoolTest.cpp
Some ambigous namespaces no well supported by g++ 4.1
parent
0beab6c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
castor/tape/tapeserver/daemon/DiskWriteThreadPoolTest.cpp
View file @
45009058
...
...
@@ -12,17 +12,18 @@
#include
<gtest/gtest.h>
namespace
unitTests
{
using
namespace
castor
::
tape
::
tapeserver
;
struct
MockRecallReportPacker
:
public
daemon
::
ReportPackerInterface
<
daemon
::
detail
::
Recall
>
{
using
namespace
castor
::
tape
::
tapeserver
::
daemon
;
using
namespace
castor
::
tape
::
tapeserver
::
client
;
struct
MockRecallReportPacker
:
public
ReportPackerInterface
<
detail
::
Recall
>
{
MOCK_METHOD1
(
reportCompletedJob
,
void
(
const
FileStruct
&
));
MOCK_METHOD3
(
reportFailedJob
,
void
(
const
FileStruct
&
,
const
std
::
string
&
,
int
));
MOCK_METHOD0
(
reportEndOfSession
,
void
());
MOCK_METHOD2
(
reportEndOfSessionWithErrors
,
void
(
const
std
::
string
,
int
));
MockRecallReportPacker
(
client
::
ClientInterface
&
client
,
castor
::
log
::
LogContext
lc
)
:
daemon
::
ReportPackerInterface
<
daemon
::
detail
::
Recall
>
(
client
,
lc
){}
MockRecallReportPacker
(
ClientInterface
&
client
,
castor
::
log
::
LogContext
lc
)
:
ReportPackerInterface
<
detail
::
Recall
>
(
client
,
lc
){}
};
struct
MockTaskInjector
:
public
daemon
::
TaskInjector
{
struct
MockTaskInjector
:
public
TaskInjector
{
MOCK_METHOD3
(
requestInjection
,
void
(
int
maxFiles
,
int
maxBlocks
,
bool
lastCall
));
};
...
...
@@ -38,21 +39,21 @@ namespace unitTests{
//EXPECT_CALL(tskInjectorl,requestInjection(_,_,_)).Times(2);
EXPECT_CALL
(
report
,
reportEndOfSession
()).
Times
(
1
);
daemon
::
MemoryManager
mm
(
10
,
100
);
MemoryManager
mm
(
10
,
100
);
// mm.startThreads();
daemon
::
DiskWriteThreadPool
dwtp
(
2
,
5
,
500
,
report
,
lc
);
DiskWriteThreadPool
dwtp
(
2
,
5
,
500
,
report
,
lc
);
dwtp
.
setJobInjector
(
&
tskInjectorl
);
dwtp
.
startThreads
();
tapegateway
::
FileToRecallStruct
file
;
castor
::
tape
::
tapegateway
::
FileToRecallStruct
file
;
file
.
setPath
(
"/dev/null"
);
file
.
setBlockId3
(
1
);
for
(
int
i
=
0
;
i
<
5
;
++
i
){
daemon
::
DiskWriteTask
*
t
=
new
daemon
::
DiskWriteTask
(
dynamic_cast
<
tapegateway
::
FileToRecallStruct
*>
(
file
.
clone
()),
mm
);
daemon
::
MemBlock
*
mb
=
mm
.
getFreeBlock
();
DiskWriteTask
*
t
=
new
DiskWriteTask
(
dynamic_cast
<
tapegateway
::
FileToRecallStruct
*>
(
file
.
clone
()),
mm
);
MemBlock
*
mb
=
mm
.
getFreeBlock
();
mb
->
m_fileid
=
0
;
mb
->
m_fileBlock
=
0
;
t
->
pushDataBlock
(
mb
);
...
...
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