Fix WriteBatchTest.ManyUpdates, WriteBatchTest.LargeKeyValue under clang

Summary:
Fix current clang failure
https://ci-builds.fb.com/view/rocksdb/job/rocksdb_clang_build/1398/console

Test Plan:
make sure that both clang and g++ compilation succeed

USE_CLANG=1 make check -j64
make check -j64

Reviewers: anthony, yhchiang, sdong

Reviewed By: sdong

Subscribers: dhruba

Differential Revision: https://reviews.facebook.net/D53667
main
Islam AbdelRahman 9 years ago
parent ad7ecca72d
commit 1ad8182950
  1. 6
      db/write_batch_test.cc

@ -313,8 +313,8 @@ TEST_F(WriteBatchTest, Blob) {
// Not all platform can run it. Also it runs a long time. So disable it.
TEST_F(WriteBatchTest, DISABLED_ManyUpdates) {
// Insert key and value of 3GB and push total batch size to 12GB.
const size_t kKeyValueSize = 4u;
const uint32_t kNumUpdates = 3 << 30;
static const size_t kKeyValueSize = 4u;
static const uint32_t kNumUpdates = 3 << 30;
std::string raw(kKeyValueSize, 'A');
WriteBatch batch(kNumUpdates * (4 + kKeyValueSize * 2) + 1024u);
char c = 'A';
@ -375,7 +375,7 @@ TEST_F(WriteBatchTest, DISABLED_ManyUpdates) {
// allocation of more than 12GB. Not all the platform can run it. So disable it.
TEST_F(WriteBatchTest, DISABLED_LargeKeyValue) {
// Insert key and value of 3GB and push total batch size to 12GB.
const size_t kKeyValueSize = 3221225472u;
static const size_t kKeyValueSize = 3221225472u;
std::string raw(kKeyValueSize, 'A');
WriteBatch batch(12884901888u + 1024u);
for (char i = 0; i < 2; i++) {

Loading…
Cancel
Save