Skip to content

Commit

Permalink
Fixed lint error for otel collector v0.106.1 AND increased duration f…
Browse files Browse the repository at this point in the history
…or TestTacacsLocal unreachable test
  • Loading branch information
chan-tim-sumo committed Aug 23, 2024
1 parent 8e83132 commit 09c49b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plugins/inputs/tacacs/tacacs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ func TestTacacsLocal(t *testing.T) {
},
{
name: "unreachable",
testingTimeout: config.Duration(time.Nanosecond * 1000),
testingTimeout: config.Duration(time.Second * 2),
serverToTest: []string{"unreachable.test:49"},
usedUsername: config.NewSecret([]byte(`testusername`)),
usedPassword: config.NewSecret([]byte(`testpassword`)),
Expand Down
5 changes: 3 additions & 2 deletions plugins/parsers/parquet/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,11 @@ func (p *Parser) Parse(buf []byte) ([]telegraf.Metric, error) {
for i := 0; i < parquetReader.NumRowGroups(); i++ {
rowGroup := parquetReader.RowGroup(i)
scanners := make([]*columnParser, metadata.Schema.NumColumns())
for colIndex := range metadata.Schema.NumColumns() {
numCols := metadata.Schema.NumColumns()
for colIndex := 0; colIndex < numCols; colIndex++ {
col, err := rowGroup.Column(colIndex)
if err != nil {
return nil, fmt.Errorf("unable to fetch column %q: %w", colIndex, err)
return nil, fmt.Errorf("unable to fetch column %d: %w", colIndex, err)
}

scanners[colIndex] = newColumnParser(col)
Expand Down

0 comments on commit 09c49b8

Please sign in to comment.