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

`EPStoreEvictionTest.GetKeyStatsEjected` incorrectly compares strings as ptrs

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 4.5.1
    • 4.5.1
    • couchbase-bucket
    • None
    • Untriaged
    • Unknown

    Description

      As seen in nightly coverage testing, test EPStoreEvictionTest.GetKeyStatsEjected fails on some environments / configurations as it is incorrectly comparing arguments as char* instead of std::string. As a consequence it only passes if the compiler performs a string literal optimisation:

      [ RUN      ] FullAndValueEviction/EPStoreEvictionTest.GetKeyStatsEjected/0
      /home/couchbase/jenkins/workspace/memcached-nightly-coverage-watson/ep-engine/tests/module_tests/evp_store_test.cc:190: Failure
      Value of: msg
      Actual: 0x80d9b0
      Expected: "Ejected."
      Which is: 0x801bd3
      [  FAILED  ] FullAndValueEviction/EPStoreEvictionTest.GetKeyStatsEjected/0, where GetParam() = "value_only" (76 ms)
      

      Instead we should ensure they are compared as std::string

      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)
              drigby Dave Rigby (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty