Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[exporter/elasticsearch][chore]: Fix copyloopvar issues #36801

Merged
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
4 changes: 0 additions & 4 deletions exporter/elasticsearchexporter/bulkindexer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ func TestAsyncBulkIndexer_flush(t *testing.T) {
}

for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
client, err := elasticsearch.NewClient(elasticsearch.Config{Transport: &mockTransport{
Expand Down Expand Up @@ -139,7 +138,6 @@ func TestAsyncBulkIndexer_requireDataStream(t *testing.T) {
}

for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
requireDataStreamCh := make(chan bool, 1)
Expand Down Expand Up @@ -215,7 +213,6 @@ func TestAsyncBulkIndexer_flush_error(t *testing.T) {
}

for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
cfg := Config{NumWorkers: 1, Flush: FlushSettings{Interval: time.Hour, Bytes: 1}}
Expand Down Expand Up @@ -269,7 +266,6 @@ func TestAsyncBulkIndexer_logRoundTrip(t *testing.T) {
}

for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
t.Parallel()

Expand Down
1 change: 0 additions & 1 deletion exporter/elasticsearchexporter/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,6 @@ func TestConfig(t *testing.T) {
}

for _, tt := range tests {
tt := tt
t.Run(strings.ReplaceAll(tt.id.String(), "/", "_"), func(t *testing.T) {
factory := NewFactory()
cfg := factory.CreateDefaultConfig()
Expand Down
2 changes: 0 additions & 2 deletions exporter/elasticsearchexporter/exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -562,11 +562,9 @@ func TestExporterLogs(t *testing.T) {
}

for name, handler := range handlers {
handler := handler
t.Run(name, func(t *testing.T) {
t.Parallel()
for name, configurer := range configurations {
configurer := configurer
t.Run(name, func(t *testing.T) {
t.Parallel()
attempts := &atomic.Int64{}
Expand Down
1 change: 0 additions & 1 deletion exporter/elasticsearchexporter/mapping_hint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ func TestHasHint(t *testing.T) {
},
}
for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
assert.Equal(t, tt.want, newMappingHintGetter(tt.attrsFunc()).HasMappingHint(tt.hint))
})
Expand Down
Loading