You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by to...@apache.org on 2016/08/02 17:59:37 UTC

kudu git commit: ksck-test: fix failure on OSX

Repository: kudu
Updated Branches:
  refs/heads/master 085ceab3e -> fee3f672b


ksck-test: fix failure on OSX

We previously relied on deleting the 'first' element of an unordered_map to set
up a test case. This is platform-dependent and gave a different output on OSX.
Fixed it to delete an explicit entry.

Change-Id: I4361ff48faf0ffcea86f320433514763f3b77266
Reviewed-on: http://gerrit.cloudera.org:8080/3734
Tested-by: Kudu Jenkins
Reviewed-by: Todd Lipcon <to...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/fee3f672
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/fee3f672
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/fee3f672

Branch: refs/heads/master
Commit: fee3f672b17c381a0802d2f0a9fd74c772a5ee92
Parents: 085ceab
Author: Todd Lipcon <to...@apache.org>
Authored: Sun Jul 24 09:59:51 2016 -0700
Committer: Todd Lipcon <to...@apache.org>
Committed: Tue Aug 2 17:44:28 2016 +0000

----------------------------------------------------------------------
 src/kudu/tools/ksck-test.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/fee3f672/src/kudu/tools/ksck-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tools/ksck-test.cc b/src/kudu/tools/ksck-test.cc
index 279940d..1a7a040 100644
--- a/src/kudu/tools/ksck-test.cc
+++ b/src/kudu/tools/ksck-test.cc
@@ -372,7 +372,7 @@ TEST_F(KsckTest, TestMismatchedAssignments) {
   CreateOneSmallReplicatedTable();
   shared_ptr<MockKsckTabletServer> ts = static_pointer_cast<MockKsckTabletServer>(
       master_->tablet_servers_.at(Substitute("ts-id-$0", 0)));
-  ts->tablet_status_map_.erase(ts->tablet_status_map_.begin()->first);
+  ASSERT_EQ(1, ts->tablet_status_map_.erase("tablet-id-2"));
 
   Status s = RunKsck();
   EXPECT_EQ("Corruption: 1 table(s) are bad", s.ToString());