Test if a previous upload fault is detected in calling .put. This case is seen while pipelining many uploads in excess of the maximum concurrency. NB: This test is critical as to prevent failed uploads from failing to notify a caller that the entire backup is incomplete.
()
| 63 | |
| 64 | |
| 65 | def test_fault_midstream(): |
| 66 | """Test if a previous upload fault is detected in calling .put. |
| 67 | |
| 68 | This case is seen while pipelining many uploads in excess of the |
| 69 | maximum concurrency. |
| 70 | |
| 71 | NB: This test is critical as to prevent failed uploads from |
| 72 | failing to notify a caller that the entire backup is incomplete. |
| 73 | """ |
| 74 | pool = make_pool(1, 1) |
| 75 | |
| 76 | # Set up upload doomed to fail. |
| 77 | tpart = FakeTarPartition(1, explosive=Explosion('Boom')) |
| 78 | pool.put(tpart) |
| 79 | |
| 80 | # Try to receive the error through adding another upload. |
| 81 | tpart = FakeTarPartition(1) |
| 82 | with pytest.raises(Explosion): |
| 83 | pool.put(tpart) |
| 84 | |
| 85 | |
| 86 | def test_fault_join(): |
nothing calls this directly
no test coverage detected