Uploaded image for project: 'Apache NiFi MiNiFi C++'
  1. Apache NiFi MiNiFi C++
  2. MINIFICPP-1931

ResourceQueueTests fails occasionally

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 0.13.0
    • None

    Description

      As of 2022-08-29, on the main branch,

      ctest --repeat-until-fail 100 -R ResourceQueueTests
      

      fails every time I run it, sometimes on the 5th run, sometimes after more than 30.

      This was the failing test case in all 3 times I checked:

      -------------------------------------------------------------------------------
      maximum_number_of_creatable_resources
        Maximum 2 resources
      -------------------------------------------------------------------------------
      /home/fgerlits/src/minifi2/libminifi/test/unit/ResourceQueueTests.cpp:43
      ...............................................................................
      
      /home/fgerlits/src/minifi2/libminifi/test/unit/ResourceQueueTests.cpp:54: FAILED:
        CHECK( resources_created.size() <= 2 )
      with expansion:
        3 <= 2
      

      I suspect the problem is with the test, not with the class under test, as the logs look healthy:

      [2022-08-29 14:05:13.590] [LogTestController] [info] Setting log level for org::apache::nifi::minifi::utils::ResourceQueue<int> to trace
      [2022-08-29 14:05:13.590] [org::apache::nifi::minifi::utils::ResourceQueue<int>] [debug] Created new [0x7f3a90000b60] resource instance. Num
      ber of instances: 1 / 2.
      [2022-08-29 14:05:13.590] [org::apache::nifi::minifi::utils::ResourceQueue<int>] [debug] Created new [0x7f3a88000b60] resource instance. Num
      ber of instances: 2 / 2.
      [2022-08-29 14:05:13.590] [org::apache::nifi::minifi::utils::ResourceQueue<int>] [debug] Waiting for resource
      [2022-08-29 14:05:13.600] [org::apache::nifi::minifi::utils::ResourceQueue<int>] [debug] Returning [0x7f3a90000b60] resource
      [2022-08-29 14:05:13.601] [org::apache::nifi::minifi::utils::ResourceQueue<int>] [debug] Returning [0x7f3a88000b60] resource
      [2022-08-29 14:05:13.611] [org::apache::nifi::minifi::utils::ResourceQueue<int>] [debug] Returning [0x7f3a90000b60] resource
      

      Attachments

        Activity

          People

            lordgamez Gábor Gyimesi
            fgerlits Ferenc Gerlits
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h 50m
                1h 50m