diff options
author | Zhi Dou <zhidou@google.com> | 2024-03-29 13:49:57 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2024-03-29 13:49:57 +0000 |
commit | 83cc696e910cbc4fea12888c37d6a1ba2d85ed6f (patch) | |
tree | e43da0d87bd3e2b6db70ed83864ec02c4c9a60d7 | |
parent | 06bcd6a7017b09160b6e44d211665d1c33cf2181 (diff) | |
parent | 46e31f4d2ec3fee3ebfbf7e571934c2dd5a8149f (diff) | |
download | platform_testing-83cc696e910cbc4fea12888c37d6a1ba2d85ed6f.tar.gz |
Merge "skip verify optimization if flag is exported" into main
-rw-r--r-- | libraries/flag-helpers/junit/src_base/android/platform/test/flag/junit/SetFlagsRule.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libraries/flag-helpers/junit/src_base/android/platform/test/flag/junit/SetFlagsRule.java b/libraries/flag-helpers/junit/src_base/android/platform/test/flag/junit/SetFlagsRule.java index 9a9573363..0c8696136 100644 --- a/libraries/flag-helpers/junit/src_base/android/platform/test/flag/junit/SetFlagsRule.java +++ b/libraries/flag-helpers/junit/src_base/android/platform/test/flag/junit/SetFlagsRule.java @@ -492,6 +492,13 @@ public final class SetFlagsRule implements TestRule { .invoke(fakeFeatureFlagsImpl, fullFlagName); return result; } catch (NoSuchMethodException e) { + // If the flag is generated under exported mode, then it doesn't have this method + if (fakeFeatureFlagsImpl + .getClass() + .getSimpleName() + .equals(FAKE_FEATURE_FLAGS_IMPL_CLASS_NAME)) { + return false; + } throw new FlagSetException( fullFlagName, String.format( |