ci: reduce memory consumption of the linter
This commit is contained in:
parent
c87a37f804
commit
ff31e75ccc
5 changed files with 13 additions and 11 deletions
|
@ -33,13 +33,14 @@ func TestJobBackOff(t *testing.T) {
|
|||
// Assert that the next backoff falls in the expected range.
|
||||
var minInterval = expected - time.Duration(testRandomizationFactor*float64(expected))
|
||||
var maxInterval = expected + time.Duration(testRandomizationFactor*float64(expected))
|
||||
|
||||
if i < 3 || i == 8 {
|
||||
time.Sleep(2 * time.Second)
|
||||
}
|
||||
|
||||
var actualInterval = exp.NextBackOff()
|
||||
if !(minInterval <= actualInterval && actualInterval <= maxInterval) {
|
||||
t.Error("error")
|
||||
}
|
||||
// assertEquals(t, expected, exp.currentInterval)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ import (
|
|||
|
||||
func TestNewPoolContext(t *testing.T) {
|
||||
type testKeyType string
|
||||
|
||||
testKey := testKeyType("test")
|
||||
|
||||
ctx := context.WithValue(context.Background(), testKey, "test")
|
||||
|
|
|
@ -91,10 +91,7 @@ func (t *Tracing) Extract(format interface{}, carrier interface{}) (opentracing.
|
|||
|
||||
// IsEnabled determines if tracing was successfully activated.
|
||||
func (t *Tracing) IsEnabled() bool {
|
||||
if t == nil || t.tracer == nil {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
return t != nil && t.tracer != nil
|
||||
}
|
||||
|
||||
// Close tracer
|
||||
|
@ -169,9 +166,7 @@ func StartSpan(r *http.Request, operationName string, spanKind ext.SpanKindEnum,
|
|||
}
|
||||
|
||||
r = r.WithContext(ctx)
|
||||
return span, r, func() {
|
||||
span.Finish()
|
||||
}
|
||||
return span, r, func() { span.Finish() }
|
||||
}
|
||||
|
||||
// SetError flags the span associated with this request as in error.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue