You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ma...@apache.org on 2018/02/21 07:13:58 UTC

[trafficserver] branch quic-latest updated: Update tests

This is an automated email from the ASF dual-hosted git repository.

maskit 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 a60303a  Update tests
a60303a is described below

commit a60303a647bec7c718e66f351cd877c7e9f68488
Author: Masakazu Kitajo <ma...@apache.org>
AuthorDate: Wed Feb 21 16:13:42 2018 +0900

    Update tests
---
 iocore/net/quic/test/test_QUICFrame.cc     |  3 +--
 iocore/net/quic/test/test_QUICHandshake.cc |  3 +--
 iocore/net/quic/test/test_QUICStream.cc    | 15 +++++----------
 3 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/iocore/net/quic/test/test_QUICFrame.cc b/iocore/net/quic/test/test_QUICFrame.cc
index e23dd6a..3c00ec9 100644
--- a/iocore/net/quic/test/test_QUICFrame.cc
+++ b/iocore/net/quic/test/test_QUICFrame.cc
@@ -1099,8 +1099,7 @@ TEST_CASE("QUICFrameFactory Create CONNECTION_CLOSE with a QUICConnectionError",
 
 TEST_CASE("QUICFrameFactory Create RST_STREAM with a QUICStreamError", "[quic]")
 {
-  QUICStream stream;
-  stream.init(new MockQUICFrameTransmitter(), 0, 0x1234, 0, 0);
+  QUICStream stream(new MockQUICFrameTransmitter(), 0, 0x1234, 0, 0);
   std::unique_ptr<QUICStreamError> error =
     std::unique_ptr<QUICStreamError>(new QUICStreamError(&stream, static_cast<QUICAppErrorCode>(0x01)));
   std::unique_ptr<QUICRstStreamFrame, QUICFrameDeleterFunc> rst_stream_frame1 =
diff --git a/iocore/net/quic/test/test_QUICHandshake.cc b/iocore/net/quic/test/test_QUICHandshake.cc
index 5c2ad15..9a5da76 100644
--- a/iocore/net/quic/test/test_QUICHandshake.cc
+++ b/iocore/net/quic/test/test_QUICHandshake.cc
@@ -62,9 +62,8 @@ TEST_CASE("1-RTT handshake ", "[quic]")
   QUICHandshake *server = new QUICHandshake(server_qc, server_ssl_ctx, server_token);
 
   // setup stream 0
-  QUICStream *stream = new MockQUICStream();
   MockQUICFrameTransmitter tx;
-  stream->init(&tx, conn_id, 0);
+  QUICStream *stream = new MockQUICStream();
   MockQUICStreamIO *stream_io = new MockQUICStreamIO(nullptr, stream);
 
   client->set_stream(stream, stream_io);
diff --git a/iocore/net/quic/test/test_QUICStream.cc b/iocore/net/quic/test/test_QUICStream.cc
index 00dd32a..8d1dec5 100644
--- a/iocore/net/quic/test/test_QUICStream.cc
+++ b/iocore/net/quic/test/test_QUICStream.cc
@@ -70,8 +70,7 @@ TEST_CASE("QUICStream", "[quic]")
     IOBufferReader *reader = read_buffer->alloc_reader();
     MockQUICFrameTransmitter tx;
 
-    std::unique_ptr<QUICStream> stream(new QUICStream());
-    stream->init(&tx, 0, stream_id, 1024, 1024);
+    std::unique_ptr<QUICStream> stream(new QUICStream(&tx, 0, stream_id, 1024, 1024));
     stream->do_io_read(nullptr, 0, read_buffer);
 
     stream->recv(frame_1);
@@ -97,8 +96,7 @@ TEST_CASE("QUICStream", "[quic]")
     IOBufferReader *reader = read_buffer->alloc_reader();
     MockQUICFrameTransmitter tx;
 
-    std::unique_ptr<QUICStream> stream(new QUICStream());
-    stream->init(&tx, 0, stream_id);
+    std::unique_ptr<QUICStream> stream(new QUICStream(&tx, 0, stream_id));
     stream->do_io_read(nullptr, 0, read_buffer);
 
     stream->recv(frame_8);
@@ -124,8 +122,7 @@ TEST_CASE("QUICStream", "[quic]")
     IOBufferReader *reader = read_buffer->alloc_reader();
     MockQUICFrameTransmitter tx;
 
-    std::unique_ptr<QUICStream> stream(new QUICStream());
-    stream->init(&tx, 0, stream_id);
+    std::unique_ptr<QUICStream> stream(new QUICStream(&tx, 0, stream_id));
     stream->do_io_read(nullptr, 0, read_buffer);
 
     stream->recv(frame_8);
@@ -155,8 +152,7 @@ TEST_CASE("QUICStream", "[quic]")
     IOBufferReader *reader = read_buffer->alloc_reader();
     MockQUICFrameTransmitter tx;
 
-    std::unique_ptr<QUICStream> stream(new QUICStream());
-    stream->init(&tx, 0, stream_id);
+    std::unique_ptr<QUICStream> stream(new QUICStream(&tx, 0, stream_id));
     stream->init_flow_control_params(4096, 4096);
     stream->do_io_read(nullptr, 0, read_buffer);
 
@@ -193,8 +189,7 @@ TEST_CASE("QUICStream", "[quic]")
     IOBufferReader *write_buffer_reader = write_buffer->alloc_reader();
     MockQUICFrameTransmitter tx;
 
-    std::unique_ptr<QUICStream> stream(new QUICStream());
-    stream->init(&tx, 0, stream_id);
+    std::unique_ptr<QUICStream> stream(new QUICStream(&tx, 0, stream_id));
     stream->init_flow_control_params(4096, 4096);
     MockContinuation mock_cont(stream->mutex);
     stream->do_io_read(nullptr, 0, read_buffer);

-- 
To stop receiving notification emails like this one, please contact
maskit@apache.org.