Skip to content

Commit

Permalink
Remove the packet.aborted_ event in abort-or-stop.
Browse files Browse the repository at this point in the history
  • Loading branch information
aliddell committed Jan 2, 2024
1 parent 801afc6 commit a7c49d5
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions acquire-video-runtime/tests/abort-or-stop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ reporter(int is_error,
struct Packet
{
AcquireRuntime* runtime_;
struct event started_, aborted_;
struct event started_;
int expect_abort_;
bool result_;
};
Expand Down Expand Up @@ -156,28 +156,23 @@ main()
.expect_abort_ = 1,
.result_ = false };
event_init(&packet.started_);
event_init(&packet.aborted_);

thread_create(&t_, (void (*)(void*))acquire, &packet);
event_wait(&packet.started_);
acquire_abort(runtime);
event_notify_all(&packet.aborted_);
thread_join(&t_);
event_destroy(&packet.started_);
event_destroy(&packet.aborted_);
EXPECT(packet.result_ == true, "Something went wrong in 'abort' test.");

// stop waits until finished
packet =
Packet{ .runtime_ = runtime, .expect_abort_ = 0, .result_ = false };
event_init(&packet.started_);
event_init(&packet.aborted_);
thread_create(&t_, (void (*)(void*))acquire, &packet);
event_wait(&packet.started_);
acquire_stop(runtime);
thread_join(&t_);
event_destroy(&packet.started_);
event_destroy(&packet.aborted_);
EXPECT(packet.result_ == true, "Something went wrong in 'stop' test.");

acquire_shutdown(runtime);
Expand Down

0 comments on commit a7c49d5

Please sign in to comment.