A duplicate SetServerDefaults call was introduced in #2869 (see this comment) as a workaround for the "port 0" issue in TestWriteOriginScitokensConfig.
Diff:
--- Expected
+++ Actual
@@ -22,3 +22,3 @@
[Global]
-audience_json = ["test_audience","https://origin.example.com:8443"]
+audience_json = ["test_audience","https://origin.example.com:0"]
Test: TestWriteOriginScitokensConfig
FAIL
However, we should solve the root problem directly: SetServerDefaults used param.Origin_Port.GetInt() and param.Cache_Port.GetInt(), which read from the atomic config before it refreshes, resulting in incorrect port values (0 instead of 8443) and breaking the test.
A duplicate
SetServerDefaultscall was introduced in #2869 (see this comment) as a workaround for the "port 0" issue inTestWriteOriginScitokensConfig.However, we should solve the root problem directly:
SetServerDefaultsusedparam.Origin_Port.GetInt()andparam.Cache_Port.GetInt(), which read from the atomic config before it refreshes, resulting in incorrect port values (0 instead of 8443) and breaking the test.