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
7c128290
Commit
7c128290
authored
Jul 15, 2016
by
Eric Cano
Browse files
Revived the first DataTransferSessionTest unit test (still DISABLED).
parent
30017fb6
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
common/utils/utils.cpp
View file @
7c128290
...
...
@@ -33,6 +33,7 @@
#include
<zlib.h>
#include
<sys/utsname.h>
#include
<sys/prctl.h>
#include
<iomanip>
using
cta
::
exception
::
Exception
;
...
...
@@ -577,11 +578,23 @@ void toUpper(std::string &str) {
// getAdler32
//------------------------------------------------------------------------------
uint32_t
getAdler32
(
const
uint8_t
*
buf
,
const
uint32_t
len
)
throw
()
{
{
const
uint32_t
checksum
=
adler32
(
0L
,
Z_NULL
,
0
);
return
adler32
(
checksum
,
(
const
Bytef
*
)
buf
,
len
);
}
//------------------------------------------------------------------------------
// getAdler32String
//------------------------------------------------------------------------------
std
::
string
getAdler32String
(
const
uint8_t
*
buf
,
const
uint32_t
len
)
{
const
uint32_t
checksum
=
adler32
(
0L
,
Z_NULL
,
0
);
std
::
stringstream
ret
;
ret
<<
std
::
showbase
<<
std
::
hex
<<
std
::
setw
(
8
)
<<
std
::
setfill
(
'0'
)
<<
std
::
uppercase
<<
adler32
(
checksum
,
(
const
Bytef
*
)
buf
,
len
);
return
ret
.
str
();
}
//------------------------------------------------------------------------------
// getShortHostname
//------------------------------------------------------------------------------
...
...
common/utils/utils.hpp
View file @
7c128290
...
...
@@ -229,7 +229,17 @@ namespace utils {
* @param len The length of the buffer in bytes.
* @return the alder32 checksum of the specified buffer.
*/
uint32_t
getAdler32
(
const
uint8_t
*
buf
,
const
uint32_t
len
)
throw
();
uint32_t
getAdler32
(
const
uint8_t
*
buf
,
const
uint32_t
len
);
/**
* Returns the alder32 checksum of the specified buffer in string format,
* CTA style that is with leading 0x, 8 digits with leading 0 and uppercase.
*
* @param buf The buffer.
* @param len The length of the buffer in bytes.
* @return the alder32 checksum of the specified buffer.
*/
std
::
string
getAdler32String
(
const
uint8_t
*
buf
,
const
uint32_t
len
);
/**
* Returns true if the attributes of the current process indicate that it will
...
...
scheduler/SchedulerTest.cpp
View file @
7c128290
...
...
@@ -40,6 +40,8 @@
namespace
unitTests
{
namespace
{
/**
* This structure is used to parameterize scheduler tests.
*/
...
...
@@ -52,6 +54,8 @@ struct SchedulerTestParam {
}
};
// struct SchedulerTestParam
}
/**
* The scheduler test is a parameterized test. It takes a pair of name server
* and scheduler database factories as a parameter.
...
...
@@ -59,7 +63,7 @@ struct SchedulerTestParam {
class
SchedulerTest
:
public
::
testing
::
TestWithParam
<
SchedulerTestParam
>
{
public:
SchedulerTest
()
throw
()
{
SchedulerTest
()
{
}
class
FailedToGetCatalogue
:
public
std
::
exception
{
...
...
tapeserver/castor/tape/tapeserver/daemon/CMakeLists.txt
View file @
7c128290
...
...
@@ -77,6 +77,7 @@ if(CMAKE_COMPILER_IS_GNUCC)
foreach
(
CTATAPESERVERDAEMON_LIBRARY_SRC
${
CTATAPESERVERDAEMON_LIBRARY_SRCS
}
CatalogueTest.cpp
DataTransferSessionTest.cpp
DiskReadTaskTest.cpp
DiskWriteTaskTest.cpp
DiskWriteTaskTest.cpp
...
...
@@ -113,7 +114,7 @@ install(TARGETS ctatapeserverdaemonutils DESTINATION usr/${CMAKE_INSTALL_LIBDIR}
add_library
(
ctatapeserverdaemonunittests SHARED
CatalogueDriveStateTest.cpp
CatalogueTest.cpp
#
DataTransferSessionTest.cpp
DataTransferSessionTest.cpp
DiskReadTaskTest.cpp
DiskWriteTaskTest.cpp
DiskWriteThreadPoolTest.cpp
...
...
tapeserver/castor/tape/tapeserver/daemon/DataTransferSessionTest.cpp
View file @
7c128290
This diff is collapsed.
Click to expand it.
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