Add test & documentation for replicationStart message

This commit is contained in:
Brian Carlson 2017-04-24 13:33:38 -05:00
parent 4f790deb73
commit 80d136a531
2 changed files with 11 additions and 1 deletions

View File

@ -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.

View File

@ -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
@ -465,5 +472,4 @@ test('split buffer, multiple message parsing', function() {
splitAndVerifyTwoMessages(1);
});
});
});