comparison UnitTestsSources/ServerIndexTests.cpp @ 3018:e3b5c07146a3 db-changes

speeding up the computation of the size of the attachments in SQLite
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 14 Dec 2018 16:04:17 +0100
parents 517fc4767ae0
children 8336204d95dc
comparison
equal deleted inserted replaced
3017:517fc4767ae0 3018:e3b5c07146a3
462 index_->DeleteResource(a[5]); 462 index_->DeleteResource(a[5]);
463 ASSERT_EQ(7u, listener_->deletedResources_.size()); 463 ASSERT_EQ(7u, listener_->deletedResources_.size());
464 464
465 CheckTableRecordCount(0, "Resources"); 465 CheckTableRecordCount(0, "Resources");
466 CheckTableRecordCount(0, "AttachedFiles"); 466 CheckTableRecordCount(0, "AttachedFiles");
467 CheckTableRecordCount(2, "GlobalProperties"); 467 CheckTableRecordCount(3, "GlobalProperties");
468
469 std::string tmp;
470 ASSERT_TRUE(index_->LookupGlobalProperty(tmp, GlobalProperty_DatabaseSchemaVersion));
471 ASSERT_EQ("6", tmp);
472 ASSERT_TRUE(index_->LookupGlobalProperty(tmp, GlobalProperty_FlushSleep));
473 ASSERT_EQ("World", tmp);
474 ASSERT_TRUE(index_->LookupGlobalProperty(tmp, GlobalProperty_DatabaseTracksSizeOfAttachments));
475 ASSERT_EQ("1", tmp);
468 476
469 ASSERT_EQ(3u, listener_->deletedFiles_.size()); 477 ASSERT_EQ(3u, listener_->deletedFiles_.size());
470 ASSERT_FALSE(std::find(listener_->deletedFiles_.begin(), 478 ASSERT_FALSE(std::find(listener_->deletedFiles_.begin(),
471 listener_->deletedFiles_.end(), 479 listener_->deletedFiles_.end(),
472 "world") == listener_->deletedFiles_.end()); 480 "world") == listener_->deletedFiles_.end());