Skip to content

Commit 81e4140

Browse files
authored
fix: incorrect error usage and typo (#293)
1 parent 4b0fb1f commit 81e4140

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

e2e/service.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ type Service struct {
4444
offsetCommitLatency *prometheus.HistogramVec
4545
}
4646

47-
// NewService creates a new instance of the e2e moinitoring service (wow)
47+
// NewService creates a new instance of the e2e monitoring service (wow)
4848
func NewService(ctx context.Context, cfg Config, logger *zap.Logger, kafkaSvc *kafka.Service, promRegisterer prometheus.Registerer) (*Service, error) {
4949
minionID := uuid.NewString()
5050
groupID := fmt.Sprintf("%v-%v", cfg.Consumer.GroupIdPrefix, minionID)
@@ -53,7 +53,7 @@ func NewService(ctx context.Context, cfg Config, logger *zap.Logger, kafkaSvc *k
5353
kgoOpts := []kgo.Opt{
5454
kgo.ProduceRequestTimeout(3 * time.Second),
5555
kgo.RecordRetries(3),
56-
// We use the manual partitioner so that the records' partition id will be used as target partitio
56+
// We use the manual partitioner so that the records' partition id will be used as target partition
5757
kgo.RecordPartitioner(kgo.ManualPartitioner()),
5858
}
5959
if cfg.Producer.RequiredAcks == "all" {

e2e/topic.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ func (s *Service) executeCreatePartitions(ctx context.Context, req *kmsg.CreateP
123123
for _, topic := range res.Topics {
124124
typedErr := kerr.TypedErrorForCode(topic.ErrorCode)
125125
if typedErr != nil {
126-
return fmt.Errorf("inner Kafka error: %w", err)
126+
return fmt.Errorf("inner Kafka error: %w", typedErr)
127127
}
128128
}
129129

@@ -397,7 +397,7 @@ func createTopicConfig(cfgTopic EndToEndTopicConfig) []kmsg.CreateTopicsRequestT
397397
}
398398

399399
// Even though kminion's end-to-end feature actually does not require any
400-
// real persistence beyond a few minutes; it might be good too keep messages
400+
// real persistence beyond a few minutes; it might be good to keep messages
401401
// around a bit for debugging.
402402
return []kmsg.CreateTopicsRequestTopicConfig{
403403
topicConfig("cleanup.policy", "delete"),

0 commit comments

Comments
 (0)