@@ -274,42 +274,6 @@ class ConfigCollectorTest extends DDSpecification {
274
274
jvmSetting. seqId < remoteSetting. seqId
275
275
}
276
276
277
- def " getAppliedConfigSetting returns highest precedence setting" () {
278
- setup :
279
- ConfigCollector . get(). collect() // clear previous state
280
-
281
- when :
282
- // Add multiple settings for the same key with different seqIds
283
- ConfigCollector . get(). put(" test.key" , " default-value" , ConfigOrigin . DEFAULT , ConfigSetting . DEFAULT_SEQ_ID )
284
- ConfigCollector . get(). put(" test.key" , " env-value" , ConfigOrigin . ENV , 2 )
285
- ConfigCollector . get(). put(" test.key" , " jvm-value" , ConfigOrigin . JVM_PROP , 5 )
286
- ConfigCollector . get(). put(" test.key" , " remote-value" , ConfigOrigin . REMOTE , 3 )
287
-
288
- // Add another key with only one setting
289
- ConfigCollector . get(). put(" single.key" , " only-value" , ConfigOrigin . ENV , 1 )
290
-
291
- def collected = ConfigCollector . get(). collect()
292
-
293
- then :
294
- // Should return the setting with highest seqId (5)
295
- def appliedSetting = ConfigCollector . getAppliedConfigSetting(" test.key" , collected)
296
- appliedSetting != null
297
- appliedSetting. value == " jvm-value"
298
- appliedSetting. origin == ConfigOrigin . JVM_PROP
299
- appliedSetting. seqId == 5
300
-
301
- // Should return the only setting for single.key
302
- def singleSetting = ConfigCollector . getAppliedConfigSetting(" single.key" , collected)
303
- singleSetting != null
304
- singleSetting. value == " only-value"
305
- singleSetting. origin == ConfigOrigin . ENV
306
- singleSetting. seqId == 1
307
-
308
- // Should return null for non-existent key
309
- def nonExistentSetting = ConfigCollector . getAppliedConfigSetting(" non.existent.key" , collected)
310
- nonExistentSetting == null
311
- }
312
-
313
277
def " config id is null for non-StableConfigSource" () {
314
278
setup :
315
279
def key = " test.key"
0 commit comments