diff --git a/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/io_tensor.cpp b/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/io_tensor.cpp index 6d23a1f615d95f..c205ec0c1f4e26 100644 --- a/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/io_tensor.cpp +++ b/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/io_tensor.cpp @@ -46,6 +46,18 @@ TEST_P(OVInferRequestIOTensorTest, failToSetNullptrForOutput) { ASSERT_THROW(req.set_tensor(output, {}), ov::Exception); } +TEST_P(OVInferRequestIOTensorTest, failToSetUninitializedInputTensor) { + ov::Tensor tensor; + OV_ASSERT_NO_THROW(req = execNet.create_infer_request()); + ASSERT_THROW(req.set_tensor(input, tensor), ov::Exception); +} + +TEST_P(OVInferRequestIOTensorTest, failToSetUninitializedOutputTensor) { + ov::Tensor tensor; + OV_ASSERT_NO_THROW(req = execNet.create_infer_request()); + ASSERT_THROW(req.set_tensor(output, tensor), ov::Exception); +} + TEST_P(OVInferRequestIOTensorTest, canSetAndGetInput) { auto tensor = utils::create_and_fill_tensor(input.get_element_type(), input.get_shape()); OV_ASSERT_NO_THROW(req.set_tensor(input, tensor)); @@ -175,6 +187,15 @@ TEST_P(OVInferRequestIOTensorTest, canInferAfterIOBlobReallocation) { OV_ASSERT_NO_THROW(req.get_tensor(output)); } +TEST_P(OVInferRequestIOTensorTest, canInferWithGetOut) { + ov::Tensor output_tensor; + OV_ASSERT_NO_THROW(output_tensor = req.get_tensor(output)); + OV_ASSERT_NO_THROW(req.infer()); + OV_ASSERT_NO_THROW(req.start_async()); + OV_ASSERT_NO_THROW(req.wait()); + OV_ASSERT_NO_THROW(req.get_tensor(output)); +} + TEST_P(OVInferRequestIOTensorTest, InferStaticNetworkSetChangedInputTensorThrow) { const ov::Shape shape1 = {1, 2, 32, 32}; const ov::Shape shape2 = {1, 2, 40, 40};