diff options
author | Andrii Kalinich (GitHub) <AKalinich@luxoft.com> | 2019-09-24 13:44:53 -0400 |
---|---|---|
committer | Collin <iCollin@users.noreply.github.com> | 2019-09-24 13:44:53 -0400 |
commit | b454f5cbbe69741eaa266761787006c81a2c6da7 (patch) | |
tree | f166a160ee41a1282bfa3facc9db86cb28fd02ac /src/components/connection_handler/test/connection_handler_impl_test.cc | |
parent | a302262312f11d3b1b12011623c16107b200489a (diff) | |
download | sdl_core-b454f5cbbe69741eaa266761787006c81a2c6da7.tar.gz |
Fix SDL behavior during LOW_VOLTAGE (#3029)
There were found a several problems during SDL testing with ATF scripts:
1. SDL does not ignore messages from mobile/HMI during low voltage and
processes them on wake up
2. Sometimes SDL ignores messages on wake up due to timings
3. SDL low voltage process is not stopping properly by exit() function
4. SDL does not send OnAppUnregistered after wake up to HMI
To solve mentioned problems, the following changes were done:
1. exit() was replaced with _Exit() which allow to force close the
process
2. Suspend transport events processing threads during low voltage,
such as unexpected disconnect etc. These events should be processed
when SDL wakes up completely.
3. Suspend all client listening threads and shut down sockets for a TCP
connections to prevent any possibility to receive message during low
voltage. These threads will be resumed on wake up.
4. Set low_voltage flag to false in the end of wakeup() function to
prevent any timing issues.
5. Don't add pending requests/notifications into request controller if
low voltage event has happened, as it may happen at any moment
6. Don't handle received pending messages from mobile/HMI in RPC
handler if low voltage event has happened as it may happen at any
moment
7. Updated logic of few test case scenarios.
Updated unit tests according to code changes
Diffstat (limited to 'src/components/connection_handler/test/connection_handler_impl_test.cc')
-rw-r--r-- | src/components/connection_handler/test/connection_handler_impl_test.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/components/connection_handler/test/connection_handler_impl_test.cc b/src/components/connection_handler/test/connection_handler_impl_test.cc index af7009c2f5..855225c460 100644 --- a/src/components/connection_handler/test/connection_handler_impl_test.cc +++ b/src/components/connection_handler/test/connection_handler_impl_test.cc @@ -787,7 +787,9 @@ TEST_F(ConnectionHandlerTest, StartTransportManager) { AddTestDeviceConnection(); AddTestSession(); - EXPECT_CALL(mock_transport_manager_, Visibility(true)); + EXPECT_CALL(mock_transport_manager_, + PerformActionOnClients( + transport_manager::TransportAction::kVisibilityOn)); connection_handler_->StartTransportManager(); } |