trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From masa...@apache.org
Subject [trafficserver] branch quic-latest updated: Fix unit test of QPACK
Date Tue, 05 Feb 2019 05:39:34 GMT
This is an automated email from the ASF dual-hosted git repository.

masaori pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/quic-latest by this push:
     new 9bbdb91  Fix unit test of QPACK
9bbdb91 is described below

commit 9bbdb911853d9fdfa824338a91dcdbeece1ee843
Author: Masaori Koshiba <masaori@apache.org>
AuthorDate: Tue Feb 5 14:39:17 2019 +0900

    Fix unit test of QPACK
---
 proxy/http3/test/test_QPACK.cc | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/proxy/http3/test/test_QPACK.cc b/proxy/http3/test/test_QPACK.cc
index 02fd505..c2a1311 100644
--- a/proxy/http3/test/test_QPACK.cc
+++ b/proxy/http3/test/test_QPACK.cc
@@ -288,7 +288,7 @@ test_encode(const char *qif_file, const char *out_file, int dts, int mbs,
int am
   int n_requests                  = load_qif_file(qif_file, requests);
 
   QUICApplicationDriver driver;
-  QPACK *qpack                   = new QPACK(driver.get_connection(), dts, mbs);
+  QPACK *qpack                   = new QPACK(driver.get_connection(), UINT32_MAX, dts, mbs);
   TestQUICStream *encoder_stream = new TestQUICStream(0);
   TestQUICStream *decoder_stream = new TestQUICStream(9999);
   qpack->set_stream(encoder_stream);
@@ -296,10 +296,11 @@ test_encode(const char *qif_file, const char *out_file, int dts, int
mbs, int am
 
   uint64_t stream_id                  = 1;
   MIOBuffer *header_block             = new_MIOBuffer();
+  uint64_t header_block_len           = 0;
   IOBufferReader *header_block_reader = header_block->alloc_reader();
   for (int i = 0; i < n_requests; ++i) {
     HTTPHdr *hdr = requests[i];
-    ret          = qpack->encode(stream_id, *hdr, header_block);
+    ret          = qpack->encode(stream_id, *hdr, header_block, header_block_len);
     if (ret < 0) {
       break;
     }
@@ -334,7 +335,7 @@ test_decode(const char *enc_file, const char *out_file, int dts, int mbs,
int am
   TestQPACKEventHandler *event_handler = new TestQPACKEventHandler();
 
   QUICApplicationDriver driver;
-  QPACK *qpack                   = new QPACK(driver.get_connection(), dts, mbs);
+  QPACK *qpack                   = new QPACK(driver.get_connection(), UINT32_MAX, dts, mbs);
   TestQUICStream *encoder_stream = new TestQUICStream(0);
   qpack->set_stream(encoder_stream);
 


Mime
View raw message