mirror of
https://github.com/go-micro/go-micro.git
synced 2024-11-24 08:02:32 +02:00
Fix after merge
This commit is contained in:
parent
34b1c403bb
commit
c3607c23e7
@ -13,10 +13,10 @@ func (k *klog) Write(l log.Record) {
|
|||||||
write(l)
|
write(l)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (k *klog) Stream(stop chan bool) <-chan log.Record {
|
func (k *klog) Stream() (<-chan log.Record, chan bool) {
|
||||||
c := make(chan log.Record)
|
c, s := make(chan log.Record), make(chan bool)
|
||||||
go close(c)
|
go close(c)
|
||||||
return c
|
return c, s
|
||||||
}
|
}
|
||||||
|
|
||||||
// New returns a configured Kubernetes logger
|
// New returns a configured Kubernetes logger
|
||||||
|
@ -41,11 +41,12 @@ func TestKubernetes(t *testing.T) {
|
|||||||
|
|
||||||
assert.Nil(t, k.Read(), "Read should be unimplemented")
|
assert.Nil(t, k.Read(), "Read should be unimplemented")
|
||||||
|
|
||||||
stream := k.Stream(make(chan bool))
|
stream, stop := k.Stream()
|
||||||
records := []log.Record{}
|
records := []log.Record{}
|
||||||
for s := range stream {
|
for s := range stream {
|
||||||
records = append(records, s)
|
records = append(records, s)
|
||||||
}
|
}
|
||||||
|
close(stop)
|
||||||
assert.Equal(t, 0, len(records), "Stream should be unimplemented")
|
assert.Equal(t, 0, len(records), "Stream should be unimplemented")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user