MCPcopy Create free account
hub / github.com/wal-e/wal-e / test_fault_join

Function test_fault_join

tests/test_tar_upload_pool.py:86–102  ·  view source on GitHub ↗

Test if a fault is detected when .join is used. This case is seen at the end of a series of uploads. NB: This test is critical as to prevent failed uploads from failing to notify a caller that the entire backup is incomplete.

()

Source from the content-addressed store, hash-verified

84
85
86def test_fault_join():
87 """Test if a fault is detected when .join is used.
88
89 This case is seen at the end of a series of uploads.
90
91 NB: This test is critical as to prevent failed uploads from
92 failing to notify a caller that the entire backup is incomplete.
93 """
94 pool = make_pool(1, 1)
95
96 # Set up upload doomed to fail.
97 tpart = FakeTarPartition(1, explosive=Explosion('Boom'))
98 pool.put(tpart)
99
100 # Try to receive the error while finishing up.
101 with pytest.raises(Explosion):
102 pool.join()
103
104
105def test_put_after_join():

Callers

nothing calls this directly

Calls 5

make_poolFunction · 0.85
FakeTarPartitionClass · 0.85
putMethod · 0.80
ExplosionClass · 0.70
joinMethod · 0.45

Tested by

no test coverage detected