add FailedAsyncInferWithNegativeTimeForWait test case (#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>
This commit is contained in:
Haiqi Pan 2023-12-13 16:20:04 +08:00 committed by GitHub
parent 9fe38f1a9c
commit e2e9d6056f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 3 deletions

View File

@ -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)*.*)",
@ -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.*)",
};
}

View File

@ -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;

View File

@ -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 = {};
@ -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