Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions ldclient_end_to_end_fdv2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ func TestFDV2ShutdownDownIfBothSynchronizersFail(t *testing.T) {
expectedStreamError := "Error in stream connection (giving up permanently): HTTP error 401 (invalid SDK key)"
expectedPollError := "Error on polling request (giving up permanently): HTTP error 401 (invalid SDK key)"
assert.Equal(t, []string{expectedStreamError, expectedPollError}, logCapture.GetOutput(ldlog.Error))
assert.Equal(t, []string{pollingModeWarningMessage, initializationFailedErrorMessage}, logCapture.GetOutput(ldlog.Warn))
assert.Equal(t, []string{initializationFailedErrorMessage}, logCapture.GetOutput(ldlog.Warn))
})
}

Expand Down Expand Up @@ -280,7 +280,7 @@ func TestFDV2PollingSynchronizerFailsToStartWith401Error(t *testing.T) {

expectedError := "Error on polling request (giving up permanently): HTTP error 401 (invalid SDK key)"
assert.Equal(t, []string{expectedError}, logCapture.GetOutput(ldlog.Error))
assert.Equal(t, []string{pollingModeWarningMessage, initializationFailedErrorMessage}, logCapture.GetOutput(ldlog.Warn))
assert.Equal(t, []string{initializationFailedErrorMessage}, logCapture.GetOutput(ldlog.Warn))
})
}

Expand Down Expand Up @@ -372,7 +372,6 @@ func TestFDV2FileInitializerWillDeferToFirstSynchronizer(t *testing.T) {
handler, requestsCh := httphelpers.RecordingHandler(streamHandler)

testHelpers.WithTempFileData([]byte(`{"flags": {"`+alwaysFalseFlag.Key+`": {"on": false}}, "segments": {}}`), func(filename string) {

httphelpers.WithServer(handler, func(server *httptest.Server) {
logCapture := ldlogtest.NewMockLog()

Expand Down
2 changes: 0 additions & 2 deletions ldcomponents/polling_data_source_builder_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ func (b *PollingDataSourceBuilderV2) PayloadFilter(filterKey string) *PollingDat

// Build is called internally by the SDK.
func (b *PollingDataSourceBuilderV2) Build(context subsystems.ClientContext) (subsystems.DataSynchronizer, error) {
context.GetLogging().Loggers.Warn(
"You should only disable the streaming API if instructed to do so by LaunchDarkly support")
filterKey, wasSet := b.filterKey.Get()
if wasSet && filterKey == "" {
return nil, errors.New("payload filter key cannot be an empty string")
Expand Down