Skip to content

Commit

Permalink
test_disk_stats: tolerate used==0 for a Travis worker bug
Browse files Browse the repository at this point in the history
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
  • Loading branch information
warner committed Sep 12, 2014
1 parent 3a75a75 commit 38668c9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/allmydata/test/test_util.py
Expand Up @@ -519,7 +519,8 @@ def test_disk_stats(self):

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'])
Expand Down

0 comments on commit 38668c9

Please sign in to comment.