Fix nop cache using (especially for testing) (#2841)

+ fix flaky tests that requires no caches

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
Avgustin Marinov
2025-12-01 13:53:08 +02:00
committed by GitHub
parent b8a05e3cbf
commit 6988f5eafb
6 changed files with 100 additions and 27 deletions

View File

@@ -23,9 +23,9 @@ hawkbit.controller.maintenanceWindowPollCount=3
# Cache config
hawkbit.cache.ttl=10s
hawkbit.cache.spec=expireAfterAccess=${hawkbit.cache.ttl}
hawkbit.cache.RolloutStatus.spec=maximumSize=50000,expireAfterAccess=${hawkbit.cache.ttl}
hawkbit.cache.RolloutGroupStatus.spec=maximumSize=50000,expireAfterAccess=${hawkbit.cache.ttl}
hawkbit.cache.spec=expireAfterWrite=${hawkbit.cache.ttl}
hawkbit.cache.RolloutStatus.spec=maximumSize=50000,expireAfterWrite=${hawkbit.cache.ttl}
hawkbit.cache.RolloutGroupStatus.spec=maximumSize=50000,expireAfterWrite=${hawkbit.cache.ttl}
# Cache config - END
# Attention: if you want to use a maximumPollingTime greater 23:59:59 you have to update the DurationField in the configuration window

View File

@@ -89,9 +89,6 @@ class TenantConfigurationManagementTest extends AbstractJpaIntegrationTest imple
tenantConfigurationManagement.addOrUpdateConfiguration(
TenantConfigurationKey.AUTHENTICATION_GATEWAY_SECURITY_TOKEN_KEY, newConfigurationValue2);
// sometimes it reads old value, maybe if read too early. wait to settle up?
waitMillis(100);
// verify that new configuration value is used
final TenantConfigurationValue<String> updatedConfigurationValue2 = tenantConfigurationManagement
.getConfigurationValue(TenantConfigurationKey.AUTHENTICATION_GATEWAY_SECURITY_TOKEN_KEY, String.class);