-
Notifications
You must be signed in to change notification settings - Fork 33
Closed
Description
Describe the bug
After upgrading from 1.19.2 to 1.20.0, our tests started failing.
Upon investigation, we found that the value provided to setApiHost
is being overwritten by the settings retrieved from the cdhHost/v1/projects/XXX/settings
. If we simulate a failure retrieving settings, the default apiHost it also used:
analytics-kotlin.properties
segment.settings={"integrations"\:{"Segment.io"\:{"apiKey"\:"XXX","apiHost"\:"api.segment.io/v1"}}}
To Reproduce
- Instantiate the client using
ConfigurationBuilder#setApiHost
to set a custom endpoint (e.g., a mock endpoint for testing) - Send some events
- Observe that the events are sent to the default apiHost (api.segment.io/v1), rather than the endpoint specified
Expected behavior
The configuration option provided via setApiHost should take precedence and be respected.
Platform (please complete the following information):
- Library Version in use: 1.20.0
- Platform being tested: java server
- Integrations in use: -
Additional context
We managed to work around this issue by also mocking the settings requests to include the desired apiHost.
Metadata
Metadata
Assignees
Labels
No labels