From 80d136a531e65b22ae0f9e04652bcf524bd015ec Mon Sep 17 00:00:00 2001 From: Brian Carlson Date: Mon, 24 Apr 2017 13:33:38 -0500 Subject: [PATCH] Add test & documentation for replicationStart message --- CHANGELOG.md | 4 ++++ test/unit/connection/inbound-parser-tests.js | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a8efbfed6..56b294133 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/test/unit/connection/inbound-parser-tests.js b/test/unit/connection/inbound-parser-tests.js index 13e6fd9eb..a9910966b 100644 --- a/test/unit/connection/inbound-parser-tests.js +++ b/test/unit/connection/inbound-parser-tests.js @@ -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); }); }); - });