Fix failed VerifySstUniqueIds unittests (#10043)

Summary:
which should use UniqueId64x2 instead of string.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/10043

Test Plan: unittest

Reviewed By: pdillinger

Differential Revision: D36620366

Pulled By: jay-zhuang

fbshipit-source-id: cf937a1da362018472fa4396848225e48893848b
main
Jay Zhuang 3 years ago committed by Facebook GitHub Bot
parent 700d597bd8
commit fd24e4479b
  1. 5
      db/compaction/compaction_service_test.cc
  2. 5
      db/repair_test.cc

@ -7,6 +7,7 @@
#include "db/db_test_util.h" #include "db/db_test_util.h"
#include "port/stack_trace.h" #include "port/stack_trace.h"
#include "table/unique_id_impl.h"
namespace ROCKSDB_NAMESPACE { namespace ROCKSDB_NAMESPACE {
@ -294,8 +295,8 @@ TEST_F(CompactionServiceTest, BasicCompactions) {
SyncPoint::GetInstance()->SetCallBack( SyncPoint::GetInstance()->SetCallBack(
"Version::VerifySstUniqueIds::Passed", [&](void* arg) { "Version::VerifySstUniqueIds::Passed", [&](void* arg) {
// override job status // override job status
auto id = static_cast<std::string*>(arg); auto id = static_cast<UniqueId64x2*>(arg);
assert(!id->empty()); assert(*id != kNullUniqueId64x2);
verify_passed++; verify_passed++;
}); });
SyncPoint::GetInstance()->EnableProcessing(); SyncPoint::GetInstance()->EnableProcessing();

@ -16,6 +16,7 @@
#include "rocksdb/comparator.h" #include "rocksdb/comparator.h"
#include "rocksdb/db.h" #include "rocksdb/db.h"
#include "rocksdb/transaction_log.h" #include "rocksdb/transaction_log.h"
#include "table/unique_id_impl.h"
#include "util/string_util.h" #include "util/string_util.h"
namespace ROCKSDB_NAMESPACE { namespace ROCKSDB_NAMESPACE {
@ -49,8 +50,8 @@ class RepairTest : public DBTestBase {
SyncPoint::GetInstance()->SetCallBack( SyncPoint::GetInstance()->SetCallBack(
"Version::VerifySstUniqueIds::Passed", [&](void* arg) { "Version::VerifySstUniqueIds::Passed", [&](void* arg) {
// override job status // override job status
auto id = static_cast<std::string*>(arg); auto id = static_cast<UniqueId64x2*>(arg);
assert(!id->empty()); assert(*id != kNullUniqueId64x2);
verify_passed++; verify_passed++;
}); });
SyncPoint::GetInstance()->EnableProcessing(); SyncPoint::GetInstance()->EnableProcessing();

Loading…
Cancel
Save