Skip to content

Commit

Permalink
Remove flaky TestConfigString test
Browse files Browse the repository at this point in the history
  • Loading branch information
sincejune committed Jan 15, 2025
1 parent e30c908 commit a635f0f
Showing 1 changed file with 0 additions and 45 deletions.
45 changes: 0 additions & 45 deletions exporter/datasetexporter/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ import (
"time"

"github.com/stretchr/testify/assert"
"go.opentelemetry.io/collector/config/configretry"
"go.opentelemetry.io/collector/confmap"
"go.opentelemetry.io/collector/exporter/exporterhelper"
)

func TestConfigUnmarshalUnknownAttributes(t *testing.T) {
Expand Down Expand Up @@ -102,49 +100,6 @@ func TestConfigValidate(t *testing.T) {
}
}

func TestConfigString(t *testing.T) {
config := Config{
DatasetURL: "https://example.com",
APIKey: "secret",
Debug: true,
BufferSettings: BufferSettings{
MaxLifetime: 123,
PurgeOlderThan: 567,
GroupBy: []string{"field1", "field2"},
},
TracesSettings: TracesSettings{
exportSettings: exportSettings{
ExportSeparator: "TTT",
ExportDistinguishingSuffix: "UUU",
},
},
LogsSettings: LogsSettings{
ExportResourceInfo: true,
ExportResourcePrefix: "AAA",
ExportScopeInfo: true,
ExportScopePrefix: "BBB",
DecomposeComplexMessageField: true,
DecomposedComplexMessagePrefix: "EEE",
exportSettings: exportSettings{
ExportSeparator: "CCC",
ExportDistinguishingSuffix: "DDD",
},
},
ServerHostSettings: ServerHostSettings{
ServerHost: "foo-bar",
UseHostName: false,
},
BackOffConfig: configretry.NewDefaultBackOffConfig(),
QueueSettings: exporterhelper.NewDefaultQueueConfig(),
TimeoutSettings: exporterhelper.NewDefaultTimeoutConfig(),
}

assert.Equal(t,
"DatasetURL: https://example.com; APIKey: [REDACTED] (6); Debug: true; BufferSettings: {MaxLifetime:123ns PurgeOlderThan:567ns GroupBy:[field1 field2] RetryInitialInterval:0s RetryMaxInterval:0s RetryMaxElapsedTime:0s RetryShutdownTimeout:0s MaxParallelOutgoing:0}; LogsSettings: {ExportResourceInfo:true ExportResourcePrefix:AAA ExportScopeInfo:true ExportScopePrefix:BBB DecomposeComplexMessageField:true DecomposedComplexMessagePrefix:EEE exportSettings:{ExportSeparator:CCC ExportDistinguishingSuffix:DDD}}; TracesSettings: {exportSettings:{ExportSeparator:TTT ExportDistinguishingSuffix:UUU}}; ServerHostSettings: {UseHostName:false ServerHost:foo-bar}; BackOffConfig: {Enabled:true InitialInterval:5s RandomizationFactor:0.5 Multiplier:1.5 MaxInterval:30s MaxElapsedTime:5m0s}; QueueSettings: {Enabled:true NumConsumers:10 QueueSize:1000 StorageID:<nil>}; TimeoutSettings: {Timeout:5s}",
config.String(),
)
}

func TestConfigUseProvidedExportResourceInfoValue(t *testing.T) {
f := NewFactory()
config := f.CreateDefaultConfig().(*Config)
Expand Down

0 comments on commit a635f0f

Please sign in to comment.