unit test for portal suspended
This commit is contained in:
parent
6585f85d03
commit
e61ec5dfed
@ -283,6 +283,10 @@ p.parseMessage = function() {
|
||||
msg.name = 'emptyQuery';
|
||||
return msg;
|
||||
|
||||
case 0x73: //s
|
||||
msg.name = 'portalSuspended';
|
||||
return msg;
|
||||
|
||||
default:
|
||||
throw new Error("Unrecognized message code " + id);
|
||||
}
|
||||
|
@ -117,4 +117,8 @@ buffers.emptyQuery = function() {
|
||||
return new BufferList().join(true, 'I');
|
||||
};
|
||||
|
||||
buffers.portalSuspended = function() {
|
||||
return new BufferList().join(true, 's');
|
||||
};
|
||||
|
||||
module.exports = buffers;
|
||||
|
@ -11,6 +11,7 @@ var backendKeyDataBuffer = buffers.backendKeyData(1,2);
|
||||
var commandCompleteBuffer = buffers.commandComplete("SELECT 3");
|
||||
var parseCompleteBuffer = buffers.parseComplete();
|
||||
var bindCompleteBuffer = buffers.bindComplete();
|
||||
var portalSuspendedBuffer = buffers.portalSuspended();
|
||||
|
||||
var addRow = function(bufferList, name, offset) {
|
||||
return bufferList.addCString(name) //field name
|
||||
@ -339,6 +340,12 @@ test('Connection', function() {
|
||||
name: 'bindComplete'
|
||||
});
|
||||
});
|
||||
|
||||
test('parses portal suspended message', function() {
|
||||
testForMessage(portalSuspendedBuffer, {
|
||||
name: 'portalSuspended'
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
//since the data message on a stream can randomly divide the incomming
|
||||
|
Loading…
Reference in New Issue
Block a user