Browse Source

Merge pull request #842 from Shopify/bump-versions

Bump supported/tested go and kafka versions
Evan Huus 8 years ago
parent
commit
2eecce00e6
4 changed files with 22 additions and 5 deletions
  1. 2 2
      .travis.yml
  2. 1 1
      README.md
  3. 2 1
      dev.yml
  4. 17 1
      message_test.go

+ 2 - 2
.travis.yml

@@ -2,6 +2,7 @@ language: go
 go:
 go:
 - 1.6.3
 - 1.6.3
 - 1.7.3
 - 1.7.3
+- 1.8
 
 
 env:
 env:
   global:
   global:
@@ -12,8 +13,7 @@ env:
   - DEBUG=true
   - DEBUG=true
   matrix:
   matrix:
   - KAFKA_VERSION=0.9.0.1
   - KAFKA_VERSION=0.9.0.1
-  - KAFKA_VERSION=0.10.0.1
-  - KAFKA_VERSION=0.10.1.0
+  - KAFKA_VERSION=0.10.2.0
 
 
 before_install:
 before_install:
 - export REPOSITORY_ROOT=${TRAVIS_BUILD_DIR}
 - export REPOSITORY_ROOT=${TRAVIS_BUILD_DIR}

+ 1 - 1
README.md

@@ -20,7 +20,7 @@ You might also want to look at the [Frequently Asked Questions](https://github.c
 Sarama provides a "2 releases + 2 months" compatibility guarantee: we support
 Sarama provides a "2 releases + 2 months" compatibility guarantee: we support
 the two latest stable releases of Kafka and Go, and we provide a two month
 the two latest stable releases of Kafka and Go, and we provide a two month
 grace period for older releases. This means we currently officially support
 grace period for older releases. This means we currently officially support
-Go 1.7 and 1.6, and Kafka 0.10.0 and 0.9.0, although older releases are
+Go 1.8, 1.7, and 1.6, and Kafka 0.10 and 0.9, although older releases are
 still likely to work.
 still likely to work.
 
 
 Sarama follows semantic versioning and provides API stability via the gopkg.in service.
 Sarama follows semantic versioning and provides API stability via the gopkg.in service.

+ 2 - 1
dev.yml

@@ -1,7 +1,8 @@
 name: sarama
 name: sarama
 
 
 up:
 up:
-  - go: 1.7.3
+  - go:
+      version: '1.8'
 
 
 commands:
 commands:
   test:
   test:

+ 17 - 1
message_test.go

@@ -1,6 +1,7 @@
 package sarama
 package sarama
 
 
 import (
 import (
+	"runtime"
 	"testing"
 	"testing"
 	"time"
 	"time"
 )
 )
@@ -24,6 +25,17 @@ var (
 		0x08,
 		0x08,
 		0, 0, 9, 110, 136, 0, 255, 1, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0}
 		0, 0, 9, 110, 136, 0, 255, 1, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0}
 
 
+	emptyGzipMessage18 = []byte{
+		132, 99, 80, 148, //CRC
+		0x00,                   // magic version byte
+		0x01,                   // attribute flags
+		0xFF, 0xFF, 0xFF, 0xFF, // key
+		// value
+		0x00, 0x00, 0x00, 0x17,
+		0x1f, 0x8b,
+		0x08,
+		0, 0, 0, 0, 0, 0, 255, 1, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0}
+
 	emptyLZ4Message = []byte{
 	emptyLZ4Message = []byte{
 		132, 219, 238, 101, // CRC
 		132, 219, 238, 101, // CRC
 		0x01,                          // version byte
 		0x01,                          // version byte
@@ -79,7 +91,11 @@ func TestMessageEncoding(t *testing.T) {
 
 
 	message.Value = []byte{}
 	message.Value = []byte{}
 	message.Codec = CompressionGZIP
 	message.Codec = CompressionGZIP
-	testEncodable(t, "empty gzip", &message, emptyGzipMessage)
+	if runtime.Version() == "go1.8" {
+		testEncodable(t, "empty gzip", &message, emptyGzipMessage18)
+	} else {
+		testEncodable(t, "empty gzip", &message, emptyGzipMessage)
+	}
 
 
 	message.Value = []byte{}
 	message.Value = []byte{}
 	message.Codec = CompressionLZ4
 	message.Codec = CompressionLZ4