Skip to content

Commit

Permalink
fixed topic parameter value assignment
Browse files Browse the repository at this point in the history
Signed-off-by: axfor <aixiaoxiang2009@hotmail.com>
  • Loading branch information
axfor committed Jul 22, 2023
1 parent 95d97e0 commit 77acc07
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions cmd/ingester/app/builder/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,13 @@ func CreateConsumer(logger *zap.Logger, metricsFactory metrics.Factory, spanWrit

factoryParams := consumer.ProcessorFactoryParams{
Parallelism: options.Parallelism,
Topic: options.Topic,
SaramaConsumer: saramaConsumer,
BaseProcessor: spanProcessor,
Logger: logger,
Factory: metricsFactory,
}

processorFactory, err := consumer.NewProcessorFactory(factoryParams)
if err != nil {
return nil, err
Expand Down
4 changes: 2 additions & 2 deletions cmd/ingester/app/consumer/consumer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ func TestGroupConsumer(t *testing.T) {

logger, logBuf := testutils.NewLogger()
factoryParams := ProcessorFactoryParams{
Topic: topic,
Parallelism: 1,
Topic: topic,
SaramaConsumer: saramaConsumer,
BaseProcessor: spanProcessor,
Logger: logger,
Expand Down Expand Up @@ -289,8 +289,8 @@ func TestGroupConsumerWithDeadlockDetector(t *testing.T) {

logger, logBuf := testutils.NewLogger()
factoryParams := ProcessorFactoryParams{
Topic: topic,
Parallelism: 1,
Topic: topic,
SaramaConsumer: saramaConsumer,
BaseProcessor: spanProcessor,
Logger: logger,
Expand Down
2 changes: 1 addition & 1 deletion cmd/ingester/app/consumer/processor_factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ func Test_New(t *testing.T) {
processor.On("Close").Return(nil)

factoryParams := ProcessorFactoryParams{
Topic: "fake_msg_test",
Parallelism: 1,
Topic: "fake_msg_test",
BaseProcessor: processor,
Logger: logger,
Factory: metrics.NullFactory,
Expand Down

0 comments on commit 77acc07

Please sign in to comment.