Skip to content

Commit

Permalink
add FailedAsyncInferWithNegativeTimeForWait test case (openvinotoolki…
Browse files Browse the repository at this point in the history
…t#21392)

* add FailedAsyncInferWithNegativeTimeForWait

* add getTestCaseName

* skip FailedAsyncInferWithNegativeTimeForWait in gna

* skip FailedAsyncInferWithNegativeTimeForWait in gna

* Update src/plugins/intel_gna/tests/functional/shared_tests_instances/skip_tests_config.cpp

---------

Co-authored-by: Chen Peter <peter.chen@intel.com>
  • Loading branch information
Haiqi Pan and peterchen-intel authored Dec 13, 2023
1 parent 9fe38f1 commit e2e9d60
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ std::vector<std::string> disabledTestPatterns() {
R"(.*OVCompiledModelBaseTest.*canGetInputsInfoAndCheck.*)",
R"(.*OVCompiledModelBaseTest.*getOutputsFromSplitFunctionWithSeveralOutputs.*)",
R"(.*OVCompiledModelBaseTest.*canCompileModelFromMemory.*)",
R"(.*OVCompiledModelBaseTest.*CanSetOutputPrecisionForNetwork.*)",
R"(.*OVCompiledModelBaseTest.*CanSetInputPrecisionForNetwork.*)",
R"(.*OVCompiledModelBaseTest.*CanCreateTwoCompiledModelsAndCheckRuntimeModel.*)",
R"(.*(OVClass|IEClass)HeteroExecutableNetworkGetMetricTest_TARGET_FALLBACK.*GetMetricNoThrow.*)",
R"(.*LoadNetwork*.*LoadNetwork(HETEROWithDeviceIDNoThrow|WithBigDeviceID|WithInvalidDeviceID)*.*)",
R"(.*QueryNetwork*.*QueryNetwork(HETEROWithDeviceIDNoThrow|WithBigDeviceID|WithInvalidDeviceID)*.*)",
Expand Down Expand Up @@ -107,5 +104,10 @@ std::vector<std::string> disabledTestPatterns() {
R"(.*smoke_Decompose2DConv.*)",
// TODO: Issue: 123306
R"(smoke_convert_matmul_to_fc/ConvertMatmulToFcWithTransposesPass.CompareWithRefImpl/netPRC=FP(32|16)_targetDevice=GNA__configItem=GNA_COMPACT_MODE_NO_configItem=GNA_DEVICE_MODE_GNA_SW_(FP32|EXACT)_IS=\(8.*)",
// TODO: CVS-125686
R"(.*OVCompiledModelBaseTest.*CanSetOutputPrecisionForNetwork.*)",
R"(.*OVCompiledModelBaseTest.*CanSetInputPrecisionForNetwork.*)",
R"(.*OVCompiledModelBaseTest.*CanCreateTwoCompiledModelsAndCheckRuntimeModel.*)",
R"(.*OVInferRequestWaitTests.*FailedAsyncInferWithNegativeTimeForWait.*)",
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ namespace test {
namespace behavior {
struct OVInferRequestWaitTests : public OVInferRequestTests {
void SetUp() override;
static std::string getTestCaseName(testing::TestParamInfo<InferRequestParams> obj);
void TearDown() override;
ov::InferRequest req;
ov::Output<const ov::Node> input;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ void OVInferRequestWaitTests::SetUp() {
output = execNet.output();
}

std::string OVInferRequestWaitTests::getTestCaseName(testing::TestParamInfo<InferRequestParams> obj) {
return OVInferRequestTests::getTestCaseName(obj);
}

void OVInferRequestWaitTests::TearDown() {
req = {};
input = {};
Expand Down Expand Up @@ -76,6 +80,12 @@ TEST_P(OVInferRequestWaitTests, throwExceptionOnGetTensorAfterAsyncInfer) {
OV_ASSERT_NO_THROW(req.wait());
}

TEST_P(OVInferRequestWaitTests, FailedAsyncInferWithNegativeTimeForWait) {
OV_ASSERT_NO_THROW(req.infer());
OV_ASSERT_NO_THROW(req.start_async());
ASSERT_THROW(req.wait_for(std::chrono::milliseconds{-1}), ov::Exception);
}

} // namespace behavior
} // namespace test
} // namespace ov

0 comments on commit e2e9d60

Please sign in to comment.