Uploaded image for project: 'Aurora'
  1. Aurora
  2. AURORA-916

test_inotify_diskcollector is flaky

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.8.0
    • Technical Debt, Testing, Thermos
    • None

    Description

      Test has failed 2x lately:

      @pytest.mark.skipif("sys.platform == 'darwin'")
          def test_inotify_diskcollector():
            target = safe_mkdtemp()
            INTERVAL = Amount(50, Time.MILLISECONDS)
            collector = InotifyDiskCollector(target)
            collector._thread.COLLECTION_INTERVAL = INTERVAL
          
            def wait():
              time.sleep((2 * INTERVAL).as_(Time.SECONDS))
          
      >     _run_collector_tests(collector, target, wait)
      
      src/test/python/apache/thermos/monitoring/test_disk.py:79: 
      _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
      
      collector = <apache.thermos.monitoring.disk.InotifyDiskCollector object at 0x7fb3fbd31f90>
      target = '/tmp/tmpoUxGR5', wait = <function wait at 0x7fb3fbd2a488>
      
          def _run_collector_tests(collector, target, wait):
            assert collector.value == 0
          
            collector.sample()
            wait()
            assert collector.value == 0
          
            f1 = make_file(TEST_AMOUNT_1, dir=target)
            wait()
      >     assert collector.value >= TEST_AMOUNT_1.as_(Data.BYTES)
      E     assert 9728000 >= 104857600.0
      E      +  where 9728000 = <apache.thermos.monitoring.disk.InotifyDiskCollector object at 0x7fb3fbd31f90>.value
      E      +  and   104857600.0 = <bound method Amount.as_ of Amount(100, MB)>(<twitter.common.quantity.Data object at 0x7fb3fb789a90>)
      E      +    where <bound method Amount.as_ of Amount(100, MB)> = Amount(100, MB).as_
      E      +    and   <twitter.common.quantity.Data object at 0x7fb3fb789a90> = Data.BYTES
      
      src/test/python/apache/thermos/monitoring/test_disk.py:46: AssertionError
      
      @pytest.mark.skipif("sys.platform == 'darwin'")
          def test_inotify_diskcollector():
            target = safe_mkdtemp()
            INTERVAL = Amount(50, Time.MILLISECONDS)
            collector = InotifyDiskCollector(target)
            collector._thread.COLLECTION_INTERVAL = INTERVAL
          
            def wait():
              time.sleep((2 * INTERVAL).as_(Time.SECONDS))
          
      >     _run_collector_tests(collector, target, wait)
      
      src/test/python/apache/thermos/monitoring/test_disk.py:79: 
      _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
      
      collector = <apache.thermos.monitoring.disk.InotifyDiskCollector object at 0x7f3b46fc3f10>
      target = '/tmp/tmpiGReNC', wait = <function wait at 0x7f3b46fbc488>
      
          def _run_collector_tests(collector, target, wait):
            assert collector.value == 0
          
            collector.sample()
            wait()
            assert collector.value == 0
          
            f1 = make_file(TEST_AMOUNT_1, dir=target)
            wait()
      >     assert collector.value >= TEST_AMOUNT_1.as_(Data.BYTES)
      E     assert 41123840 >= 104857600.0
      E      +  where 41123840 = <apache.thermos.monitoring.disk.InotifyDiskCollector object at 0x7f3b46fc3f10>.value
      E      +  and   104857600.0 = <bound method Amount.as_ of Amount(100, MB)>(<twitter.common.quantity.Data object at 0x7f3b46a1fa90>)
      E      +    where <bound method Amount.as_ of Amount(100, MB)> = Amount(100, MB).as_
      E      +    and   <twitter.common.quantity.Data object at 0x7f3b46a1fa90> = Data.BYTES
      
      src/test/python/apache/thermos/monitoring/test_disk.py:46: AssertionError
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            wfarner Bill Farner
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: