Explorar o código

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 %!s(int64=12) %!d(string=hai) anos
pai
achega
1b8ab8203f
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  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
   // make sure it doesn't crash
   indexer.refreshDatabase(database, QDir::tempPath());
   indexer.refreshDatabase(database, QDir::tempPath());
 
 
+  // ensure all concurrent inserts are complete
+  indexer.waitForImportFinished();
+
   return EXIT_SUCCESS;
   return EXIT_SUCCESS;
 }
 }