Skip to content

Commit

Permalink
Fix some typo in kafkareceiver and kafkaexporter package (open-teleme…
Browse files Browse the repository at this point in the history
  • Loading branch information
hanjm authored Apr 19, 2021
1 parent ec395ec commit a7f9784
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const (
defaultMetadataFull = true
)

// FactoryOption applies changes to kafkaExporterFactory.
// FactoryOption applies changes to kafkaReceiverFactory.
type FactoryOption func(factory *kafkaReceiverFactory)

// WithAddUnmarshallers adds marshallers.
Expand Down
8 changes: 4 additions & 4 deletions factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ func TestWithUnmarshallers(t *testing.T) {

t.Run("custom_encoding", func(t *testing.T) {
cfg.Encoding = unmarshaller.Encoding()
exporter, err := f.CreateTracesReceiver(context.Background(), component.ReceiverCreateParams{}, cfg, nil)
receiver, err := f.CreateTracesReceiver(context.Background(), component.ReceiverCreateParams{}, cfg, nil)
require.NoError(t, err)
require.NotNil(t, exporter)
require.NotNil(t, receiver)
})
t.Run("default_encoding", func(t *testing.T) {
cfg.Encoding = new(otlpTracesPbUnmarshaller).Encoding()
exporter, err := f.CreateTracesReceiver(context.Background(), component.ReceiverCreateParams{}, cfg, nil)
receiver, err := f.CreateTracesReceiver(context.Background(), component.ReceiverCreateParams{}, cfg, nil)
require.NoError(t, err)
assert.NotNil(t, exporter)
assert.NotNil(t, receiver)
})
}

Expand Down
2 changes: 1 addition & 1 deletion kafka_receiver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func TestNewReceiver_encoding_err(t *testing.T) {
assert.EqualError(t, err, errUnrecognizedEncoding.Error())
}

func TestNewExporter_err_auth_type(t *testing.T) {
func TestNewReceiver_err_auth_type(t *testing.T) {
c := Config{
ProtocolVersion: "2.0.0",
Authentication: kafkaexporter.Authentication{
Expand Down

0 comments on commit a7f9784

Please sign in to comment.