CollectionScheduler: add tests for the actual QTimer interval
ClosedPublic

Authored by dfaure on Apr 12 2019, 7:58 AM.

Details

Summary

Testing the data structures is all fine and good, but I wanted to
make sure the actual underlying timer was set to the right interval,
after all that std::chrono wrangling.

Test Plan

collectionschedulertest still passes

Diff Detail

Repository
R165 Akonadi
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
dfaure requested review of this revision.Apr 12 2019, 7:58 AM
dfaure created this revision.
dvratil requested changes to this revision.Apr 12 2019, 8:26 AM
dvratil added inline comments.
autotests/server/collectionschedulertest.cpp
33

No, you use std::chrono_literals :-)

src/server/collectionscheduler.h
72

So why not return std::chrono::milliseconds, then? This is why we have std::chrono now - so that we no longer have to awkwardly check the documentation for time units and get
a comparison between durations of different time units for free :-)

This revision now requires changes to proceed.Apr 12 2019, 8:26 AM
dfaure updated this revision to Diff 56119.Apr 13 2019, 9:21 AM

port interval method to std::chrono

dvratil accepted this revision.Apr 15 2019, 8:07 AM

Thanks!

This revision is now accepted and ready to land.Apr 15 2019, 8:07 AM
This revision was automatically updated to reflect the committed changes.
Restricted Application added a project: KDE PIM. · View Herald TranscriptApr 15 2019, 8:40 PM