[tor-commits] [bridgedb/master] Skip testDiscountAndPruneBridgeHistory() unittest in travis CI.

isis at torproject.org isis at torproject.org
Sun Jan 12 06:06:35 UTC 2014


commit 5bbe2290025f6766ae03c1cea4ff3ccffcbcf7a3
Author: Isis Lovecruft <isis at torproject.org>
Date:   Fri Dec 20 08:24:53 2013 +0000

    Skip testDiscountAndPruneBridgeHistory() unittest in travis CI.
---
 .travis.yml           |   14 +++++---------
 lib/bridgedb/Tests.py |    7 +++++--
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index fd1f287..d4f86c2 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -27,22 +27,18 @@ python:
   - "2.6"
   - "2.7"
 
-#services:
-#  - couchdb
-
 install:
   - pip install -r requirements.txt --use-mirrors
   - pip install coverage==3.7 coveralls==0.3 sure==1.2.2 --use-mirrors
   - make install
 
-#before_script:
-#  # For testing with CouchDB
-#  - curl -X PUT localhost:5984/myapp_test
+env:
+  - TRAVIS_CI=true
 
-script:
+before_script:
   - bridgedb mock -n 250
-  # Normally, we would do 'bridgedb test' here, but to run with coverage we
-  # have to do this instead:
+
+script:
   - coverage run $(which trial) ./lib/bridgedb/test/test_*.py
   - coverage report
 
diff --git a/lib/bridgedb/Tests.py b/lib/bridgedb/Tests.py
index 52040e0..c1b531c 100644
--- a/lib/bridgedb/Tests.py
+++ b/lib/bridgedb/Tests.py
@@ -757,13 +757,16 @@ class BridgeStabilityTests(unittest.TestCase):
 
     def testDiscountAndPruneBridgeHistory(self):
         """ Test pruning of old Bridge History """
+        if os.environ.get('TRAVIS_CI'):
+            unittest.skip("Hangs on Travis-CI.")
+            
         db = self.db
 
         # make a bunch of bridges
         num_bridges = 20
         time_start = time.time()
-        bridges = [ random.choice([fakeBridge, fakeBridge6])() \
-                for i in xrange(num_bridges) ]
+        bridges = [random.choice([fakeBridge, fakeBridge6])()
+                   for i in xrange(num_bridges)]
 
         # run some of the bridges for the full time series
         running = bridges[:num_bridges/2]





More information about the tor-commits mailing list