Skip to content

Commit

Permalink
Drop node 6 add node 12 (#1239)
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperlink committed Apr 30, 2019
1 parent 2fa26aa commit 7ee0583
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ cache:
directories:
- node_modules
node_js:
- "12"
- "10"
- "8"
- "6"
sudo: required
services:
- docker
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"uuid": "^3.0.0"
},
"engines": {
"node": ">=6.4.0"
"node": ">=8.5.1"
},
"optionalDependencies": {
"snappy": "^6.0.1"
Expand Down
16 changes: 11 additions & 5 deletions test/test.consumer.js
Original file line number Diff line number Diff line change
Expand Up @@ -627,17 +627,23 @@ describe('Consumer', function () {
consumer.payloads.map(normalize).should.eql([{ topic: topic2, partition: 1 }]);

consumer.resumeTopics([{ topic: topic1, partition: 0 }]);
consumer.payloads
.map(normalize)
.sort(compare)
.should.eql([{ topic: topic1, partition: 0 }, { topic: topic2, partition: 1 }]);

const actual = consumer.payloads.map(normalize).sort(compare);
const expected = [{ topic: topic2, partition: 1 }, { topic: topic1, partition: 0 }].sort(compare);

actual.should.eql(expected);

consumer.pausedPayloads
.map(normalize)
.sort(compare)
.should.eql([{ topic: topic1, partition: 1 }, { topic: topic2, partition: 0 }]);

consumer.resumeTopics([topic1, topic2]);
consumer.payloads.sort(compare).should.eql(topics);

for (const tp of topics) {
consumer.payloads.should.containEql(tp);
}

consumer.pausedPayloads.should.eql([]);
consumer.once('message', function () {
consumer.close(true, done);
Expand Down

0 comments on commit 7ee0583

Please sign in to comment.