mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-28 16:48:45 +08:00
Add finish before command queue is released
Related-To: NEO-5279 Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
4d35a76931
commit
50fae92ea2
@@ -1531,6 +1531,17 @@ TEST(CommandQueueDestructorTest, whenCommandQueueIsDestroyedThenDestroysTimestam
|
||||
EXPECT_EQ(1, context->getRefInternalCount()); // NOLINT(clang-analyzer-cplusplus.NewDelete)
|
||||
}
|
||||
|
||||
TEST(CommandQueueDestructorTest, GivenCommandQueueWhenDeletedThenFinishIsCalled) {
|
||||
auto context = std::make_unique<MockContext>();
|
||||
EXPECT_EQ(1, context->getRefInternalCount());
|
||||
auto queue = new MockCommandQueue(context.get(), context->getDevice(0), nullptr, false);
|
||||
cl_int ret = 0;
|
||||
bool finishCalled = false;
|
||||
queue->finishCalled = &finishCalled;
|
||||
releaseQueue(queue, ret);
|
||||
EXPECT_TRUE(finishCalled); // NOLINT
|
||||
}
|
||||
|
||||
TEST(CommandQueuePropertiesTests, whenGetEngineIsCalledThenQueueEngineIsReturned) {
|
||||
MockCommandQueue queue;
|
||||
EngineControl engineControl;
|
||||
|
||||
Reference in New Issue
Block a user