diff --git a/exporters/otlp/otlplog/otlploghttp/exporter.go b/exporters/otlp/otlplog/otlploghttp/exporter.go index 5ca9822a8ff..0757f001595 100644 --- a/exporters/otlp/otlplog/otlploghttp/exporter.go +++ b/exporters/otlp/otlplog/otlploghttp/exporter.go @@ -48,6 +48,5 @@ func (e *Exporter) Shutdown(ctx context.Context) error { // ForceFlush does nothing. The Exporter holds no state. func (e *Exporter) ForceFlush(ctx context.Context) error { - // TODO: implement. return nil } diff --git a/exporters/otlp/otlplog/otlploghttp/exporter_test.go b/exporters/otlp/otlplog/otlploghttp/exporter_test.go new file mode 100644 index 00000000000..c02a3343234 --- /dev/null +++ b/exporters/otlp/otlplog/otlploghttp/exporter_test.go @@ -0,0 +1,20 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otlploghttp + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestExporterForceFlush(t *testing.T) { + ctx := context.Background() + e, err := New(ctx) + require.NoError(t, err, "New") + + assert.NoError(t, e.ForceFlush(ctx), "ForceFlush") +}