Bug 442821 - TimelineModelTest::testWeatherElements fails at 23:00
Summary: TimelineModelTest::testWeatherElements fails at 23:00
Status: RESOLVED FIXED
Alias: None
Product: KDE Itinerary
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Volker Krause
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-23 03:38 UTC by Bernhard M. Wiedemann
Modified: 2021-09-23 15:58 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 21.08.2


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard M. Wiedemann 2021-09-23 03:38:37 UTC
SUMMARY timelinemodeltest.cpp fails reproducibly 4% of the time


STEPS TO REPRODUCE
1. run itinerary-21.08.1 tests with the system clock set between 23:00 and 23:59 UTC (in case it matters: we use TZ=UTC)
   on openSUSE, you can do that with osc co openSUSE:Factory/itinerary && cd $_ && osc build --vm-type=kvm --noservice --clean --build-opt=--vm-custom-opt="-rtc base=2021-11-01T23:29:00" standard


OBSERVED RESULT
QDEBUG : TimelineModelTest::testWeatherElements() weather recomputation done^M
FAIL!  : TimelineModelTest::testWeatherElements() Compared values are not the sa
me^M
   Actual   (fc.dateTime().date()): 2021/09/05^M
   Expected (QDate::currentDate()): 2021/09/04^M
   Loc: [/home/abuild/rpmbuild/BUILD/itinerary-21.08.1/autotests/timelinemodelte
st.cpp(284)]^M
QWARN  : TimelineModelTest::testMultiTraveller() Comparators already registered
for type KItinerary::BusTrip^M


EXPECTED RESULT
tests should not fail like this

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: openSUSE Tumbleweed 20210916
KDE Plasma Version: ?
KDE Frameworks Version: 5.86
Qt Version: 5.15.2

ADDITIONAL INFORMATION

This bug was found while working on reproducible builds for openSUSE.
Comment 1 Volker Krause 2021-09-23 15:58:12 UTC
Git commit 4f0258094fd16fae1c7c680b5a48d4bb2696733a by Volker Krause.
Committed on 23/09/2021 at 15:55.
Pushed by vkrause into branch 'release/21.08'.

Fix timeline model test breaking during the last hour of the day

If there's only <1h left, we wont get a weather element for the ongoing day
anymore, so start the test from the next day in that case.
FIXED-IN: 21.08.2

M  +21   -15   autotests/timelinemodeltest.cpp

https://invent.kde.org/pim/itinerary/commit/4f0258094fd16fae1c7c680b5a48d4bb2696733a