diff options
author | Artem Nosach <ANosach@luxoft.com> | 2016-06-06 17:14:31 +0300 |
---|---|---|
committer | Artem Nosach <ANosach@luxoft.com> | 2016-06-06 17:43:14 +0300 |
commit | 32c76874c6416651747d802ebadbbebeb755bdec (patch) | |
tree | ea8dc6debb417c47a647416d36600e96a6e26b4d | |
parent | 3e6cfcd697a3163552487c5357dfea42f12588cd (diff) | |
download | sdl_core-32c76874c6416651747d802ebadbbebeb755bdec.tar.gz |
Fix & enable protocol handler tests
APPLINK-24929
Related-issues: APPLINK-22713, APPLINK-22716
-rw-r--r-- | src/components/protocol_handler/test/protocol_handler_tm_test.cc | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/src/components/protocol_handler/test/protocol_handler_tm_test.cc b/src/components/protocol_handler/test/protocol_handler_tm_test.cc index bdb339b350..22f9bfc17f 100644 --- a/src/components/protocol_handler/test/protocol_handler_tm_test.cc +++ b/src/components/protocol_handler/test/protocol_handler_tm_test.cc @@ -925,11 +925,6 @@ TEST_F(ProtocolHandlerImplTest, FloodVerification) { EXPECT_CALL(session_observer_mock, OnApplicationFloodCallBack(connection_key)) .Times(1); - ON_CALL(protocol_handler_settings_mock, message_frequency_time()) - .WillByDefault(Return(period_msec)); - ON_CALL(protocol_handler_settings_mock, message_frequency_count()) - .WillByDefault(Return(max_messages)); - for (size_t i = 0; i < max_messages + 1; ++i) { SendTMMessage(connection_id, PROTOCOL_VERSION_3, @@ -950,11 +945,6 @@ TEST_F(ProtocolHandlerImplTest, FloodVerification_ThresholdValue) { AddConnection(); AddSession(); - ON_CALL(protocol_handler_settings_mock, message_frequency_time()) - .WillByDefault(Return(period_msec)); - ON_CALL(protocol_handler_settings_mock, message_frequency_count()) - .WillByDefault(Return(max_messages)); - // Expect NO flood notification to CH EXPECT_CALL(session_observer_mock, OnApplicationFloodCallBack(connection_key)) .Times(0); @@ -1062,8 +1052,7 @@ TEST_F(ProtocolHandlerImplTest, MalformedVerificationDisable) { } } -// TODO(OHerasym) : Actual function call count doesn't match EXPECT_CALL -TEST_F(ProtocolHandlerImplTest, DISABLED_MalformedLimitVerification) { +TEST_F(ProtocolHandlerImplTest, MalformedLimitVerification) { const size_t period_msec = 10000; const size_t max_messages = 100; InitProtocolHandlerImpl(0u, 0u, true, period_msec, max_messages); @@ -1102,9 +1091,7 @@ TEST_F(ProtocolHandlerImplTest, DISABLED_MalformedLimitVerification) { } } -// TODO(OHerasym) : Actual function call count doesn't match EXPECT_CALL -TEST_F(ProtocolHandlerImplTest, - DISABLED_MalformedLimitVerification_MalformedStock) { +TEST_F(ProtocolHandlerImplTest, MalformedLimitVerification_MalformedStock) { const size_t period_msec = 10000; const size_t max_messages = 100; InitProtocolHandlerImpl(0u, 0u, true, period_msec, max_messages); @@ -1223,8 +1210,7 @@ TEST_F(ProtocolHandlerImplTest, MalformedLimitVerification_MalformedOnly) { } // TODO(OHerasym) : error: Long sleep makes a bare back -TEST_F(ProtocolHandlerImplTest, - DISABLED_MalformedLimitVerification_NullTimePeriod) { +TEST_F(ProtocolHandlerImplTest, MalformedLimitVerification_NullTimePeriod) { const size_t period_msec = 0; const size_t max_messages = 1000; InitProtocolHandlerImpl(0u, 0u, true, period_msec, max_messages); @@ -1251,8 +1237,7 @@ TEST_F(ProtocolHandlerImplTest, } } -// TODO(OHerasym) : Actual function call count doesn't match EXPECT_CALL -TEST_F(ProtocolHandlerImplTest, DISABLED_MalformedLimitVerification_NullCount) { +TEST_F(ProtocolHandlerImplTest, MalformedLimitVerification_NullCount) { const size_t period_msec = 10000; const size_t max_messages = 0; InitProtocolHandlerImpl(0u, 0u, true, period_msec, max_messages); |