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

Use checkeq instead of creating a boolean expr when using check()

    XMLWordPrintable

Details

    Description

      The test suite use a lot of:

      check(last_status == cb::mcbp::Status::Success, "failed to blah blah"); 

      If the test fails the error message is the non-informative:

      Test failed: `failed to blah blah' (last_status == cb::mcbp::Status::Success)

      Instead the code should be using checkeq which is called like:

      checkeq(cb::mcbp::Status::Success, last_status.load(), "failed to blah blah"); 

      This would print out the actual value of last status when the tests fail so that we can figure what went wrong.

       

       

      Attachments

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

        Activity

          People

            trond Trond Norbye
            trond Trond Norbye
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              PagerDuty