Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fpetkovski committed Jan 3, 2023
1 parent d2d8d9c commit 9836a25
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/remote.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) The Thanos Community Authors.
// Licensed under the Apache License 2.0.

package api

import (
Expand Down
13 changes: 13 additions & 0 deletions execution/exchange/coalesce.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"context"
"sync"

"github.com/efficientgo/core/errors"
"github.com/prometheus/prometheus/model/labels"

"github.com/thanos-community/promql-engine/execution/model"
Expand Down Expand Up @@ -141,6 +142,18 @@ func (c *coalesceOperator) loadSeries(ctx context.Context) error {
wg.Add(1)
go func(i int) {
defer wg.Done()
defer func() {
e := recover()
if e == nil {
return
}

switch err := e.(type) {
case error:
errChan <- errors.Wrapf(err, "unexpected error")
}

}()
series, err := c.operators[i].Series(ctx)
if err != nil {
errChan <- err
Expand Down
3 changes: 3 additions & 0 deletions execution/remote/operator.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) The Thanos Community Authors.
// Licensed under the Apache License 2.0.

package remote

import (
Expand Down

0 comments on commit 9836a25

Please sign in to comment.