From: Brian Warner Date: Fri, 12 Sep 2014 19:55:52 +0000 (-0700) Subject: test_disk_stats: tolerate used==0 for a Travis worker bug X-Git-Tag: allmydata-tahoe-1.10.1a1~135 X-Git-Url: https://git.rkrishnan.org/pf/components/com_hotproperty/-?a=commitdiff_plain;h=38668c9e35a9f27123f05d3726e12263248996e6;p=tahoe-lafs%2Ftahoe-lafs.git test_disk_stats: tolerate used==0 for a Travis worker bug Some Travis-CI workers report persistently empty disks, causing spurious test failures. It's not really that important to assert used>0, so this relaxes the test. Closes ticket:2290 --- diff --git a/src/allmydata/test/test_util.py b/src/allmydata/test/test_util.py index b527771d..2a5ba199 100644 --- a/src/allmydata/test/test_util.py +++ b/src/allmydata/test/test_util.py @@ -519,7 +519,8 @@ class FileUtil(unittest.TestCase): disk = fileutil.get_disk_stats('.', 2**13) self.failUnless(disk['total'] > 0, disk['total']) - self.failUnless(disk['used'] > 0, disk['used']) + # we tolerate used==0 for a Travis-CI bug, see #2290 + self.failUnless(disk['used'] >= 0, disk['used']) self.failUnless(disk['free_for_root'] > 0, disk['free_for_root']) self.failUnless(disk['free_for_nonroot'] > 0, disk['free_for_nonroot']) self.failUnless(disk['avail'] > 0, disk['avail'])