Skip to content

Commit

Permalink
Merge pull request #842 from Shopify/bump-versions
Browse files Browse the repository at this point in the history
Bump supported/tested go and kafka versions
  • Loading branch information
eapache authored Mar 2, 2017
2 parents 35bd9c5 + aa3b526 commit 2eecce0
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ language: go
go:
- 1.6.3
- 1.7.3
- 1.8

env:
global:
Expand All @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion dev.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: sarama

up:
- go: 1.7.3
- go:
version: '1.8'

commands:
test:
Expand Down
18 changes: 17 additions & 1 deletion message_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package sarama

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

0 comments on commit 2eecce0

Please sign in to comment.