瀏覽代碼

Fix indexer test by waiting for threads to complete

Since the indexer is now multithreaded, we wait
until all threads complete before exiting the
test program.
Steve Pieper 12 年之前
父節點
當前提交
1b8ab8203f
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      Libs/DICOM/Core/Testing/Cpp/ctkDICOMIndexerTest1.cpp

+ 3 - 0
Libs/DICOM/Core/Testing/Cpp/ctkDICOMIndexerTest1.cpp

@@ -54,5 +54,8 @@ int ctkDICOMIndexerTest1( int argc, char * argv [] )
   // make sure it doesn't crash
   indexer.refreshDatabase(database, QDir::tempPath());
 
+  // ensure all concurrent inserts are complete
+  indexer.waitForImportFinished();
+
   return EXIT_SUCCESS;
 }