std::shared_ptr
[dcpomatic.git] / test / interrupt_encoder_test.cc
index 8883c2d6f43e97c781d6e388875502bcfa3daf27..e146d2916f63f8f3931e4a1faeb5e7935e2b7ffd 100644 (file)
 
 */
 
+/** @file  test/interrupt_encoder_test.cc
+ *  @brief Test clean shutdown of threads if a DCP encode is interrupted.
+ *  @ingroup feature
+ */
+
 #include "lib/film.h"
 #include "lib/dcp_content_type.h"
 #include "lib/ratio.h"
@@ -28,7 +33,7 @@
 #include "test.h"
 #include <boost/test/unit_test.hpp>
 
-using boost::shared_ptr;
+using std::shared_ptr;
 
 /** Interrupt a DCP encode when it is in progress, as this used to (still does?)
  *  sometimes give an error related to pthreads.
@@ -40,13 +45,13 @@ BOOST_AUTO_TEST_CASE (interrupt_encoder_test)
        film->set_container (Ratio::from_id ("185"));
        film->set_name ("interrupt_encoder_test");
 
-       shared_ptr<FFmpegContent> content (new FFmpegContent (film, private_data / "prophet_clip.mkv"));
+       shared_ptr<FFmpegContent> content (new FFmpegContent(TestPaths::private_data() / "prophet_long_clip.mkv"));
        film->examine_and_add_content (content);
-       wait_for_jobs ();
+       BOOST_REQUIRE (!wait_for_jobs());
 
        film->make_dcp ();
 
-       dcpomatic_sleep (10);
+       dcpomatic_sleep_seconds (10);
 
        JobManager::drop ();
 }