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

Function test_multi_explicit_fail

tests/test_wal_transfer.py:137–155  ·  view source on GitHub ↗

Model a failure of the explicit segment under concurrency.

()

Source from the content-addressed store, hash-verified

135
136
137def test_multi_explicit_fail():
138 """Model a failure of the explicit segment under concurrency."""
139 group = worker.WalTransferGroup(FakeWalUploader())
140 segments = list(prepare_multi_upload_segments())
141
142 exp = Explosion('fail')
143 segments[0]._upload_explosive = exp
144
145 for seg in segments:
146 group.start(seg)
147
148 with pytest.raises(Explosion) as e:
149 group.join()
150
151 assert e.value is exp
152 assert failed(segments[0])
153
154 for seg in segments[1:]:
155 assert success(seg)
156
157
158def test_multi_pipeline_fail():

Callers

nothing calls this directly

Calls 7

startMethod · 0.95
joinMethod · 0.95
FakeWalUploaderClass · 0.85
failedFunction · 0.85
successFunction · 0.85
ExplosionClass · 0.70

Tested by

no test coverage detected