unit tests: improve

and add a new one for the indexer
This commit is contained in:
Dirk-Jan C. Binnema
2023-09-12 19:30:18 +03:00
parent 805c5aa287
commit 2f5602b938
14 changed files with 149 additions and 123 deletions

View File

@ -74,9 +74,7 @@ public:
/**
* Stop indexing. If not indexing, do nothing.
*
*
* @return true if we stopped indexing, or indexing was not underway.
* False otherwise.
* @return true if we stopped indexing, or indexing was not underway; false otherwise.
*/
bool stop();
@ -89,12 +87,10 @@ public:
// Object describing current progress
struct Progress {
void reset()
{
void reset() {
running = false;
checked = updated = removed = 0;
}
std::atomic<bool> running{}; /**< Is an index operation in progress? */
std::atomic<size_t> checked{}; /**< Number of messages checked for changes */
std::atomic<size_t> updated{}; /**< Number of messages (re)parsed/added/updated */