Skip to content

Commit 58d31cc

Browse files
committed
Reduce timeout for unit tests.
1 parent 0704bcb commit 58d31cc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ lint: install-golangci-lint simple-lint
199199
${LINTER} run ./...
200200

201201
test:
202-
CGO_ENABLED=0 go test -timeout 15m -coverprofile coverage.txt -failfast ./...
202+
CGO_ENABLED=0 go test -timeout 10m -coverprofile coverage.txt -failfast ./...
203203

204204
# List of existing packages with data races
205205
# TODO: Fix each

plugins/inputs/logfile/tail/tail_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@ func TestConcurrentLinePoolAccess(t *testing.T) {
377377
wg.Add(1)
378378
go func() {
379379
defer wg.Done()
380+
defer close(linesChan)
380381
for i := 0; i < numLines; i++ {
381382
select {
382383
case line := <-tail.Lines:
@@ -386,7 +387,6 @@ func TestConcurrentLinePoolAccess(t *testing.T) {
386387
return
387388
}
388389
}
389-
close(linesChan)
390390
}()
391391

392392
numWorkers := 5

0 commit comments

Comments
 (0)