So I got access to affected host and was able to reproduce it there. Spent some time debugging it and unfortunately I am still clueless why this is happening.
Found out that it doesn't matter if eatmydata is used or not, test is occasionally failing in both cases. I tried my patch and it didn't help - even when I raised the sleep to 5 seconds or call coll.update_db() multiple times it's failing with the same error. ICS file seems to be correctly written on disk: File: '/tmp/pytest-of-filip/pytest-63/test_default_calendar1/foobar/0c9c883e-21a7-447b-b218-54f7e667aa87.ics' Size: 282 Blocks: 8 IO Block: 4096 regular file Device: fe01h/65025d Inode: 516304 Links: 1 Access: (0600/-rw-------) Uid: ( 1000/ filip) Gid: ( 1000/ filip) Access: 2016-11-23 22:29:28.086145354 +0000 Modify: 2016-11-23 22:29:28.086145354 +0000 Change: 2016-11-23 22:29:28.086145354 +0000 Birth: - Any ideas how to debug this or what more to try? Filip
signature.asc
Description: Digital signature