This commit is contained in:
Tom Wilkie
2015-08-27 15:25:24 +00:00
parent 44e6fd2adb
commit 142aa067ec
2 changed files with 2 additions and 4 deletions

View File

@@ -222,7 +222,7 @@ func (c *container) GetNodeMetadata() report.NodeMetadata {
return result
}
result.Merge(report.MakeNodeMetadataWith(map[string]string{
result = result.Merge(report.MakeNodeMetadataWith(map[string]string{
NetworkRxDropped: strconv.FormatUint(c.latestStats.Network.RxDropped, 10),
NetworkRxBytes: strconv.FormatUint(c.latestStats.Network.RxBytes, 10),
NetworkRxErrors: strconv.FormatUint(c.latestStats.Network.RxErrors, 10),

View File

@@ -8,7 +8,6 @@ import (
"log"
"net"
"net/http"
"runtime"
"testing"
"time"
@@ -55,7 +54,6 @@ func TestContainer(t *testing.T) {
t.Errorf("%v", err)
}
defer c.StopGatheringStats()
runtime.Gosched() // wait for StartGatheringStats goroutine to call connection.Do
// Send some stats to the docker container
stats := &client.Stats{}
@@ -65,7 +63,7 @@ func TestContainer(t *testing.T) {
}
// Now see if we go them
test.Poll(t, 10*time.Millisecond, "12345", func() interface{} {
test.Poll(t, 100*time.Millisecond, "12345", func() interface{} {
return c.GetNodeMetadata().Metadata[docker.MemoryUsage]
})
}