Skip to content

Commit

Permalink
Add flag instead of label in for loop
Browse files Browse the repository at this point in the history
  • Loading branch information
KaloyanTanev committed Apr 4, 2024
1 parent 7755bbf commit 6d36ada
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions cmd/testbeacon.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,17 @@ func runTestBeacon(ctx context.Context, w io.Writer, cfg testBeaconConfig) (err
go runAllBeacon(timeoutCtx, queuedTests, testCases, cfg, ch)

testCounter := 0
outer:
for {
finished := false
for !finished {
var name string
select {
case <-timeoutCtx.Done():
name = queuedTests[testCounter].name
res.TestsExecuted[name] = testResult{Verdict: testVerdictFail}

break outer
case result, ok := <-ch:
if !ok {
break outer
finished = true
break
}
name = queuedTests[testCounter].name
testCounter++
Expand Down

0 comments on commit 6d36ada

Please sign in to comment.