Skip to content

Commit

Permalink
chore(promql-compliance-tester): add newline to the end of progress bar
Browse files Browse the repository at this point in the history
  • Loading branch information
tdakkota committed Jul 2, 2024
1 parent b085670 commit 308551c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions cmd/promql-compliance-tester/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,17 @@ func main() {
)
expandedTestCases := testcases.ExpandTestCases(cfg.TestCases, cfg.QueryTweaks, start, end, resolution)

var (
results = make([]*comparer.Result, len(expandedTestCases))
progressBar = pb.StartNew(len(results))
)
// Progress bar messes up Github Actions logs, so keep it static.
if os.Getenv("GITHUB_ACTIONS") == "true" {
progressBar.SetTemplate(pb.Default + `{{ "\n" }}`)
}

var wg sync.WaitGroup
results := make([]*comparer.Result, len(expandedTestCases))
progressBar := pb.StartNew(len(results))
wg.Add(len(results))

workCh := make(chan struct{}, *queryParallelism)

allSuccess := atomic.NewBool(true)
Expand Down

0 comments on commit 308551c

Please sign in to comment.