From 92ecc4827f9da0df75307732ae47131dbb4bcf3b Mon Sep 17 00:00:00 2001 From: Ilya Matyukhin Date: Wed, 6 May 2020 00:44:21 -0700 Subject: [PATCH] Add a delay between tests to make them more robust Bug: 154342874 Test: atest VtsHalBiometricsFaceV1_0TargetTest Change-Id: I09713b6814ecb9f4ee4a7f568b1f891a94f4e017 --- .../vts/functional/VtsHalBiometricsFaceV1_0TargetTest.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/biometrics/face/1.0/vts/functional/VtsHalBiometricsFaceV1_0TargetTest.cpp b/biometrics/face/1.0/vts/functional/VtsHalBiometricsFaceV1_0TargetTest.cpp index 7ac44a4159..78f93af0d3 100644 --- a/biometrics/face/1.0/vts/functional/VtsHalBiometricsFaceV1_0TargetTest.cpp +++ b/biometrics/face/1.0/vts/functional/VtsHalBiometricsFaceV1_0TargetTest.cpp @@ -28,6 +28,7 @@ #include #include #include +#include using android::sp; using android::hardware::hidl_vec; @@ -144,7 +145,10 @@ class FaceHidlTest : public ::testing::TestWithParam { ASSERT_EQ(Status::OK, static_cast(ret2)); } - void TearDown() override {} + void TearDown() override { + // Hack to allow the asynchronous operations to finish on time. + std::this_thread::sleep_for(std::chrono::milliseconds(250)); + } sp mService; sp mCallback;