AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Classes | Namespaces | Functions | Variables
HTTP2TransportTest.cpp File Reference
#include <future>
#include <iterator>
#include <memory>
#include <string>
#include <tuple>
#include <vector>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <ACL/Transport/HTTP2Transport.h>
#include <AVSCommon/AVS/Attachment/AttachmentManager.h>
#include <AVSCommon/AVS/Attachment/AttachmentUtils.h>
#include <AVSCommon/Utils/PromiseFuturePair.h>
#include <AVSCommon/Utils/HTTP/HttpResponseCode.h>
#include <AVSCommon/Utils/HTTP2/HTTP2RequestConfig.h>
#include <AVSCommon/Utils/Logger/TestTrace.h>
#include <AVSCommon/Utils/Metrics/MockMetricRecorder.h>
#include "MockAuthDelegate.h"
#include "MockEventTracer.h"
#include "MockHTTP2Connection.h"
#include "MockHTTP2Request.h"
#include "MockMessageConsumer.h"
#include "MockPostConnect.h"
#include "MockPostConnectFactory.h"
#include "MockTransportObserver.h"
#include "TestMessageRequestObserver.h"
#include "ACL/Transport/SynchronizedMessageRequestQueue.h"
Include dependency graph for HTTP2TransportTest.cpp:

Classes

class  alexaClientSDK::acl::transport::test::HTTP2TransportTest
 Test harness for HTTP2Transport class. More...
 

Namespaces

 alexaClientSDK
 Whether or not curl logs should be emitted.
 
 alexaClientSDK::acl
 
 alexaClientSDK::acl::transport
 
 alexaClientSDK::acl::transport::test
 

Functions

 alexaClientSDK::acl::transport::test::TEST_F (HTTP2TransportTest, testSlow_emptyAuthToken)
 
 alexaClientSDK::acl::transport::test::TEST_F (HTTP2TransportTest, testSlow_waitAuthDelegateInterface)
 
 alexaClientSDK::acl::transport::test::TEST_F (HTTP2TransportTest, test_bearerTokenInRequest)
 
 alexaClientSDK::acl::transport::test::TEST_F (HTTP2TransportTest, test_triggerPostConnectObject)
 
 alexaClientSDK::acl::transport::test::TEST_F (HTTP2TransportTest, test_connectionStatusOnPostConnect)
 
 alexaClientSDK::acl::transport::test::TEST_F (HTTP2TransportTest, testSlow_retryOnDownchannelConnectionFailure)
 
 alexaClientSDK::acl::transport::test::TEST_F (HTTP2TransportTest, test_messageRequestContent)
 
 alexaClientSDK::acl::transport::test::TEST_F (HTTP2TransportTest, test_messageRequestWithAttachment)
 
 alexaClientSDK::acl::transport::test::TEST_F (HTTP2TransportTest, test_pauseSendWhenSDSEmpty)
 
 alexaClientSDK::acl::transport::test::TEST_F (HTTP2TransportTest, testSlow_messageRequestsQueuing)
 
 alexaClientSDK::acl::transport::test::TEST_F (HTTP2TransportTest, messageRequests_SequentialSend)
 
 alexaClientSDK::acl::transport::test::TEST_F (HTTP2TransportTest, messageRequests_concurrentSend)
 
 alexaClientSDK::acl::transport::test::TEST_F (HTTP2TransportTest, test_onSendCompletedNotification)
 
 alexaClientSDK::acl::transport::test::TEST_F (HTTP2TransportTest, test_onExceptionReceivedNon200Content)
 
 alexaClientSDK::acl::transport::test::TEST_F (HTTP2TransportTest, test_messageConsumerReceiveDirective)
 
 alexaClientSDK::acl::transport::test::TEST_F (HTTP2TransportTest, test_onServerSideDisconnectOnDownchannelClosure)
 
 alexaClientSDK::acl::transport::test::TEST_F (HTTP2TransportTest, test_messageRequestTimeoutPingRequest)
 
 alexaClientSDK::acl::transport::test::TEST_F (HTTP2TransportTest, testTimer_networkInactivityPingRequest)
 
 alexaClientSDK::acl::transport::test::TEST_F (HTTP2TransportTest, testSlow_tearDownPingTimeout)
 
 alexaClientSDK::acl::transport::test::TEST_F (HTTP2TransportTest, testSlow_tearDownPingFailure)
 
 alexaClientSDK::acl::transport::test::TEST_F (HTTP2TransportTest, testSlow_avsStreamsLimit)
 
 alexaClientSDK::acl::transport::test::TEST_F (HTTP2TransportTest, test_onPostConnectFailureInitiatesShutdownAndNotifiesObservers)
 
 alexaClientSDK::acl::transport::test::TEST_F (HTTP2TransportTest, test_eventTracerIsNotifiedForMessagesSent)
 
 alexaClientSDK::acl::transport::test::TEST_F (HTTP2TransportTest, test_eventTracerIsNotNotifiedForFailedMessages)
 
 alexaClientSDK::acl::transport::test::TEST_F (HTTP2TransportTest, test_eventTracerNotifiedForEmptyMessageContent)
 
 alexaClientSDK::acl::transport::test::TEST_F (HTTP2TransportTest, test_eventTracerIsNotifiedForMultipleMessages)
 

Variables

static const std::string alexaClientSDK::acl::transport::test::TEST_AVS_GATEWAY_STRING = "http://avs-alexa-na.amazon.com"
 Test AVS Gateway. More...
 
static const std::string alexaClientSDK::acl::transport::test::AVS_DOWNCHANNEL_URL_PATH_EXTENSION = "/v20160207/directives"
 Expected Downchannel URL sent on requests. More...
 
static const std::string alexaClientSDK::acl::transport::test::AVS_PING_URL_PATH_EXTENSION = "/ping"
 Expected ping URL sent on requests. More...
 
static const std::string alexaClientSDK::acl::transport::test::FULL_DOWNCHANNEL_URL = TEST_AVS_GATEWAY_STRING + AVS_DOWNCHANNEL_URL_PATH_EXTENSION
 Expected Full Downchannel URL sent on requests. More...
 
static const std::string alexaClientSDK::acl::transport::test::FULL_PING_URL = TEST_AVS_GATEWAY_STRING + AVS_PING_URL_PATH_EXTENSION
 Expected Full ping URL sent on requests. More...
 
static const auto alexaClientSDK::acl::transport::test::ONE_HUNDRED_MILLISECOND_DELAY = std::chrono::milliseconds(100)
 A 100 millisecond delay used in tests. More...
 
static const auto alexaClientSDK::acl::transport::test::TEN_MILLISECOND_DELAY = std::chrono::milliseconds(10)
 A 10 millisecond delay used in tests. More...
 
static const auto alexaClientSDK::acl::transport::test::SHORT_DELAY = std::chrono::seconds(1)
 A short delay used in tests. More...
 
static const auto alexaClientSDK::acl::transport::test::RESPONSE_TIMEOUT = std::chrono::seconds(5)
 Typical Timeout used in waiting for responses. More...
 
static const auto alexaClientSDK::acl::transport::test::LONG_RESPONSE_TIMEOUT = std::chrono::seconds(10)
 A longer timeout used in waiting for responses. More...
 
static const std::string alexaClientSDK::acl::transport::test::HTTP_AUTHORIZATION_HEADER_BEARER = "Authorization: Bearer"
 HTTP Authorization header. More...
 
static const std::string alexaClientSDK::acl::transport::test::CBL_AUTHORIZATION_TOKEN = "AUTH_TOKEN"
 Authorization Token. More...
 
static const std::string alexaClientSDK::acl::transport::test::TEST_ATTACHMENT_ID_STRING_ONE = "testAttachmentId_1"
 A test AttachmentId string. More...
 
static const std::string alexaClientSDK::acl::transport::test::TEST_MESSAGE = "aaabbccc"
 
static const std::string alexaClientSDK::acl::transport::test::TEST_ATTACHMENT_MESSAGE = "MY_A_T_T_ACHMENT"
 
static const std::string alexaClientSDK::acl::transport::test::TEST_ATTACHMENT_FIELD = "ATTACHMENT"
 
static const long alexaClientSDK::acl::transport::test::NO_CALL = -2
 
static const std::string alexaClientSDK::acl::transport::test::NON_MIME_PAYLOAD = "A_NON_MIME_PAYLOAD"
 
static const std::string alexaClientSDK::acl::transport::test::DIRECTIVE1
 
static const std::string alexaClientSDK::acl::transport::test::DIRECTIVE2
 
static const std::string alexaClientSDK::acl::transport::test::MIME_BOUNDARY = "thisisaboundary"
 
static const std::string alexaClientSDK::acl::transport::test::MIME_BODY_DIRECTIVE1
 
static const std::string alexaClientSDK::acl::transport::test::MIME_BODY_DIRECTIVE2
 
static const std::string alexaClientSDK::acl::transport::test::HTTP_BOUNDARY_HEADER
 
static const unsigned alexaClientSDK::acl::transport::test::MAX_PING_STREAMS = 1
 
static const unsigned alexaClientSDK::acl::transport::test::MAX_DOWNCHANNEL_STREAMS = 1
 
static const unsigned alexaClientSDK::acl::transport::test::MAX_AVS_STREAMS = 10
 
static const unsigned alexaClientSDK::acl::transport::test::MAX_POST_STREAMS = MAX_AVS_STREAMS - MAX_DOWNCHANNEL_STREAMS - MAX_PING_STREAMS
 

AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0