test: do not clone on input buffer 02/314302/1
authorInki Dae <inki.dae@samsung.com>
Wed, 10 Jul 2024 03:55:12 +0000 (12:55 +0900)
committerInki Dae <inki.dae@samsung.com>
Wed, 10 Jul 2024 03:55:12 +0000 (12:55 +0900)
Do not clone on input buffer in case of BranchNode.
Branch node just selects valid next nodes so never modify
the given input buffer.

Change-Id: I75d34ed5c1eb881e9b966809c329c52bf6f622b0
Signed-off-by: Inki Dae <inki.dae@samsung.com>
test/services/test_task_manager.cpp

index 4a0b4eaa940f7b0fe0cc308dfafab95617c6fb42..0f9ecd3aba4c59fc03c5d3f4c52a90f66606d543 100644 (file)
@@ -456,8 +456,6 @@ TEST(SingloTaskManager, MultipleNodesBasedGraphEShouldWork)
 void BranchNodeCallback(INode *node)
 {
        auto branchNode = dynamic_cast<BranchNode *>(node);
-       auto &inputBuffer = branchNode->getInputBuffer();
-       auto newBaseData = inputBuffer->getInputs()[0]->clone();
 
        auto &results = branchNode->results();
        for (auto r : results) {
@@ -476,9 +474,7 @@ void BranchNodeCallback(INode *node)
                }
        }
 
-       auto outputBuffer = make_shared<SharedBuffer>();
-       outputBuffer->addInput(newBaseData);
-       branchNode->setOutputBuffer(outputBuffer);
+       branchNode->setOutputBuffer(branchNode->getInputBuffer());
 }
 
 // GraphF: