You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by tm...@apache.org on 2013/08/19 19:02:14 UTC
git commit: Fixed a bug in the implemntation of the Value::Set <=
operator.
Updated Branches:
refs/heads/master c291838d2 -> 604fbdac0
Fixed a bug in the implemntation of the Value::Set <= operator.
Review: https://reviews.apache.org/r/13629/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/604fbdac
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/604fbdac
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/604fbdac
Branch: refs/heads/master
Commit: 604fbdac046e17951620bfd8db6af5f8ade3525c
Parents: c291838
Author: Thomas Marshall <tw...@gmail.com>
Authored: Mon Aug 19 13:01:07 2013 -0400
Committer: Thomas Marshall <tw...@gmail.com>
Committed: Mon Aug 19 13:01:07 2013 -0400
----------------------------------------------------------------------
src/common/values.cpp | 2 +-
src/tests/resources_tests.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/604fbdac/src/common/values.cpp
----------------------------------------------------------------------
diff --git a/src/common/values.cpp b/src/common/values.cpp
index 019657e..ce26119 100644
--- a/src/common/values.cpp
+++ b/src/common/values.cpp
@@ -466,7 +466,7 @@ bool operator <= (const Value::Set& left, const Value::Set& right)
// Make sure this item is equal to an item in the right.
bool found = false;
for (int j = 0; j < right.item_size(); j++) {
- if (left.item(i) == right.item(i)) {
+ if (left.item(i) == right.item(j)) {
found = true;
break;
}
http://git-wip-us.apache.org/repos/asf/mesos/blob/604fbdac/src/tests/resources_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/resources_tests.cpp b/src/tests/resources_tests.cpp
index 02d474b..964a1b6 100644
--- a/src/tests/resources_tests.cpp
+++ b/src/tests/resources_tests.cpp
@@ -659,7 +659,7 @@ TEST(ResourcesTest, SetEquals)
TEST(ResourcesTest, SetSubset)
{
Resource disks1 = Resources::parse("disks", "{sda1,sda2}", "*").get();
- Resource disks2 = Resources::parse("disks", "{sda1,sda2,sda3,sda4}", "*").get();
+ Resource disks2 = Resources::parse("disks", "{sda1,sda3,sda4,sda2}", "*").get();
Resources r1;
r1 += disks1;