Skip to content

Commit

Permalink
Add test & documentation for replicationStart message
Browse files Browse the repository at this point in the history
  • Loading branch information
brianc committed Apr 24, 2017
1 parent 4f790de commit 80d136a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -4,6 +4,10 @@ For richer information consult the commit log on github with referenced pull req

We do not include break-fix version release in this file.

### v6.2.0

- Add support for [parsing `replicationStart` messages](https://github.com/brianc/node-postgres/pull/1271/files).

### v6.1.0

- Add optional callback parameter to the pure JavaScript `client.end` method. The native client already supported this.
Expand Down
8 changes: 7 additions & 1 deletion test/unit/connection/inbound-parser-tests.js
Expand Up @@ -347,6 +347,13 @@ test('Connection', function() {
name: 'portalSuspended'
});
});

test('parses replication start message', function() {
testForMessage(new Buffer([0x57, 0x00, 0x00, 0x00, 0x04]), {
name: 'replicationStart',
length: 4
});
});
});

//since the data message on a stream can randomly divide the incomming
Expand Down Expand Up @@ -465,5 +472,4 @@ test('split buffer, multiple message parsing', function() {
splitAndVerifyTwoMessages(1);
});
});

});

0 comments on commit 80d136a

Please sign in to comment.