mirror of
https://github.com/floci-io/floci.git
synced 2026-11-22 21:50:46 -05:00
fix(appconfigdata): honor requested poll interval (#3092)
This commit is contained in:
1 parent
64f06e090f
commit
8686651de1
6 files changed
+133
-14
No files matched your search
@@ -204,8 +204,8 @@ class AppConfigTest {
|
||||
|
||||
@Test
|
||||
@Order(12)
|
||||
@DisplayName("Poll interval: requested 60s but emulator returns 15s (known deviation from AWS)")
|
||||
void requiredMinimumPollIntervalIsAcceptedButNotEnforced() {
|
||||
@DisplayName("Poll interval: requested minimum is returned to the client")
|
||||
void requiredMinimumPollIntervalIsReturned() {
|
||||
var sessionResponse = appConfigData.startConfigurationSession(StartConfigurationSessionRequest.builder()
|
||||
.applicationIdentifier(applicationId)
|
||||
.environmentIdentifier(environmentId)
|
||||
@@ -218,16 +218,14 @@ class AppConfigTest {
|
||||
.configurationToken(intervalSessionToken)
|
||||
.build());
|
||||
|
||||
// Emulator always returns 15s regardless of the requested interval.
|
||||
// AWS would return the requested 60s. Pinning current emulator behavior.
|
||||
assertThat(firstResponse.nextPollIntervalInSeconds()).isEqualTo(15);
|
||||
assertThat(firstResponse.nextPollIntervalInSeconds()).isEqualTo(60);
|
||||
assertThat(firstResponse.nextPollConfigurationToken()).isNotNull();
|
||||
|
||||
GetLatestConfigurationResponse secondResponse = appConfigData.getLatestConfiguration(GetLatestConfigurationRequest.builder()
|
||||
.configurationToken(firstResponse.nextPollConfigurationToken())
|
||||
.build());
|
||||
|
||||
assertThat(secondResponse.nextPollIntervalInSeconds()).isEqualTo(15);
|
||||
assertThat(secondResponse.nextPollIntervalInSeconds()).isEqualTo(60);
|
||||
assertThat(secondResponse.nextPollConfigurationToken()).isNotNull();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user