On 2016/11/23 18:54, Adrian Bunk wrote: > Control: severity -1 serious > Control: tags -1 -moreinfo > > On Sun, Nov 20, 2016 at 10:03:04AM +0100, Filip Pytloun wrote: > >... > > Unfortunately running tests during build is always fragile and it seems > > that what's working in one environment may be FTBFS for anyone else :-( > >... > > Running tests during build is only fragile when the tests > (or the code they test) are crap. >
I agree but still I think it's more important to pass Debian's CI and reproducible tests than infinite number of environments that people may use. That's the reason why lowering the priority down from serious (maybe to important instead of normal) to avoid autoremoval. Moreover that I am not able to reproduce the issue and therefore verify that fix or workaround will solve it. > If no, please at least enlarge the sleep time by a factor of 10 to > ensure that this won't be observed by anyone in practice. I have done the patch but as I can't reproduce the issue, I can't verify it will workaround it. Santiago, can you please test build with attached patch?
From 5ae83765f03b4a05bdccbe0f88df15ac586c4ef5 Mon Sep 17 00:00:00 2001 From: Filip Pytloun <fi...@pytloun.cz> Date: Wed, 23 Nov 2016 18:16:10 +0100 Subject: [PATCH] Raise sleep to ensure db update will get written --- tests/khalendar_test.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/khalendar_test.py b/tests/khalendar_test.py index fd8dcc6..560abdd 100644 --- a/tests/khalendar_test.py +++ b/tests/khalendar_test.py @@ -74,7 +74,7 @@ class TestCalendar(object): calendar, coll._local_ctag(calendar), coll._backend.get_ctag(calendar))) assert len(list(vdirs[cal1].list())) == 0 assert coll._needs_update(cal1) is False - sleep(0.01) + sleep(0.1) vdirs[cal1].upload(item_today) print('upload') @@ -327,17 +327,17 @@ def test_default_calendar(coll_vdirs): vdir = vdirs['foobar'] event = coll.new_event(event_today, 'foobar') vdir.upload(event) - sleep(0.01) + sleep(0.1) href, etag = list(vdir.list())[0] assert len(list(coll.get_events_on(today))) == 0 coll.update_db() - sleep(0.01) + sleep(0.1) assert len(list(coll.get_events_on(today))) == 1 vdir.delete(href, etag) - sleep(0.01) + sleep(0.1) assert len(list(coll.get_events_on(today))) == 1 coll.update_db() - sleep(0.01) + sleep(0.1) assert len(list(coll.get_events_on(today))) == 0 @@ -362,9 +362,9 @@ def test_only_update_old_event(coll_vdirs, monkeypatch): END:VEVENT """), cal1)) - sleep(0.01) + sleep(0.1) coll.update_db() - sleep(0.01) + sleep(0.1) assert not coll._needs_update(cal1) old_update_vevent = coll._update_vevent @@ -383,9 +383,9 @@ def test_only_update_old_event(coll_vdirs, monkeypatch): SUMMARY:third meeting END:VEVENT """), cal1)) - sleep(0.01) + sleep(0.1) assert coll._needs_update(cal1) coll.update_db() - sleep(0.01) + sleep(0.1) assert updated_hrefs == [href_three] -- 2.1.4
signature.asc
Description: Digital signature