Mercurial > hg > orthanc
comparison UnitTestsSources/ServerIndexTests.cpp @ 2671:06c0a6b8a871 jobs
new command-line argument: --no-jobs
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 11 Jun 2018 09:20:04 +0200 |
parents | 389d050a2e66 |
children | 925d8dc03a23 |
comparison
equal
deleted
inserted
replaced
2670:c5646f766b3e | 2671:06c0a6b8a871 |
---|---|
673 | 673 |
674 SystemToolbox::RemoveFile(path + "/index"); | 674 SystemToolbox::RemoveFile(path + "/index"); |
675 FilesystemStorage storage(path); | 675 FilesystemStorage storage(path); |
676 DatabaseWrapper db; // The SQLite DB is in memory | 676 DatabaseWrapper db; // The SQLite DB is in memory |
677 db.Open(); | 677 db.Open(); |
678 ServerContext context(db, storage, true /* running unit tests */); | 678 ServerContext context(db, storage, true /* running unit tests */, |
679 false /* don't reload jobs */); | |
679 ServerIndex& index = context.GetIndex(); | 680 ServerIndex& index = context.GetIndex(); |
680 | 681 |
681 ASSERT_EQ(1u, index.IncrementGlobalSequence(GlobalProperty_AnonymizationSequence)); | 682 ASSERT_EQ(1u, index.IncrementGlobalSequence(GlobalProperty_AnonymizationSequence)); |
682 ASSERT_EQ(2u, index.IncrementGlobalSequence(GlobalProperty_AnonymizationSequence)); | 683 ASSERT_EQ(2u, index.IncrementGlobalSequence(GlobalProperty_AnonymizationSequence)); |
683 ASSERT_EQ(3u, index.IncrementGlobalSequence(GlobalProperty_AnonymizationSequence)); | 684 ASSERT_EQ(3u, index.IncrementGlobalSequence(GlobalProperty_AnonymizationSequence)); |
771 | 772 |
772 SystemToolbox::RemoveFile(path + "/index"); | 773 SystemToolbox::RemoveFile(path + "/index"); |
773 FilesystemStorage storage(path); | 774 FilesystemStorage storage(path); |
774 DatabaseWrapper db; // The SQLite DB is in memory | 775 DatabaseWrapper db; // The SQLite DB is in memory |
775 db.Open(); | 776 db.Open(); |
776 ServerContext context(db, storage, true /* running unit tests */); | 777 ServerContext context(db, storage, true /* running unit tests */, |
778 false /* don't reload jobs */); | |
777 ServerIndex& index = context.GetIndex(); | 779 ServerIndex& index = context.GetIndex(); |
778 | 780 |
779 index.SetMaximumStorageSize(10); | 781 index.SetMaximumStorageSize(10); |
780 | 782 |
781 Json::Value tmp; | 783 Json::Value tmp; |