Skip to content

Instantly share code, notes, and snippets.

@clayg
Created December 2, 2016 01:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clayg/079c06db0f980b478add8fcb90d9ca0c to your computer and use it in GitHub Desktop.
Save clayg/079c06db0f980b478add8fcb90d9ca0c to your computer and use it in GitHub Desktop.
diff --git a/test/test_pyeclib_api.py b/test/test_pyeclib_api.py
index e50758a..aae6504 100644
--- a/test/test_pyeclib_api.py
+++ b/test/test_pyeclib_api.py
@@ -724,11 +724,11 @@ class TestPyECLibDriver(unittest.TestCase):
for x in loop_range:
ec_driver.get_metadata(encoded[0], formatted=True)
- # 4. memory usage shouldn't increase
- new_usage = resource.getrusage(resource.RUSAGE_SELF)[2]
- self.assertEqual(baseline_usage, new_usage,
- 'Memory usage is increased unexpectedly %s -> %s' %
- (baseline_usage, new_usage))
+ # 4. memory usage shouldn't increase
+ new_usage = resource.getrusage(resource.RUSAGE_SELF)[2]
+ self.assertEqual(baseline_usage, new_usage,
+ 'Memory usage is increased unexpectedly %s -> %s (iteration %s)' %
+ (baseline_usage, new_usage, x))
if __name__ == '__main__':
# it's always have 100's of iterations
ubuntu@saio:/vagrant/pyeclib$ nosetests test/test_pyeclib_api.py:TestPyECLibDriver.test_get_metadata_memory_usage
F
======================================================================
FAIL: test_get_metadata_memory_usage (test.test_pyeclib_api.TestPyECLibDriver)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/vagrant/pyeclib/test/test_pyeclib_api.py", line 712, in test_get_metadata_memory_usage
self._test_get_metadata_memory_usage(ec_driver)
File "/vagrant/pyeclib/test/test_pyeclib_api.py", line 731, in _test_get_metadata_memory_usage
(baseline_usage, new_usage, x))
AssertionError: Memory usage is increased unexpectedly 28752 -> 29044 (iteration 932)
-------------------- >> begin captured logging << --------------------
pyeclib: WARNING: DEPRECATED WARNING: your liberasurecode 1.2.0 will be deprecated in the near future because of the issue https://bugs.launchpad.net/swift/+bug/1639691; Please upgrade to >=1.3.1 and rebuild pyeclib to suppress this message
--------------------- >> end captured logging << ---------------------
----------------------------------------------------------------------
Ran 1 test in 0.082s
FAILED (failures=1)
ubuntu@saio:/vagrant/pyeclib$ nosetests test/test_pyeclib_api.py:TestPyECLibDriver.test_get_metadata_memory_usage
F
======================================================================
FAIL: test_get_metadata_memory_usage (test.test_pyeclib_api.TestPyECLibDriver)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/vagrant/pyeclib/test/test_pyeclib_api.py", line 712, in test_get_metadata_memory_usage
self._test_get_metadata_memory_usage(ec_driver)
File "/vagrant/pyeclib/test/test_pyeclib_api.py", line 731, in _test_get_metadata_memory_usage
(baseline_usage, new_usage, x))
AssertionError: Memory usage is increased unexpectedly 28764 -> 29052 (iteration 804)
-------------------- >> begin captured logging << --------------------
pyeclib: WARNING: DEPRECATED WARNING: your liberasurecode 1.2.0 will be deprecated in the near future because of the issue https://bugs.launchpad.net/swift/+bug/1639691; Please upgrade to >=1.3.1 and rebuild pyeclib to suppress this message
--------------------- >> end captured logging << ---------------------
----------------------------------------------------------------------
Ran 1 test in 0.074s
FAILED (failures=1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment