1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Update utils_test.go

This commit is contained in:
Guillaume J. Charmes 2013-05-15 17:46:01 -07:00
parent 822cf67dae
commit 10f5b6486c

View file

@ -10,7 +10,7 @@ import (
func TestBufReader(t *testing.T) {
reader, writer := io.Pipe()
bufreader := newBufReader(reader)
bufreader := NewBufReader(reader)
// Write everything down to a Pipe
// Usually, a pipe should block but because of the buffered reader,
@ -55,7 +55,7 @@ func (dw *dummyWriter) Close() error {
}
func TestWriteBroadcaster(t *testing.T) {
writer := newWriteBroadcaster()
writer := NewWriteBroadcaster()
// Test 1: Both bufferA and bufferB should contain "foo"
bufferA := &dummyWriter{}
@ -137,7 +137,7 @@ func (d devNullCloser) Write(buf []byte) (int, error) {
// This test checks for races. It is only useful when run with the race detector.
func TestRaceWriteBroadcaster(t *testing.T) {
writer := newWriteBroadcaster()
writer := NewWriteBroadcaster()
c := make(chan bool)
go func() {
writer.AddWriter(devNullCloser(0))