Commit 96e2612
OpenAI.HttpClient to Azure.HttpClient mapper for test instrumentation (#47416)
* Porting over changes from private repo
* formatting
* Update sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/http/OpenAiRequestUrlBuilder.java
Co-authored-by: Copilot <[email protected]>
* Update sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/http/PolicyDecoratingHttpClient.java
Co-authored-by: Copilot <[email protected]>
* Formatting mismatch
* Add async and error propagation test coverage for PolicyDecoratingHttpClient (#47429)
* Initial plan
* Add async and error propagation test coverage for PolicyDecoratingHttpClient
Co-authored-by: jpalvarezl <[email protected]>
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: jpalvarezl <[email protected]>
Co-authored-by: Jose Alvarez <[email protected]>
* Add error handling tests for HttpClientHelper (#47428)
* Initial plan
* Add error handling tests for HttpClientHelper
Added comprehensive error handling test cases including:
- Null request body handling
- IOException during body buffering
- Malformed URLs
- Async execution failures
Co-authored-by: jpalvarezl <[email protected]>
* Address code review feedback on error handling tests
- Simplify FailingHttpRequestBody to directly throw UncheckedIOException
- Improve assertion clarity in body buffering test
- Remove fragile message checking in malformed URL test
Co-authored-by: jpalvarezl <[email protected]>
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: jpalvarezl <[email protected]>
Co-authored-by: Jose Alvarez <[email protected]>
* Merged and improved assertions
* More PR feedback
* More PR feedback
* More PR feedback
* lazy mapping of types for the AzureHttpResponseAdapter
* Simplified mapping
* Always using default httpPipeline
* Using bare minimum code
* WIP: removing redundant code. Using default httpPipeline
* fix async tests
* Code style checks
* Added recording for async test
* Enabled sync tests and update assets
* Updated test suite and restored value for context config
* Using latest version of azure-core-test
* Forwarding request timeout and adding more custom machters for tests
* reassign addData result
* WIP: timeout tests
* Timeout tests are run only in Live test mode
* Test asset update
* Exceptions are allowed to propagate upwards
* Error mapping in place
* reformat
* Format
* Fixed timeout tests
* PR feedback 1st round
* PR feedback round 2: pom updates
* dependency tag fixed and disabled test
* Disabled flacky timeout tests
* Disabled one more test
---------
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: jpalvarezl <[email protected]>
Co-authored-by: Srikanta <[email protected]>1 parent 70079af commit 96e2612
File tree
12 files changed
+856
-27
lines changed- eng/versioning
- sdk
- agrifood/azure-verticals-agrifood-farming
- ai/azure-ai-agents
- src
- main/java/com/azure/ai/agents
- implementation/http
- test/java/com/azure/ai/agents
- implementation/http
12 files changed
+856
-27
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
547 | 547 | | |
548 | 548 | | |
549 | 549 | | |
| 550 | + | |
550 | 551 | | |
551 | 552 | | |
552 | 553 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
107 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
79 | 85 | | |
80 | 86 | | |
81 | 87 | | |
| |||
Lines changed: 18 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | | - | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
331 | | - | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
332 | 334 | | |
333 | 335 | | |
334 | 336 | | |
| |||
337 | 339 | | |
338 | 340 | | |
339 | 341 | | |
340 | | - | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
341 | 345 | | |
342 | 346 | | |
343 | 347 | | |
| |||
346 | 350 | | |
347 | 351 | | |
348 | 352 | | |
349 | | - | |
350 | | - | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
351 | 356 | | |
352 | 357 | | |
353 | 358 | | |
| |||
356 | 361 | | |
357 | 362 | | |
358 | 363 | | |
359 | | - | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
360 | 367 | | |
361 | 368 | | |
362 | 369 | | |
363 | 370 | | |
364 | 371 | | |
365 | 372 | | |
366 | 373 | | |
367 | | - | |
368 | 374 | | |
369 | 375 | | |
370 | 376 | | |
371 | 377 | | |
372 | | - | |
| 378 | + | |
| 379 | + | |
373 | 380 | | |
374 | 381 | | |
375 | 382 | | |
| |||
378 | 385 | | |
379 | 386 | | |
380 | 387 | | |
381 | | - | |
382 | 388 | | |
383 | 389 | | |
384 | 390 | | |
385 | 391 | | |
386 | | - | |
| 392 | + | |
| 393 | + | |
387 | 394 | | |
388 | 395 | | |
389 | 396 | | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | 397 | | |
400 | 398 | | |
401 | 399 | | |
| |||
Lines changed: 63 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
0 commit comments