Files
poseidon/util/util_test.go
sirkrypt0 c7606f3d5f Fix a lot of linting issues
After we introduced the linter we haven't really touched the old code.
This commit now fixes all linting issue that exist right now.
2021-07-13 08:59:25 +02:00

21 lines
493 B
Go

package util
import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"gitlab.hpi.de/codeocean/codemoon/poseidon/tests"
"testing"
)
func TestNullReaderDoesNotReturnImmediately(t *testing.T) {
reader := &NullReader{}
readerReturned := make(chan bool)
go func() {
p := make([]byte, 0, 5)
_, err := reader.Read(p)
require.NoError(t, err)
close(readerReturned)
}()
assert.False(t, tests.ChannelReceivesSomething(readerReturned, tests.ShortTimeout))
}