-
Notifications
You must be signed in to change notification settings - Fork 588
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update fetch to utilize latest custom signals #6582
Conversation
Vertex AI Mock Responses Check
|
Generated by 🚫 Danger |
Coverage Report 1Affected Products
Test Logs |
can you add tests for the behavior you are fixing? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix, LGTM!
...e-config/src/test/java/com/google/firebase/remoteconfig/internal/ConfigFetchHandlerTest.java
Outdated
Show resolved
Hide resolved
...e-config/src/test/java/com/google/firebase/remoteconfig/internal/ConfigFetchHandlerTest.java
Outdated
Show resolved
Hide resolved
@@ -766,6 +768,19 @@ public void getInfo_hitsThrottleLimit_throttledStatus() throws Exception { | |||
.isEqualTo(firstFetchedContainer.getFetchTime()); | |||
} | |||
|
|||
@Test | |||
public void customSignals_updated_onSubsequentFetch() throws Exception { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: fetch_usesLatestCustomSignals?
fetchCallToHttpClientUpdatesClockAndReturnsConfig(firstFetchedContainer); | ||
fetchHandler.fetch(); | ||
|
||
verifyCustomSignals(customSignals); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 to Ashish's comment, I would also expect to see the actual assertion in this test
9fa2ac9
into
remoteConfigCustomTargeting
When we update custom signals using setCustomSignals, the latest custom signals are not retrieved in the subsequent fetch. Currently, we are required to reload the app to fetch them.
Link to the bug: Fetch uses stale custom signal values