|
21 | 21 | from durabletask import client, task, worker |
22 | 22 | from durabletask.extensions.history_export import ( |
23 | 23 | AsyncExportHistoryClient, |
| 24 | + AsyncExportHistoryJobClient, |
24 | 25 | ExportDestination, |
25 | 26 | ExportFormat, |
26 | 27 | ExportFormatKind, |
@@ -164,16 +165,21 @@ async def test_async_client_create_list_wait_and_delete( |
164 | 165 | format=ExportFormat(kind=ExportFormatKind.JSON), |
165 | 166 | )) |
166 | 167 |
|
167 | | - final = await export_client.wait_for_job( |
168 | | - desc.job_id, timeout=30, poll_interval=0.1) |
| 168 | + job_client = export_client.get_job_client(desc.job_id) |
| 169 | + assert isinstance(job_client, AsyncExportHistoryJobClient) |
| 170 | + assert job_client.job_id == desc.job_id |
| 171 | + assert job_client.orchestrator_instance_id == orchestrator_instance_id_for( |
| 172 | + desc.job_id) |
| 173 | + |
| 174 | + final = await job_client.wait(timeout=30, poll_interval=0.1) |
169 | 175 | assert final.status == ExportJobStatus.COMPLETED |
170 | | - assert (await export_client.get_job(desc.job_id)) is not None |
| 176 | + assert (await job_client.describe()) is not None |
171 | 177 | assert desc.job_id in { |
172 | 178 | job.job_id async for job in export_client.list_jobs() |
173 | 179 | } |
174 | 180 |
|
175 | | - await export_client.delete_job(desc.job_id) |
176 | | - assert await export_client.get_job(desc.job_id) is None |
| 181 | + await job_client.delete() |
| 182 | + assert await job_client.describe() is None |
177 | 183 |
|
178 | 184 |
|
179 | 185 | async def test_async_client_get_job_returns_none_for_empty_state(writer): |
|
0 commit comments