Commit 04f4072
committed
fix: wipe async test calendars instead of deleting to avoid Nextcloud trashbin slowdown
Calendar.delete() now accepts a wipe parameter (None/True/False tristate):
- True: wipe all objects, keep the calendar itself (never sends HTTP DELETE)
- False: always attempt HTTP DELETE
- None (default): existing auto-detect behaviour (wipe if delete unsupported)
The four async test fixtures (async_calendar, async_task_list, async_calendar2,
async_journal_list) are refactored to use stable cal_ids instead of unique
timestamped names. At fixture teardown, servers where delete-calendar.free-
namespace is not supported (Nextcloud trashbin) now wipe objects via
calendar.delete(wipe=True) rather than HTTP-deleting the calendar.
Root cause of the >1-hour CI runs: each async test created a uniquely-named
calendar and deleted it; on Nextcloud every deletion moves the calendar to the
trashbin. After ~30 async tests, Nextcloud's SQLite database held 30+ trashed
calendars, making every subsequent request from the sync test suite take ~50 s
instead of <1 s. Reusing a single stable calendar per fixture and wiping its
objects keeps the trashbin empty and the database small.
The async_task_list fixture is also simplified: the previous logic that shared
the sync suite's pythoncaldav-test-tasks calendar with Cyrus (to avoid cross-
calendar UID conflicts) is no longer needed because the wipe-at-teardown
guarantees the UID is absent before the sync suite runs.
prompt: the github runs takes more than an hour now. It's not expected to
take more than 15-30 minutes
followup-prompt: Can we wipe the calendar instead of deleting it, and use the
same calendar for all the tests? The delete-function already supports wiping,
but only when the calendar does not support delete. Perhaps the delete-function
could have a wipe-parameter, tristate, False = don't wipe, True = wipe instead
of delete, None => wipe the calendar if deletion is not supported. And then we
should mark up somehow in the feature setup that the tests should wipe nextcloud
rather than delete. Also, why the need of having different logic in the async
and sync? If the sync tests don't need unique calendars, why do the async test
need it?
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
AI Prompts:
claude-sonnet-4-6: the gihub runs takes more than an hour now. It's not expected to take more than 15-30 minutes
claude-sonnet-4-6: Can we wipe the calendar instead of deleting it, and use the same calendar for all the tests? The delete-function already supports wiping, but only when the calendar does not support delete. Perhaps the delete-function could have a wipe-parameter, tristate, False = don't wipe, True = wipe isntead of delete, None => wipe the calendar if deletion is not supported. And then we should mark up somehow in the feature setup that the tests should wipe nextcloud rather than delete. Also, why the need of having different logic in the async and sync? If the sync tests don't need unique calendars, why do the async test need it?
claude-sonnet-4-6: github runs still fail
claude-sonnet-4-6: I think we're on the wrong track here. The caldav-server-tester reports full support for many of the features now set to "unknown"1 parent d09ec45 commit 04f4072
3 files changed
Lines changed: 103 additions & 62 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
15 | 21 | | |
16 | 22 | | |
17 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
786 | 786 | | |
787 | 787 | | |
788 | 788 | | |
789 | | - | |
| 789 | + | |
790 | 790 | | |
791 | 791 | | |
792 | 792 | | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
793 | 801 | | |
794 | 802 | | |
795 | | - | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
796 | 809 | | |
797 | 810 | | |
798 | 811 | | |
799 | 812 | | |
800 | | - | |
| 813 | + | |
| 814 | + | |
801 | 815 | | |
802 | 816 | | |
803 | | - | |
| 817 | + | |
804 | 818 | | |
805 | 819 | | |
806 | 820 | | |
807 | 821 | | |
808 | 822 | | |
809 | | - | |
| 823 | + | |
810 | 824 | | |
811 | 825 | | |
812 | 826 | | |
813 | 827 | | |
814 | 828 | | |
815 | 829 | | |
816 | | - | |
817 | | - | |
| 830 | + | |
| 831 | + | |
818 | 832 | | |
819 | 833 | | |
820 | 834 | | |
821 | | - | |
| 835 | + | |
822 | 836 | | |
823 | 837 | | |
824 | 838 | | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
825 | 844 | | |
826 | | - | |
| 845 | + | |
| 846 | + | |
827 | 847 | | |
828 | 848 | | |
829 | 849 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | | - | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
225 | 230 | | |
226 | 231 | | |
227 | 232 | | |
228 | | - | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
229 | 236 | | |
230 | | - | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
231 | 241 | | |
232 | | - | |
233 | 242 | | |
234 | 243 | | |
235 | 244 | | |
236 | 245 | | |
237 | 246 | | |
238 | 247 | | |
239 | | - | |
240 | 248 | | |
241 | | - | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
242 | 253 | | |
243 | 254 | | |
244 | 255 | | |
245 | 256 | | |
246 | 257 | | |
| 258 | + | |
| 259 | + | |
247 | 260 | | |
248 | 261 | | |
249 | | - | |
250 | | - | |
| 262 | + | |
251 | 263 | | |
252 | 264 | | |
253 | 265 | | |
254 | 266 | | |
| 267 | + | |
| 268 | + | |
255 | 269 | | |
256 | 270 | | |
257 | 271 | | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
270 | 278 | | |
271 | 279 | | |
272 | 280 | | |
273 | 281 | | |
274 | 282 | | |
275 | 283 | | |
276 | | - | |
| 284 | + | |
277 | 285 | | |
278 | 286 | | |
279 | 287 | | |
280 | 288 | | |
281 | 289 | | |
282 | | - | |
283 | 290 | | |
284 | 291 | | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
| 292 | + | |
| 293 | + | |
302 | 294 | | |
303 | 295 | | |
304 | 296 | | |
305 | | - | |
306 | 297 | | |
307 | 298 | | |
308 | 299 | | |
| |||
324 | 315 | | |
325 | 316 | | |
326 | 317 | | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
| 318 | + | |
331 | 319 | | |
332 | 320 | | |
333 | 321 | | |
334 | 322 | | |
| 323 | + | |
| 324 | + | |
335 | 325 | | |
336 | 326 | | |
337 | 327 | | |
338 | | - | |
| 328 | + | |
339 | 329 | | |
340 | 330 | | |
341 | 331 | | |
342 | | - | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
343 | 338 | | |
344 | | - | |
| 339 | + | |
345 | 340 | | |
346 | 341 | | |
347 | 342 | | |
| |||
350 | 345 | | |
351 | 346 | | |
352 | 347 | | |
353 | | - | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
354 | 352 | | |
355 | 353 | | |
356 | 354 | | |
357 | 355 | | |
358 | 356 | | |
| 357 | + | |
| 358 | + | |
359 | 359 | | |
360 | 360 | | |
361 | | - | |
| 361 | + | |
362 | 362 | | |
363 | 363 | | |
364 | 364 | | |
365 | 365 | | |
| 366 | + | |
| 367 | + | |
366 | 368 | | |
367 | 369 | | |
368 | 370 | | |
369 | | - | |
| 371 | + | |
370 | 372 | | |
371 | 373 | | |
372 | 374 | | |
373 | | - | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
374 | 378 | | |
375 | | - | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
376 | 386 | | |
377 | 387 | | |
378 | 388 | | |
| |||
384 | 394 | | |
385 | 395 | | |
386 | 396 | | |
| 397 | + | |
387 | 398 | | |
388 | 399 | | |
389 | 400 | | |
390 | 401 | | |
391 | 402 | | |
392 | 403 | | |
| 404 | + | |
| 405 | + | |
393 | 406 | | |
394 | 407 | | |
395 | | - | |
| 408 | + | |
396 | 409 | | |
397 | 410 | | |
398 | 411 | | |
399 | 412 | | |
| 413 | + | |
| 414 | + | |
400 | 415 | | |
401 | 416 | | |
402 | 417 | | |
| |||
0 commit comments