Fix the error in ColumnFamiliesTest

Summary:
In the test the last change to AAAZZZ in handles[1] is deleting it. The
result of the get must be NotFound then. Previosuly the test did not
check for the return value of Get and assumed that the status is ok. It
then move ahead asserting the returned value. The passed-by-reference
string value however was not changed (since the key was not found) and
the asserted value is what it contained before doing the Get.
Closes https://github.com/facebook/rocksdb/pull/1753

Differential Revision: D4390982

Pulled By: maysamyabandeh

fbshipit-source-id: dd55a34
main
Maysam Yabandeh 8 years ago committed by Facebook Github Bot
parent 7a02ad070f
commit 7631734563
  1. 3
      utilities/transactions/transaction_test.cc

@ -2033,8 +2033,9 @@ TEST_P(TransactionTest, ColumnFamiliesTest) {
s = txn2->Commit();
ASSERT_OK(s);
// In the above the latest change to AAAZZZ in handles[1] is delete.
s = db->Get(read_options, handles[1], "AAAZZZ", &value);
ASSERT_EQ(value, "barbar");
ASSERT_TRUE(s.IsNotFound());
delete txn;
delete txn2;

Loading…
Cancel
Save