Commit 2cd82c3
Add tests for LAZY indexing mode in Cosmos Java SDK (#48024)
* Initial plan
* Add tests for LAZY indexing mode
Added three new test methods to CollectionCrudTest:
- createCollectionWithLazyIndexing: Tests creating a collection with LAZY indexing mode
- readCollectionWithLazyIndexing: Tests reading a collection with LAZY indexing mode
- replaceCollectionWithLazyIndexing: Tests replacing indexing mode from CONSISTENT to LAZY
These tests follow the same patterns as existing CONSISTENT mode tests and verify that LAZY indexing mode is properly supported in the Cosmos Java SDK.
Co-authored-by: kushagraThapar <14034156+kushagraThapar@users.noreply.github.com>
* Fix LAZY indexing mode tests - validate server conversion to CONSISTENT
LAZY indexing mode has been deprecated in Azure Cosmos DB and is automatically
converted to CONSISTENT mode by the server. Updated all three test methods to:
1. Set indexing mode to LAZY (to test the API accepts it)
2. Validate that the server converts it to CONSISTENT (expected behavior)
3. Added comments explaining the deprecation and conversion behavior
This fixes the CI test failures where tests were expecting LAZY but receiving CONSISTENT.
Co-authored-by: kushagraThapar <14034156+kushagraThapar@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kushagraThapar <14034156+kushagraThapar@users.noreply.github.com>
Co-authored-by: Kushagra Thapar <kuthapar@microsoft.com>1 parent d3f381d commit 2cd82c3
1 file changed
Lines changed: 71 additions & 0 deletions
Lines changed: 71 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
292 | 363 | | |
293 | 364 | | |
294 | 365 | | |
| |||
0 commit comments