diff --git a/message_test.go b/message_test.go index c94dda57f..03bb91044 100644 --- a/message_test.go +++ b/message_test.go @@ -2,6 +2,7 @@ package sarama import ( "runtime" + "strings" "testing" "time" ) @@ -106,7 +107,7 @@ func TestMessageEncoding(t *testing.T) { message.Value = []byte{} message.Codec = CompressionGZIP - if runtime.Version() == "go1.8" || runtime.Version() == "go1.8.1" { + if runtime.Version() == "go1.8" || strings.HasPrefix(runtime.Version(), "go1.8.") { testEncodable(t, "empty gzip", &message, emptyGzipMessage18) } else { testEncodable(t, "empty gzip", &message, emptyGzipMessage)