Skip to content

Commit

Permalink
Fix Windows build in block_cache_tracer_test (facebook#7795)
Browse files Browse the repository at this point in the history
Summary:
The test was added to cmake in facebook#7783

Pull Request resolved: facebook#7795

Reviewed By: akankshamahajan15

Differential Revision: D25671010

Pulled By: jay-zhuang

fbshipit-source-id: 2146ff9559cdd7266c4d78476672488c62654a6d
  • Loading branch information
jay-zhuang authored and facebook-github-bot committed Dec 21, 2020
1 parent fd0d35d commit 861b0d1
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions trace_replay/block_cache_tracer_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class BlockCacheTracerTest : public testing::Test {
return TableReaderCaller::kUserIterator;
}
assert(false);
return TableReaderCaller::kMaxBlockCacheLookupCaller;
}

void WriteBlockAccess(BlockCacheTraceWriter* writer, uint32_t from_key_id,
Expand Down Expand Up @@ -200,8 +201,8 @@ TEST_F(BlockCacheTracerTest, AtomicWrite) {
BlockCacheTraceReader reader(std::move(trace_reader));
BlockCacheTraceHeader header;
ASSERT_OK(reader.ReadHeader(&header));
ASSERT_EQ(kMajorVersion, header.rocksdb_major_version);
ASSERT_EQ(kMinorVersion, header.rocksdb_minor_version);
ASSERT_EQ(kMajorVersion, static_cast<int>(header.rocksdb_major_version));
ASSERT_EQ(kMinorVersion, static_cast<int>(header.rocksdb_minor_version));
VerifyAccess(&reader, 0, TraceType::kBlockTraceDataBlock, 1);
ASSERT_NOK(reader.ReadAccess(&record));
}
Expand Down Expand Up @@ -244,8 +245,8 @@ TEST_F(BlockCacheTracerTest, AtomicNoWriteAfterEndTrace) {
BlockCacheTraceReader reader(std::move(trace_reader));
BlockCacheTraceHeader header;
ASSERT_OK(reader.ReadHeader(&header));
ASSERT_EQ(kMajorVersion, header.rocksdb_major_version);
ASSERT_EQ(kMinorVersion, header.rocksdb_minor_version);
ASSERT_EQ(kMajorVersion, static_cast<int>(header.rocksdb_major_version));
ASSERT_EQ(kMinorVersion, static_cast<int>(header.rocksdb_minor_version));
VerifyAccess(&reader, 0, TraceType::kBlockTraceDataBlock, 1);
ASSERT_NOK(reader.ReadAccess(&record));
}
Expand Down Expand Up @@ -307,8 +308,8 @@ TEST_F(BlockCacheTracerTest, MixedBlocks) {
BlockCacheTraceReader reader(std::move(trace_reader));
BlockCacheTraceHeader header;
ASSERT_OK(reader.ReadHeader(&header));
ASSERT_EQ(kMajorVersion, header.rocksdb_major_version);
ASSERT_EQ(kMinorVersion, header.rocksdb_minor_version);
ASSERT_EQ(kMajorVersion, static_cast<int>(header.rocksdb_major_version));
ASSERT_EQ(kMinorVersion, static_cast<int>(header.rocksdb_minor_version));
// Read blocks.
VerifyAccess(&reader, 0, TraceType::kBlockTraceUncompressionDictBlock, 10);
VerifyAccess(&reader, 10, TraceType::kBlockTraceDataBlock, 10);
Expand Down

0 comments on commit 861b0d1

Please sign in to comment.