Commit 5a06bfb1 authored by Steven Murray's avatar Steven Murray
Browse files

Fixed SQLite3 file locking problem within cta_catalogue_CatalogueTest::SetUp()

parent 6a048947
......@@ -97,9 +97,16 @@ void cta_catalogue_CatalogueTest::SetUp() {
}
}
{
// The iterator returned from m_catalogue->getArchiveFiles() will lock an
// SQLite file database, so copy all of its results into a list in order
// to release the lock before moving on to deleting database rows
auto itor = m_catalogue->getArchiveFiles();
std::list<common::dataStructures::ArchiveFile> archiveFiles;
while(itor.hasMore()) {
const auto archiveFile = itor.next();
archiveFiles.push_back(itor.next());
}
for(const auto &archiveFile: archiveFiles) {
log::LogContext dummyLc(m_dummyLog);
m_catalogue->deleteArchiveFile(archiveFile.diskInstance, archiveFile.archiveFileID, dummyLc);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment