Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-4445

Labels equality behavior is wrong

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Sprint:
      Mesosphere Sprint 28
    • Story Points:
      5

      Description

      TEST(RevocableResourceTest, LabelSemantics)
      {
        Labels labels1;
        Labels labels2;
      
        labels1.add_labels()->CopyFrom(createLabel("foo", "bar"));
        labels1.add_labels()->CopyFrom(createLabel("foo", "bar"));
      
        labels2.add_labels()->CopyFrom(createLabel("foo", "bar"));
        labels2.add_labels()->CopyFrom(createLabel("baz", "qux"));
      
        bool eq = (labels1 == labels2);
        LOG(INFO) << "Equal? " << (eq ? "true" : "false");
      }
      

      Output:

      [ RUN      ] RevocableResourceTest.LabelSemantics
      I0120 13:15:25.207223 2078158848 resources_tests.cpp:1990] Equal? true
      [       OK ] RevocableResourceTest.LabelSemantics (0 ms)
      

      This behavior seems pretty problematic.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                neilc Neil Conway
                Shepherd:
                Michael Park
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: