Skip to content

Commit

Permalink
XrdApps::JCache: fix syntax of VectorCache tests
Browse files Browse the repository at this point in the history
  • Loading branch information
apeters1971 committed Jul 23, 2024
1 parent 330b5e8 commit 91319d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/XrdCl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ target_link_libraries(xrdcl-unit-tests
)

target_include_directories(xrdcl-unit-tests
PRIVATE ${CMAKE_SOURCE_DIR}/src ../common
PRIVATE ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src/XrdApps/XrdClJCachePlugin/ ../common
)

gtest_discover_tests(xrdcl-unit-tests TEST_PREFIX XrdCl::)
Expand Down
6 changes: 3 additions & 3 deletions tests/XrdCl/XrdClVectorCache.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#undef NDEBUG

#include "XrdApps/XrdClJCachePlugin/XrdClVectorCache.hh"
#include "XrdApps/XrdClJCachePlugin/vector/XrdClVectorCache.hh"
#include "XrdSys/XrdSysPlatform.hh"

#include <gtest/gtest.h>
Expand Down Expand Up @@ -31,9 +31,9 @@ TEST(VectorCacheTest, Store)
}

EXPECT_TRUE(bcmp(data, cdata, 100) != 0) << "Data not zeroed" << std::endl;
VectorCache cacheout ( chunks, name, data, prefix);
XrdCl::VectorCache cacheout ( chunks, name, data, prefix);
EXPECT_TRUE(cacheout.store()) << "Failed to store vector read into cache" << std::endl;
VectorCache cachein ( chunks, name, cdata, prefix);
XrdCl::VectorCache cachein ( chunks, name, cdata, prefix);
EXPECT_TRUE(cachein.retrieve()) << "Failed to retrieve vector read from cache" << std::endl;
EXPECT_TRUE(bcmp(data, cdata, 100) == 0) << "Cached data is wrong" << std::endl;
EXPECT_TRUE(truncate("/tmp/d1a4e9081bd37839e4b4f486ed8b13397ce9ffa0198edb586208d6b73e15b19a/3ec7dea73b7880fdce09e1c8f804054ae685e3dbda4d467c71ab2327ea5ad93e",99)==0) << "Failed to truncate cached file" << std::endl;
Expand Down

0 comments on commit 91319d9

Please sign in to comment.