错误处理机制纠正
This commit is contained in:
@@ -105,7 +105,9 @@ TEST(render_dag_test, analysis_derives_wait_critical_path_and_parallel_overlap_f
|
||||
TEST(render_dag_test, capture_controller_and_repository_capture_exact_requested_frames) {
|
||||
Capture_Controller controller;
|
||||
Capture_Repository repository;
|
||||
const auto session_id = controller.capture_frames(2);
|
||||
const auto request = controller.capture_frames(2);
|
||||
ASSERT_TRUE(request);
|
||||
const auto session_id = request.session_id;
|
||||
repository.begin_session(session_id, 2);
|
||||
const auto first = controller.begin_frame();
|
||||
const auto second = controller.begin_frame();
|
||||
@@ -196,7 +198,9 @@ TEST(render_dag_test,
|
||||
|
||||
TEST(render_dag_test, failed_capture_ticket_is_retried_until_the_requested_frame_completes) {
|
||||
Capture_Controller controller;
|
||||
const auto session_id = controller.capture_next_frame();
|
||||
const auto request = controller.capture_next_frame();
|
||||
ASSERT_TRUE(request);
|
||||
const auto session_id = request.session_id;
|
||||
const auto failed = controller.begin_frame();
|
||||
ASSERT_TRUE(failed.capture);
|
||||
controller.finish_frame(failed, false);
|
||||
@@ -214,7 +218,8 @@ TEST(render_dag_test, failed_capture_ticket_is_retried_until_the_requested_frame
|
||||
TEST(render_dag_test, concurrent_workers_reserve_exactly_one_capture_slot_each) {
|
||||
Capture_Controller controller;
|
||||
constexpr std::size_t requested = 64;
|
||||
controller.capture_frames(requested);
|
||||
const auto request = controller.capture_frames(requested);
|
||||
ASSERT_TRUE(request);
|
||||
std::atomic<std::size_t> captured{};
|
||||
std::vector<std::thread> workers;
|
||||
workers.reserve(256);
|
||||
|
||||
Reference in New Issue
Block a user