[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [stem/master] Dropping the memory usage assertion when reading descriptors



commit bc155d6ee800c1741fb7b1b7780cf696217115f4
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Mon Mar 18 14:00:45 2013 -0700

    Dropping the memory usage assertion when reading descriptors
    
    Our integ test for reading descriptors tries to check that we aren't consuming
    gobs of memory. Unfortunately this assertion seems to be platform dependent (it
    fails on OSX) so dropping the assertion. Yea, yea, I should be fixing it but we
    haven't had this issue for a very long while and it isn't likely to reoccure.
---
 test/integ/descriptor/networkstatus.py |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/test/integ/descriptor/networkstatus.py b/test/integ/descriptor/networkstatus.py
index 6bfd137..31378fa 100644
--- a/test/integ/descriptor/networkstatus.py
+++ b/test/integ/descriptor/networkstatus.py
@@ -6,7 +6,6 @@ from __future__ import with_statement
 
 import datetime
 import os
-import resource
 import unittest
 
 import stem
@@ -46,10 +45,6 @@ class TestNetworkStatus(unittest.TestCase):
       for router in stem.descriptor.parse_file(descriptor_file, "network-status-consensus-3 1.0"):
         count += 1
 
-        # We should have constant memory usage. Fail if we're using over 200 MB.
-        if resource.getrusage(resource.RUSAGE_SELF).ru_maxrss > 200000:
-          self.fail()
-
         # check if there's any unknown flags
         # TODO: this should be a 'new capability' check later rather than
         # failing the tests
@@ -91,9 +86,6 @@ class TestNetworkStatus(unittest.TestCase):
       for router in stem.descriptor.parse_file(descriptor_file, "network-status-microdesc-consensus-3 1.0"):
         count += 1
 
-        if resource.getrusage(resource.RUSAGE_SELF).ru_maxrss > 200000:
-          self.fail()
-
         # check if there's any unknown flags
         # TODO: this should be a 'new capability' check later rather than
         # failing the tests

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits