Hi,
I think that's a good idea, although I prefer the approach of making the test adapt the expected output relative to the current time instead of replacing the library state with mock data. Simon ________________________________ From: Development <development-bounces+simon.hausmann=qt...@qt-project.org> on behalf of Morten Sørvig <morten.sor...@qt.io> Sent: Tuesday, August 8, 2017 12:11:13 PM To: development@qt-project.org Subject: Re: [Development] State of 5.9 and dev branches Thanks for cleaning this up quickly! When it comes to testing, do we want to go one step further and make the tests be completely independent of the current time? We would like to avoid time bombs like these, and if something _is_ going to fail at some future date we would like to know so right away. I coded up a strawman proposal here: https://codereview.qt-project.org/201989 It adds a RAII class to QTestLib that allows setting the datetime (as returned by QDateTime) for the duration of a test function: QTestTimeFixer fixedTime(QDateTime(QDate(2015, 1, 1)).toMSecsSinceEpoch()); This is then used to set the date time to sometime in the past for tst_qnetworkcookiejar, which makes the unpatched version of it pass. Going further we could set the time to the future and verify that the cookies expire as expected. Morten > On 8 Aug 2017, at 09:40, Simon Hausmann <simon.hausm...@qt.io> wrote: > > > Thank you Thiago, Sergio and Lars! > > qtbase 5.6 and 5.9 are good again. > > Simon > From: Development <development-bounces+simon.hausmann=qt...@qt-project.org> > on behalf of Thiago Macieira <thiago.macie...@intel.com> > Sent: Monday, August 7, 2017 10:54:22 PM > To: development@qt-project.org > Subject: Re: [Development] State of 5.9 and dev branches > > On Monday, 7 August 2017 13:36:19 PDT Simon Hausmann wrote: > > Hi, > > > > The 5.9 fix went in. Would be most grateful if somebody could do the cherry > > pick and merge. I won't have a keyboard until tomorrow late morning. > > 5.6: https://codereview.qt-project.org/201945 > dev: https://codereview.qt-project.org/201946 > > -- > Thiago Macieira - thiago.macieira (AT) intel.com > Software Architect - Intel Open Source Technology Center > > _______________________________________________ > Development mailing list > Development@qt-project.org > http://lists.qt-project.org/mailman/listinfo/development > _______________________________________________ > Development mailing list > Development@qt-project.org > http://lists.qt-project.org/mailman/listinfo/development _______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
_______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development