Merge changes I95f19d20,I57d924d1 into 24D1-dev am: 2ff1f0a2eb
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/26571715 Change-Id: Ia256b0a9e0a58bb60d8fb9f9937a6107bdfce423 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
691b1c0ee2
1 changed files with 8 additions and 9 deletions
|
@ -65,7 +65,7 @@ class EffectFactoryTest : public testing::TestWithParam<std::string> {
|
|||
}
|
||||
}
|
||||
|
||||
std::string kServiceName = GetParam();
|
||||
const std::string kServiceName = GetParam();
|
||||
std::shared_ptr<IFactory> mEffectFactory;
|
||||
std::vector<std::shared_ptr<IEffect>> mEffects;
|
||||
const Descriptor::Identity kNullId = {.uuid = getEffectUuidNull()};
|
||||
|
@ -118,6 +118,10 @@ class EffectFactoryTest : public testing::TestWithParam<std::string> {
|
|||
mEffectFactory = IFactory::fromBinder(mBinderUtil.connectToService(kServiceName));
|
||||
ASSERT_NE(mEffectFactory, nullptr);
|
||||
}
|
||||
void restartAndGetFactory() {
|
||||
mEffectFactory = IFactory::fromBinder(mBinderUtil.restartService());
|
||||
ASSERT_NE(mEffectFactory, nullptr);
|
||||
}
|
||||
};
|
||||
|
||||
TEST_P(EffectFactoryTest, SetupAndTearDown) {
|
||||
|
@ -126,8 +130,7 @@ TEST_P(EffectFactoryTest, SetupAndTearDown) {
|
|||
|
||||
TEST_P(EffectFactoryTest, CanBeRestarted) {
|
||||
ASSERT_NE(mEffectFactory, nullptr);
|
||||
mEffectFactory = IFactory::fromBinder(mBinderUtil.restartService());
|
||||
ASSERT_NE(mEffectFactory, nullptr);
|
||||
restartAndGetFactory();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -249,9 +252,7 @@ TEST_P(EffectFactoryTest, CreateDestroyWithRestart) {
|
|||
EXPECT_NE(descs.size(), 0UL);
|
||||
creatAndDestroyDescs(descs);
|
||||
|
||||
mEffectFactory = IFactory::fromBinder(mBinderUtil.restartService());
|
||||
ASSERT_NE(mEffectFactory, nullptr);
|
||||
|
||||
restartAndGetFactory();
|
||||
connectAndGetFactory();
|
||||
creatAndDestroyDescs(descs);
|
||||
}
|
||||
|
@ -263,9 +264,7 @@ TEST_P(EffectFactoryTest, EffectInvalidAfterRestart) {
|
|||
EXPECT_NE(descs.size(), 0UL);
|
||||
std::vector<std::shared_ptr<IEffect>> effects = createWithDescs(descs);
|
||||
|
||||
mEffectFactory = IFactory::fromBinder(mBinderUtil.restartService());
|
||||
ASSERT_NE(mEffectFactory, nullptr);
|
||||
|
||||
restartAndGetFactory();
|
||||
connectAndGetFactory();
|
||||
destroyEffects(effects, EX_ILLEGAL_ARGUMENT);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue