mirror of
https://github.com/openfaas/faas.git
synced 2025-06-09 00:36:46 +00:00
Deference channel
The defer close statement was causing issues in CI Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit is contained in:
parent
a07ef4c194
commit
cdb6baddda
@ -75,7 +75,6 @@ func Test_Collect_CollectsTheNumberOfReplicasOfAService(t *testing.T) {
|
|||||||
exporter.services = []types.FunctionStatus{expectedService}
|
exporter.services = []types.FunctionStatus{expectedService}
|
||||||
|
|
||||||
ch := make(chan prometheus.Metric)
|
ch := make(chan prometheus.Metric)
|
||||||
defer close(ch)
|
|
||||||
|
|
||||||
go exporter.Collect(ch)
|
go exporter.Collect(ch)
|
||||||
|
|
||||||
@ -88,4 +87,6 @@ func Test_Collect_CollectsTheNumberOfReplicasOfAService(t *testing.T) {
|
|||||||
if expectedReplicas != result.value {
|
if expectedReplicas != result.value {
|
||||||
t.Errorf("Want %f, got %f", expectedReplicas, result.value)
|
t.Errorf("Want %f, got %f", expectedReplicas, result.value)
|
||||||
}
|
}
|
||||||
|
ch = nil
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user