2017-06-23 23:26:34 +00:00
|
|
|
/*
|
2019-05-22 23:06:18 +00:00
|
|
|
* Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
2017-02-10 23:39:10 +00:00
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License").
|
|
|
|
* You may not use this file except in compliance with the License.
|
|
|
|
* A copy of the License is located at
|
|
|
|
*
|
|
|
|
* http://aws.amazon.com/apache2.0/
|
|
|
|
*
|
|
|
|
* or in the "license" file accompanying this file. This file is distributed
|
|
|
|
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
|
|
|
* express or implied. See the License for the specific language governing
|
|
|
|
* permissions and limitations under the License.
|
|
|
|
*/
|
2018-02-12 23:31:53 +00:00
|
|
|
|
2017-02-10 23:39:10 +00:00
|
|
|
#include "MessageRouterTest.h"
|
|
|
|
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
|
|
|
|
namespace alexaClientSDK {
|
|
|
|
namespace acl {
|
2017-06-09 23:23:31 +00:00
|
|
|
namespace test {
|
2017-02-10 23:39:10 +00:00
|
|
|
|
2017-06-23 23:26:34 +00:00
|
|
|
using namespace alexaClientSDK::avsCommon::sdkInterfaces;
|
|
|
|
|
2019-05-22 23:06:18 +00:00
|
|
|
TEST_F(MessageRouterTest, test_getConnectionStatusReturnsDisconnectedBeforeConnect) {
|
2017-10-02 22:59:05 +00:00
|
|
|
ASSERT_EQ(m_router->getConnectionStatus().first, ConnectionStatusObserverInterface::Status::DISCONNECTED);
|
2017-02-10 23:39:10 +00:00
|
|
|
}
|
|
|
|
|
2019-05-22 23:06:18 +00:00
|
|
|
TEST_F(MessageRouterTest, test_getConnectionStatusReturnsPendingAfterConnectingStarts) {
|
2017-02-10 23:39:10 +00:00
|
|
|
setupStateToPending();
|
2017-10-02 22:59:05 +00:00
|
|
|
ASSERT_EQ(m_router->getConnectionStatus().first, ConnectionStatusObserverInterface::Status::PENDING);
|
2017-02-10 23:39:10 +00:00
|
|
|
}
|
|
|
|
|
2019-05-22 23:06:18 +00:00
|
|
|
TEST_F(MessageRouterTest, test_getConnectionStatusReturnsConnectedAfterConnectionEstablished) {
|
2017-02-10 23:39:10 +00:00
|
|
|
setupStateToConnected();
|
2017-10-02 22:59:05 +00:00
|
|
|
ASSERT_EQ(m_router->getConnectionStatus().first, ConnectionStatusObserverInterface::Status::CONNECTED);
|
2017-02-10 23:39:10 +00:00
|
|
|
}
|
|
|
|
|
2019-05-22 23:06:18 +00:00
|
|
|
TEST_F(MessageRouterTest, test_getConnectionStatusReturnsConnectedAfterDisconnected) {
|
2017-11-17 02:49:28 +00:00
|
|
|
m_router->onDisconnected(m_mockTransport, ConnectionStatusObserverInterface::ChangedReason::ACL_DISABLED);
|
2017-10-02 22:59:05 +00:00
|
|
|
ASSERT_EQ(m_router->getConnectionStatus().first, ConnectionStatusObserverInterface::Status::DISCONNECTED);
|
2017-02-10 23:39:10 +00:00
|
|
|
}
|
|
|
|
|
2019-05-22 23:06:18 +00:00
|
|
|
TEST_F(MessageRouterTest, test_ensureTheMessageRouterObserverIsInformedOfConnectionPendingAfterConnect) {
|
2017-02-10 23:39:10 +00:00
|
|
|
setupStateToPending();
|
|
|
|
|
2017-06-23 23:26:34 +00:00
|
|
|
// wait for the result to propagate by scheduling a task on the client executor
|
2017-07-18 22:25:37 +00:00
|
|
|
waitOnMessageRouter(SHORT_TIMEOUT_MS);
|
2017-02-10 23:39:10 +00:00
|
|
|
|
2017-10-02 22:59:05 +00:00
|
|
|
ASSERT_EQ(
|
|
|
|
m_mockMessageRouterObserver->getLatestConnectionStatus(), ConnectionStatusObserverInterface::Status::PENDING);
|
|
|
|
ASSERT_EQ(
|
|
|
|
m_mockMessageRouterObserver->getLatestConnectionChangedReason(),
|
|
|
|
ConnectionStatusObserverInterface::ChangedReason::ACL_CLIENT_REQUEST);
|
2017-02-10 23:39:10 +00:00
|
|
|
}
|
|
|
|
|
2019-05-22 23:06:18 +00:00
|
|
|
TEST_F(MessageRouterTest, test_ensureTheMessageRouterObserverIsInformedOfNewConnection) {
|
2017-02-10 23:39:10 +00:00
|
|
|
setupStateToConnected();
|
|
|
|
|
2017-06-23 23:26:34 +00:00
|
|
|
// wait for the result to propagate by scheduling a task on the client executor
|
2017-07-18 22:25:37 +00:00
|
|
|
waitOnMessageRouter(SHORT_TIMEOUT_MS);
|
2017-02-10 23:39:10 +00:00
|
|
|
|
2017-10-02 22:59:05 +00:00
|
|
|
ASSERT_EQ(
|
|
|
|
m_mockMessageRouterObserver->getLatestConnectionStatus(), ConnectionStatusObserverInterface::Status::CONNECTED);
|
|
|
|
ASSERT_EQ(
|
|
|
|
m_mockMessageRouterObserver->getLatestConnectionChangedReason(),
|
|
|
|
ConnectionStatusObserverInterface::ChangedReason::ACL_CLIENT_REQUEST);
|
2017-02-10 23:39:10 +00:00
|
|
|
}
|
|
|
|
|
2019-05-22 23:06:18 +00:00
|
|
|
TEST_F(MessageRouterTest, test_ensureTheMessageRouterObserverIsInformedOfTransportDisconnection) {
|
2017-02-10 23:39:10 +00:00
|
|
|
setupStateToConnected();
|
|
|
|
|
2017-06-09 23:23:31 +00:00
|
|
|
auto reason = ConnectionStatusObserverInterface::ChangedReason::ACL_DISABLED;
|
2017-02-10 23:39:10 +00:00
|
|
|
disconnectMockTransport(m_mockTransport.get());
|
2017-11-17 02:49:28 +00:00
|
|
|
m_router->onDisconnected(m_mockTransport, reason);
|
2017-02-10 23:39:10 +00:00
|
|
|
|
2017-06-23 23:26:34 +00:00
|
|
|
// wait for the result to propagate by scheduling a task on the client executor
|
2017-07-18 22:25:37 +00:00
|
|
|
waitOnMessageRouter(SHORT_TIMEOUT_MS);
|
2017-02-10 23:39:10 +00:00
|
|
|
|
2017-10-02 22:59:05 +00:00
|
|
|
ASSERT_EQ(
|
|
|
|
m_mockMessageRouterObserver->getLatestConnectionStatus(), ConnectionStatusObserverInterface::Status::PENDING);
|
2017-02-10 23:39:10 +00:00
|
|
|
ASSERT_EQ(m_mockMessageRouterObserver->getLatestConnectionChangedReason(), reason);
|
|
|
|
}
|
|
|
|
|
2019-05-22 23:06:18 +00:00
|
|
|
TEST_F(MessageRouterTest, test_ensureTheMessageRouterObserverIsInformedOfRouterDisconnection) {
|
2017-02-10 23:39:10 +00:00
|
|
|
setupStateToConnected();
|
|
|
|
|
2017-10-02 22:59:05 +00:00
|
|
|
m_router->disable();
|
2017-02-10 23:39:10 +00:00
|
|
|
|
2017-06-23 23:26:34 +00:00
|
|
|
// wait for the result to propagate by scheduling a task on the client executor
|
2017-07-18 22:25:37 +00:00
|
|
|
waitOnMessageRouter(SHORT_TIMEOUT_MS);
|
2017-02-10 23:39:10 +00:00
|
|
|
|
2017-10-02 22:59:05 +00:00
|
|
|
ASSERT_EQ(
|
|
|
|
m_mockMessageRouterObserver->getLatestConnectionStatus(),
|
|
|
|
ConnectionStatusObserverInterface::Status::DISCONNECTED);
|
|
|
|
ASSERT_EQ(
|
|
|
|
m_mockMessageRouterObserver->getLatestConnectionChangedReason(),
|
|
|
|
ConnectionStatusObserverInterface::ChangedReason::ACL_CLIENT_REQUEST);
|
2017-02-10 23:39:10 +00:00
|
|
|
}
|
|
|
|
|
2019-05-22 23:06:18 +00:00
|
|
|
TEST_F(MessageRouterTest, test_sendIsSuccessfulWhenConnected) {
|
2017-02-10 23:39:10 +00:00
|
|
|
setupStateToConnected();
|
|
|
|
|
|
|
|
auto messageRequest = createMessageRequest();
|
|
|
|
|
|
|
|
// Expect to have the message sent to the transport
|
|
|
|
EXPECT_CALL(*m_mockTransport, send(messageRequest)).Times(1);
|
|
|
|
|
2017-10-02 22:59:05 +00:00
|
|
|
m_router->sendMessage(messageRequest);
|
2017-02-10 23:39:10 +00:00
|
|
|
|
|
|
|
// Since we connected we will be disconnected when the router is destroyed
|
|
|
|
EXPECT_CALL(*m_mockTransport, disconnect()).Times(AnyNumber());
|
|
|
|
}
|
|
|
|
|
2019-05-22 23:06:18 +00:00
|
|
|
TEST_F(MessageRouterTest, test_sendFailsWhenDisconnected) {
|
2017-02-10 23:39:10 +00:00
|
|
|
auto messageRequest = createMessageRequest();
|
|
|
|
|
|
|
|
// Expect to have the message sent to the transport
|
|
|
|
EXPECT_CALL(*m_mockTransport, send(messageRequest)).Times(0);
|
|
|
|
|
2017-10-02 22:59:05 +00:00
|
|
|
m_router->sendMessage(messageRequest);
|
2017-02-10 23:39:10 +00:00
|
|
|
}
|
|
|
|
|
2019-05-22 23:06:18 +00:00
|
|
|
TEST_F(MessageRouterTest, test_sendFailsWhenPending) {
|
2017-02-10 23:39:10 +00:00
|
|
|
// Ensure a transport exists
|
|
|
|
initializeMockTransport(m_mockTransport.get());
|
2017-10-02 22:59:05 +00:00
|
|
|
m_router->enable();
|
2017-02-10 23:39:10 +00:00
|
|
|
|
|
|
|
auto messageRequest = createMessageRequest();
|
|
|
|
|
2017-03-10 00:01:46 +00:00
|
|
|
// Expect to have the message sent to the transport.
|
2017-06-23 23:26:34 +00:00
|
|
|
EXPECT_CALL(*m_mockTransport, send(messageRequest)).Times(1);
|
2017-02-10 23:39:10 +00:00
|
|
|
|
2017-10-02 22:59:05 +00:00
|
|
|
m_router->sendMessage(messageRequest);
|
2017-07-18 22:25:37 +00:00
|
|
|
waitOnMessageRouter(SHORT_TIMEOUT_MS);
|
2017-02-10 23:39:10 +00:00
|
|
|
}
|
|
|
|
|
2019-05-22 23:06:18 +00:00
|
|
|
TEST_F(MessageRouterTest, test_sendMessageDoesNotSendAfterDisconnected) {
|
2017-02-10 23:39:10 +00:00
|
|
|
setupStateToConnected();
|
|
|
|
|
|
|
|
auto messageRequest = createMessageRequest();
|
|
|
|
|
2017-10-02 22:59:05 +00:00
|
|
|
EXPECT_CALL(*m_mockTransport, doShutdown()).Times(AtLeast(1));
|
|
|
|
m_router->disable();
|
2017-02-10 23:39:10 +00:00
|
|
|
|
|
|
|
// Expect to have the message sent to the transport
|
|
|
|
EXPECT_CALL(*m_mockTransport, send(messageRequest)).Times(0);
|
|
|
|
|
2017-10-02 22:59:05 +00:00
|
|
|
m_router->sendMessage(messageRequest);
|
2017-02-10 23:39:10 +00:00
|
|
|
}
|
|
|
|
|
2019-05-22 23:06:18 +00:00
|
|
|
TEST_F(MessageRouterTest, test_disconnectDisconnectsConnectedTransports) {
|
2017-02-10 23:39:10 +00:00
|
|
|
setupStateToConnected();
|
|
|
|
|
2017-10-02 22:59:05 +00:00
|
|
|
EXPECT_CALL(*m_mockTransport, doShutdown()).Times(1);
|
2017-02-10 23:39:10 +00:00
|
|
|
|
2017-10-02 22:59:05 +00:00
|
|
|
m_router->disable();
|
2017-02-10 23:39:10 +00:00
|
|
|
}
|
|
|
|
|
2019-05-22 23:06:18 +00:00
|
|
|
TEST_F(MessageRouterTest, test_serverSideDisconnectCreatesANewTransport) {
|
2017-02-10 23:39:10 +00:00
|
|
|
/*
|
|
|
|
* This test is difficult to setup in a nice way. The idea is to replace the original
|
|
|
|
* transport with a new one, call onServerSideDisconnect to make it the new active
|
|
|
|
* transport, and then send a message. The message should be sent on the new transport.
|
|
|
|
*/
|
|
|
|
setupStateToConnected();
|
|
|
|
|
|
|
|
auto oldTransport = m_mockTransport;
|
|
|
|
|
|
|
|
auto newTransport = std::make_shared<NiceMock<MockTransport>>();
|
|
|
|
initializeMockTransport(newTransport.get());
|
|
|
|
|
Version 1.7.0 of the avs-device-sdk
Changes in this update:
**Enhancements**
* `AuthDelegate` and `AuthServer.py` have been replaced by `CBLAUthDelegate`, which provides a more straightforward path to authorization.
* Added a new configuration property called [`cblAuthDelegate`](https://github.com/alexa/avs-device-sdk/blob/master/Integration/AlexaClientSDKConfig.json#L2). This object specifies parameters for `CBLAuthDelegate`.
* Added a new configuration property called [`miscDatabase`](https://github.com/alexa/avs-device-sdk/blob/master/Integration/AlexaClientSDKConfig.json#L34), which is a generic key/value database to be used by various components.
* Added a new configuration property called [`dcfDelegate`](https://github.com/alexa/avs-device-sdk/blob/master/Integration/AlexaClientSDKConfig.json#L17) This object specifies parameters for `DCFDelegate`. Within this object, values were added for the 'endpoint' and `overridenDcfPublishMessageBody`. 'endpoint' is the endpoint to connect to in order to send device capabilities. `overridenDcfPublishMessageBody`is the message that will get sent out to the Capabilities API. Note: values within the `dcfDelegate` object will only work in `DEBUG` builds.
* Added a new configuration property called [`deviceInfo`](https://github.com/alexa/avs-device-sdk/blob/master/Integration/AlexaClientSDKConfig.json#L9) which specifies device-identifying information for use by the Device Capability Framework (DCF), and for authorization (CBLAuthDelegate).
* Updated the Directive Sequencer to support wildcard directive handlers. This allows a handler for a given AVS interface to register at the namespace level, rather than specifying the names of all directives within that namespace.
* Updated the Raspberry Pi installation script to include `alsasink` in the configuration file.
* Added `audioSink` as a configuration option. This allows users to override the audio sink element used in `Gstreamer`.
* Added an interface for monitoring internet connection status: `InternetConnectionMonitorInterface.h`.
* The Alexa Communications Library (ACL) is no longer required to wait until authorization has succeeded before attempting to connect to AVS. Instead, `HTTP2Transport` handles waiting for authorization to complete.
* Added the Device Capabilities Framework (DCF) delegate. Device capabilities can now be sent for each capability interface using DCF publish messages.
* The sample app has been updated to send DCF publish messages, which will automatically occur when the sample app starts. Note: a DCF publish message must be successfully sent in order for communication with AVS to occur.
* The SDK now supports HTTP PUT messages.
* Added support for opt-arg style arguments and multiple configuration files. Now, the sample app can be invoked by either of these commands: `SampleApp <configfile> <debuglevel>` OR `SampleApp -C file1 -C file2 ... -L loglevel`.
**Bug Fixes**
* Issues [447](https://github.com/alexa/avs-device-sdk/issues/447) and [553](https://github.com/alexa/avs-device-sdk/issues/553) Fixed the `AttachmentRenderSource`'s handling of `BLOCKING` `AttachmentReaders`.
* Updated the `Logger` implementation to be more resilient to `nullptr` string inputs.
* Fixed a `TimeUtils` utility-related compile issue.
* Fixed a bug in which alerts failed to activate if the system was restarted without network connection.
* Fixed Android 64-bit build failure issue.
**Known Issues**
* The `ACL` may encounter issues if audio attachments are received but not consumed.
* `SpeechSynthesizerState` currently uses `GAINING_FOCUS` and `LOSING_FOCUS` as a workaround for handling intermediate state. These states may be removed in a future release.
* Some ERROR messages may be printed during start-up event if initialization proceeds normally and successfully.
* If an unrecoverable authorization error or an unrecoverable DCF error is encountered, the sample app may crash on shutdown.
* If a non-CBL `clientId` is included in the `deviceInfo` section of `AlexaClientSDKConfig.json`, the error will be reported as an unrecoverable authorization error, rather than a more specific error.
2018-04-18 22:17:28 +00:00
|
|
|
m_transportFactory->setMockTransport(newTransport);
|
2017-02-10 23:39:10 +00:00
|
|
|
|
|
|
|
// Reset the MessageRouterObserver, there should be no interactions with the observer
|
2017-11-17 02:49:28 +00:00
|
|
|
m_router->onServerSideDisconnect(oldTransport);
|
2017-02-10 23:39:10 +00:00
|
|
|
|
2017-07-18 22:25:37 +00:00
|
|
|
waitOnMessageRouter(SHORT_TIMEOUT_MS);
|
2017-02-10 23:39:10 +00:00
|
|
|
|
2017-10-02 22:59:05 +00:00
|
|
|
ASSERT_EQ(
|
|
|
|
m_mockMessageRouterObserver->getLatestConnectionStatus(), ConnectionStatusObserverInterface::Status::PENDING);
|
|
|
|
ASSERT_EQ(
|
|
|
|
m_mockMessageRouterObserver->getLatestConnectionChangedReason(),
|
|
|
|
ConnectionStatusObserverInterface::ChangedReason::SERVER_SIDE_DISCONNECT);
|
2017-02-10 23:39:10 +00:00
|
|
|
|
|
|
|
// mock the new transports connection
|
|
|
|
connectMockTransport(newTransport.get());
|
2017-11-17 02:49:28 +00:00
|
|
|
m_router->onConnected(newTransport);
|
2017-02-10 23:39:10 +00:00
|
|
|
|
2017-07-18 22:25:37 +00:00
|
|
|
waitOnMessageRouter(SHORT_TIMEOUT_MS);
|
2017-02-10 23:39:10 +00:00
|
|
|
|
2017-10-02 22:59:05 +00:00
|
|
|
ASSERT_EQ(
|
|
|
|
m_mockMessageRouterObserver->getLatestConnectionStatus(), ConnectionStatusObserverInterface::Status::CONNECTED);
|
|
|
|
ASSERT_EQ(
|
|
|
|
m_mockMessageRouterObserver->getLatestConnectionChangedReason(),
|
|
|
|
ConnectionStatusObserverInterface::ChangedReason::ACL_CLIENT_REQUEST);
|
2017-02-10 23:39:10 +00:00
|
|
|
|
|
|
|
// mock the old transport disconnecting completely
|
|
|
|
disconnectMockTransport(oldTransport.get());
|
2017-11-17 02:49:28 +00:00
|
|
|
m_router->onDisconnected(oldTransport, ConnectionStatusObserverInterface::ChangedReason::ACL_CLIENT_REQUEST);
|
2017-02-10 23:39:10 +00:00
|
|
|
|
|
|
|
auto messageRequest = createMessageRequest();
|
|
|
|
|
|
|
|
EXPECT_CALL(*oldTransport.get(), send(messageRequest)).Times(0);
|
|
|
|
|
|
|
|
EXPECT_CALL(*newTransport.get(), send(messageRequest)).Times(1);
|
|
|
|
|
2017-10-02 22:59:05 +00:00
|
|
|
m_router->sendMessage(messageRequest);
|
2017-02-10 23:39:10 +00:00
|
|
|
|
2017-07-18 22:25:37 +00:00
|
|
|
waitOnMessageRouter(SHORT_TIMEOUT_MS);
|
2017-02-10 23:39:10 +00:00
|
|
|
}
|
|
|
|
|
2017-08-08 00:04:43 +00:00
|
|
|
/**
|
|
|
|
* This tests the calling of private method @c receive() for MessageRouterObserver from MessageRouter
|
|
|
|
*/
|
2019-05-22 23:06:18 +00:00
|
|
|
TEST_F(MessageRouterTest, test_onReceive) {
|
2017-08-08 00:04:43 +00:00
|
|
|
m_mockMessageRouterObserver->reset();
|
2017-10-02 22:59:05 +00:00
|
|
|
m_router->consumeMessage(CONTEXT_ID, MESSAGE);
|
2017-08-08 00:04:43 +00:00
|
|
|
waitOnMessageRouter(SHORT_TIMEOUT_MS);
|
|
|
|
ASSERT_TRUE(m_mockMessageRouterObserver->wasNotifiedOfReceive());
|
|
|
|
ASSERT_EQ(CONTEXT_ID, m_mockMessageRouterObserver->getAttachmentContextId());
|
|
|
|
ASSERT_EQ(MESSAGE, m_mockMessageRouterObserver->getLatestMessage());
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This tests the calling of private method @c onConnectionStatusChanged()
|
|
|
|
* for MessageRouterObserver from MessageRouter
|
|
|
|
*/
|
2019-05-22 23:06:18 +00:00
|
|
|
TEST_F(MessageRouterTest, test_onConnectionStatusChanged) {
|
2017-08-08 00:04:43 +00:00
|
|
|
m_mockMessageRouterObserver->reset();
|
|
|
|
setupStateToConnected();
|
|
|
|
waitOnMessageRouter(SHORT_TIMEOUT_MS);
|
|
|
|
ASSERT_TRUE(m_mockMessageRouterObserver->wasNotifiedOfStatusChange());
|
|
|
|
}
|
2019-05-22 23:06:18 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Verify that when enable is called with active connection is pending
|
|
|
|
* we don't create a new connection.
|
|
|
|
*/
|
|
|
|
TEST_F(MessageRouterTest, test_enableTwiceOnPendingTransport) {
|
|
|
|
setupStateToPending();
|
|
|
|
waitOnMessageRouter(SHORT_TIMEOUT_MS);
|
|
|
|
m_mockMessageRouterObserver->reset();
|
|
|
|
|
|
|
|
EXPECT_CALL(*m_mockTransport, connect()).Times(0);
|
|
|
|
|
|
|
|
m_router->enable();
|
|
|
|
|
|
|
|
ASSERT_FALSE(m_mockMessageRouterObserver->wasNotifiedOfStatusChange());
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Verify that if onConnected is called
|
|
|
|
* for inactive transport, we don't notify the observers and
|
|
|
|
* closing the connection.
|
|
|
|
*/
|
|
|
|
TEST_F(MessageRouterTest, test_onConnectedOnInactiveTransport) {
|
|
|
|
auto transport = std::make_shared<MockTransport>();
|
|
|
|
m_router->onConnected(transport);
|
|
|
|
ASSERT_FALSE(m_mockMessageRouterObserver->wasNotifiedOfStatusChange());
|
|
|
|
}
|
|
|
|
|
Version 1.14 alexa-client-sdk
Changes in this update:
**Enhancements**
* AudioPlayer can now pre-buffer audio tracks in the Pre-Handle stage.
**Bug Fixes**
* Fixed an issue in the SQLite wrapper code where a `SQLiteStatement` caused a memory corruption issue.
* Fixed a race condition in SpeechSynthesizer that caused crashes.
* Fixed a `cmake` issue that specifies a dependency for Bluetooth incorrectly.
* Fixed a bug that caused Bluetooth playback to start automatically.
* Changed `supportedOperations` from a vector to a set in `ExternalMediaAdapterInterface`.
* Corrected an issue where a `VolumeChanged` event had previously been sent when the volume was unchanged after `setVolume` or `adjustVolume` had been called locally.
* Fixed issue with `IterativePlaylistParser` that prevented live stations on TuneIn from playing on Android.
* Corrected the spelling of "UNINITIALIZED".
**Known Issues**
* Music playback history isn't being displayed in the Alexa app for certain account and device types.
* On GCC 8+, issues related to `-Wclass-memaccess` will trigger warnings. However, this won't cause the build to fail and these warnings can be ignored.
* Android error ("libDefaultClient.so" not found) can be resolved by upgrading to ADB version 1.0.40
* When network connection is lost, lost connection status is not returned via local TTS.
* `ACL` may encounter issues if audio attachments are received but not consumed.
* `SpeechSynthesizerState` currently uses `GAINING_FOCUS` and `LOSING_FOCUS` as a workaround for handling intermediate state. These states may be removed in a future release.
* The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
* Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
* When a source device is streaming silence via Bluetooth, the Alexa app indicates that audio content is streaming.
* The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
* On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
* `make integration` is currently not available for Android. In order to run integration tests on Android, you'll need to manually upload the test binary file along with any input file. At that point, the adb can be used to run the integration tests.
* On Raspberry Pi running Android Things with HDMI output audio, beginning of speech is truncated when Alexa responds to user text-to-speech (TTS).
* When the sample app is restarted and the network connection is lost, the Reminder TTS message does not play. Instead, the default alarm tone will play twice.
* `ServerDisconnectIntegratonTest` tests have been disabled until they can be updated to reflect new service behavior.
* Devices connected before the Bluetooth CA is initialized are ignored.
* The `DirectiveSequencerTest.test_handleBlockingThenImmediatelyThenNonBockingOnSameDialogId` test fails intermittently.
2019-07-09 21:10:24 +00:00
|
|
|
TEST_F(MessageRouterTest, setAndGetAVSEndpoint) {
|
|
|
|
auto endpoint = "Endpoint";
|
|
|
|
m_router->setAVSEndpoint(endpoint);
|
|
|
|
ASSERT_EQ(endpoint, m_router->getAVSEndpoint());
|
|
|
|
}
|
|
|
|
|
2017-10-02 22:59:05 +00:00
|
|
|
} // namespace test
|
|
|
|
} // namespace acl
|
|
|
|
} // namespace alexaClientSDK
|