comparison UnitTestsSources/ServerIndexTests.cpp @ 2950:dc18d5804746

support of JobsHistorySize set to zero
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 30 Nov 2018 17:19:57 +0100
parents 22524fd06225
children 7695a9c81099
comparison
equal deleted inserted replaced
2949:e6204cd21443 2950:dc18d5804746
675 675
676 SystemToolbox::RemoveFile(path + "/index"); 676 SystemToolbox::RemoveFile(path + "/index");
677 FilesystemStorage storage(path); 677 FilesystemStorage storage(path);
678 DatabaseWrapper db; // The SQLite DB is in memory 678 DatabaseWrapper db; // The SQLite DB is in memory
679 db.Open(); 679 db.Open();
680 ServerContext context(db, storage, true /* running unit tests */); 680 ServerContext context(db, storage, true /* running unit tests */, 10);
681 context.SetupJobsEngine(true, false); 681 context.SetupJobsEngine(true, false);
682 682
683 ServerIndex& index = context.GetIndex(); 683 ServerIndex& index = context.GetIndex();
684 684
685 ASSERT_EQ(1u, index.IncrementGlobalSequence(GlobalProperty_AnonymizationSequence)); 685 ASSERT_EQ(1u, index.IncrementGlobalSequence(GlobalProperty_AnonymizationSequence));
775 775
776 SystemToolbox::RemoveFile(path + "/index"); 776 SystemToolbox::RemoveFile(path + "/index");
777 FilesystemStorage storage(path); 777 FilesystemStorage storage(path);
778 DatabaseWrapper db; // The SQLite DB is in memory 778 DatabaseWrapper db; // The SQLite DB is in memory
779 db.Open(); 779 db.Open();
780 ServerContext context(db, storage, true /* running unit tests */); 780 ServerContext context(db, storage, true /* running unit tests */, 10);
781 context.SetupJobsEngine(true, false); 781 context.SetupJobsEngine(true, false);
782 ServerIndex& index = context.GetIndex(); 782 ServerIndex& index = context.GetIndex();
783 783
784 index.SetMaximumStorageSize(10); 784 index.SetMaximumStorageSize(10);
785 785
863 bool overwrite = (i == 0); 863 bool overwrite = (i == 0);
864 864
865 MemoryStorageArea storage; 865 MemoryStorageArea storage;
866 DatabaseWrapper db; // The SQLite DB is in memory 866 DatabaseWrapper db; // The SQLite DB is in memory
867 db.Open(); 867 db.Open();
868 ServerContext context(db, storage, true /* running unit tests */); 868 ServerContext context(db, storage, true /* running unit tests */, 10);
869 context.SetupJobsEngine(true, false); 869 context.SetupJobsEngine(true, false);
870 context.SetCompressionEnabled(true); 870 context.SetCompressionEnabled(true);
871 871
872 DicomMap instance; 872 DicomMap instance;
873 instance.SetValue(DICOM_TAG_PATIENT_ID, "patient", false); 873 instance.SetValue(DICOM_TAG_PATIENT_ID, "patient", false);