diff --git a/.travis.yml b/.travis.yml index cd5d3c494..c46804078 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,7 @@ language: go go: - 1.6.3 - 1.7.3 +- 1.8 env: global: @@ -12,8 +13,7 @@ env: - DEBUG=true matrix: - 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: - export REPOSITORY_ROOT=${TRAVIS_BUILD_DIR} diff --git a/README.md b/README.md index 4801b1d64..0c0b9f570 100644 --- a/README.md +++ b/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 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 -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. Sarama follows semantic versioning and provides API stability via the gopkg.in service. diff --git a/dev.yml b/dev.yml index e014316fe..adcf94213 100644 --- a/dev.yml +++ b/dev.yml @@ -1,7 +1,8 @@ name: sarama up: - - go: 1.7.3 + - go: + version: '1.8' commands: test: diff --git a/message_test.go b/message_test.go index af70b7b18..d4a37c22d 100644 --- a/message_test.go +++ b/message_test.go @@ -1,6 +1,7 @@ package sarama import ( + "runtime" "testing" "time" ) @@ -24,6 +25,17 @@ var ( 0x08, 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{ 132, 219, 238, 101, // CRC 0x01, // version byte @@ -79,7 +91,11 @@ func TestMessageEncoding(t *testing.T) { message.Value = []byte{} 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.Codec = CompressionLZ4