You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The test fails in this scenario because the fallback HOCON values are populated with the values from the head.
In other words, with the following HOCON chain:
hocon1 --> fallback1 --> fallback2
When I call hocon1.ToString("keyInFallback2") all of the values from hocon1 will be mapped onto fallback1 and all of the values from fallback1 will be mapped onto fallback2. As a result, we can have race conditions and all sorts of other weird errors in the Akka.NET test suite.
@Aaronontheweb Ah, got it.
So yes, Fallback objects, that are stored in config, are modified (merged with initial config value) - that's why they are cloned from original fallback objects when saved to Fallback property.
So original myHocon2 is cloned, and stays unmodified, while inner Fallback of myHocon1 object is modified.
This was by design, did not thought that this can be an issue. But it is easy to fix, I will submit PR right now
Version: v1.3.1
Reproduction: #192
If I run this test, as-is, all of the text for each fallback will be correctly preserved and the test will pass and produce the following output:
This is the expected output.
However, if I uncomment the
fullHocon.GetString("akka.remote.transport").Should().Be("foo")
line... Here is what we end up with instead:The test fails in this scenario because the fallback HOCON values are populated with the values from the head.
In other words, with the following HOCON chain:
When I call
hocon1.ToString("keyInFallback2")
all of the values from hocon1 will be mapped onto fallback1 and all of the values from fallback1 will be mapped onto fallback2. As a result, we can have race conditions and all sorts of other weird errors in the Akka.NET test suite.This aligns with exactly the bugs I'm trying to track down in akkadotnet/akka.net#4128
The text was updated successfully, but these errors were encountered: