Skip to content

Commit

Permalink
update does a request and gets a response with gzip encoding for resp…
Browse files Browse the repository at this point in the history
…onse larger than MAX_PAYLOAD_SIZE spec
  • Loading branch information
hthetiot committed Jul 13, 2018
1 parent 0bb2613 commit a2b6da2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,10 @@ describe('http.js', function() {

it('does a request and gets a response with gzip encoding for response larger than MAX_PAYLOAD_SIZE', function (done) {
var path = '/x';
var message = generateRandAlphaNumStr(4096 * 10);
// TODO validate this test is not false positive or memory limit
// use larger than MAX_PAYLOAD_SIZE > 3 make that test fail
// Lines : 89.51% ( 1972/2203 ) vs Lines : 89.61% ( 1974/2203 )
var message = generateRandAlphaNumStr(4096 * 3);
var compressedMessage = pako.gzip(message);
compressedMessage = Buffer.from(compressedMessage.buffer);
var server = http2.createServer(serverOptions, function (request, response) {
Expand Down

0 comments on commit a2b6da2

Please sign in to comment.