Model a case with upload concurrency.
()
| 103 | |
| 104 | |
| 105 | def test_multi_upload(): |
| 106 | """Model a case with upload concurrency.""" |
| 107 | group = worker.WalTransferGroup(FakeWalUploader()) |
| 108 | segments = list(prepare_multi_upload_segments()) |
| 109 | |
| 110 | # "Start" fake uploads |
| 111 | for seg in segments: |
| 112 | group.start(seg) |
| 113 | |
| 114 | group.join() |
| 115 | |
| 116 | # Check invariants on the non-explicit segments. |
| 117 | for seg in segments: |
| 118 | assert success(seg) |
| 119 | |
| 120 | |
| 121 | def test_simple_fail(): |
nothing calls this directly
no test coverage detected