Skip to content

Commit

Permalink
Merge pull request #951 from Shopify/fix-1.8-test
Browse files Browse the repository at this point in the history
Fix gzip test for all possible 1.8 point releases
  • Loading branch information
eapache authored Sep 18, 2017
2 parents be3a4e3 + 48adab0 commit 4704a3a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion message_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package sarama

import (
"runtime"
"strings"
"testing"
"time"
)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 4704a3a

Please sign in to comment.