Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-1718

Incorrect check in TFileTransportTest

    XMLWordPrintableJSON

Details

    • Test
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.8
    • 0.9
    • C++ - Library
    • None
    • Patch Available

    Description

      TFileTransport:282, comment says:

      " // Make sure TFileTransport called fsync at least once"

      However, the test checks for greater than, resulting in failures.

      This diff brings the check in line with the comment and fixes the failing tests:

      --- lib/cpp/test/TFileTransportTest.cpp
      +++ lib/cpp/test/TFileTransportTest.cpp
      @@ -278,7 +278,7 @@ void test_flush_max_us_impl(uint32_t flush_us, uint32_t write_us,
         const FsyncLog::CallList* calls = log.getCalls();
         // We added 1 fsync call above.
         // Make sure TFileTransport called fsync at least once
      -  BOOST_CHECK_GT(calls->size(),
      +  BOOST_CHECK_GE(calls->size(),
                        static_cast<FsyncLog::CallList::size_type>(1));
       
         const struct timeval* prev_time = NULL;
      

      Attachments

        1. THRIFT-1718.patch
          0.6 kB
          Diwaker Gupta

        Activity

          People

            diwaker Diwaker Gupta
            diwaker Diwaker Gupta
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: