Various playlist editor developments and fixes.
[dcpomatic.git] / test / interrupt_encoder_test.cc
index bca1bbc0bf117b052f27106826e20eb209442971..ed988a65b44b15fdfedd2164267dcdb7da916cde 100644 (file)
 
 */
 
+/** @file  test/interrupt_encoder_test.cc
+ *  @brief Test clean shutdown of threads if a DCP encode is interrupted.
+ *  @ingroup specific
+ */
+
 #include "lib/film.h"
 #include "lib/dcp_content_type.h"
 #include "lib/ratio.h"
 #include "lib/ffmpeg_content.h"
 #include "lib/audio_content.h"
 #include "lib/job_manager.h"
+#include "lib/cross.h"
 #include "test.h"
 #include <boost/test/unit_test.hpp>
 
@@ -39,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(private_data / "prophet_long_clip.mkv"));
        film->examine_and_add_content (content);
-       wait_for_jobs ();
+       BOOST_REQUIRE (!wait_for_jobs());
 
        film->make_dcp ();
 
-       sleep (10);
+       dcpomatic_sleep_seconds (10);
 
        JobManager::drop ();
 }