Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-20308

EPStoreEvictionTest tests fail when ep-engine is built as debug

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Minor
    • .master
    • .master
    • couchbase-bucket
    • None
    • Untriaged
    • Unknown

    Description

      An example from the nightly kv-engine coverage build which gets built at debug:

      [ RUN      ] FullAndValueEviction/EPStoreEvictionTest.AddEExists/value_only
      /home/couchbase/jenkins/workspace/memcached-nightly-coverage/ep-engine/tests/module_tests/evp_store_test.cc:181: Failure
      Value of: msg
        Actual: 0x886cf8
      Expected: "Ejected."
      Which is: 0x87751c
      

      void EventuallyPersistentStoreTest::evict_key(uint16_t vbid,
                                                    const std::string& key) {
          const char* msg;
          size_t msg_size{sizeof(msg)};
          EXPECT_EQ(ENGINE_SUCCESS, store->evictKey(key, vbid, &msg, &msg_size));
          EXPECT_EQ("Ejected.", msg);
      }
      

      I suspect that when ep-engine is built as debug the strings don't get interned which results in them having different pointer values. This simply requires EXPECT_STREQ instead of EXPECT_EQ (Possibly worth checking other code for similar issues).

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              drigby Dave Rigby (Inactive)
              will.gardner Will Gardner (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty