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.
()
| 84 | |
| 85 | |
| 86 | def 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 | |
| 105 | def test_put_after_join(): |
nothing calls this directly
no test coverage detected