@@ -104,6 +104,8 @@ class ProxyEventTracingFixture : public ::testing::Test
104104
105105 ON_CALL (*mock_proxy_event_binding_, SetReceiveHandler (_)).WillByDefault (Return (score::Result<void >{}));
106106 ON_CALL (*mock_proxy_event_binding_, GetBindingType ()).WillByDefault (Return (BindingType::kLoLa ));
107+ ON_CALL (*mock_proxy_event_binding_, GetSubscriptionState ())
108+ .WillByDefault (Return (SubscriptionState::kNotSubscribed ));
107109 }
108110
109111 void CreateProxy ()
@@ -769,7 +771,6 @@ TYPED_TEST(ProxyEventTracingUnsubscribeFixture,
769771
770772 ProxyEventTracingData expected_enabled_trace_points{};
771773 expected_enabled_trace_points.enable_unsubscribe = true ;
772- expected_enabled_trace_points.enable_subscribe = true ;
773774 expected_enabled_trace_points.enable_call_receive_handler = true ;
774775
775776 const tracing::ServiceElementInstanceIdentifierView expected_service_element_instance_identifier_view =
@@ -790,27 +791,6 @@ TYPED_TEST(ProxyEventTracingUnsubscribeFixture,
790791 typename ProxyEventTracingFixture<TypeParam>::TracePointType>(
791792 expected_enabled_trace_points, kServiceIdentifierStringView , kServiceElementName , kInstanceSpecifierStringView );
792793
793- // Expect that GetSubscriptionState returns kNotSubscribed then kSubscribed
794- EXPECT_CALL (*this ->mock_proxy_event_binding_ , GetSubscriptionState ())
795- .WillOnce (Return (SubscriptionState::kNotSubscribed ))
796- .WillOnce (Return (SubscriptionState::kSubscribed ));
797-
798- // Expect that a trace call relating to Subscribe is called
799- tracing::ITracingRuntime::TracePointType subscribe_trace_point_type{
800- ProxyEventTracingFixture<TypeParam>::TracePointType::SUBSCRIBE};
801- EXPECT_CALL (tracing_runtime_mock,
802- Trace (BindingType::kLoLa ,
803- expected_service_element_instance_identifier_view,
804- subscribe_trace_point_type,
805- std::optional<tracing::ITracingRuntime::TracePointDataId>{},
806- _,
807- _))
808- .WillOnce (Return (Result<void >{}));
809-
810-
811- // and that Subscribe will be called on the binding
812- EXPECT_CALL (*this ->mock_proxy_event_binding_ , Subscribe (max_sample_count));
813-
814794 // Then a trace call relating to Unsubscribe should be called containing the correct max_sample_count which returns
815795 // an error
816796 tracing::ITracingRuntime::TracePointType trace_point_type{
@@ -824,9 +804,6 @@ TYPED_TEST(ProxyEventTracingUnsubscribeFixture,
824804 0U ))
825805 .WillOnce (Return (MakeUnexpected (tracing::TraceErrorCode::TraceErrorDisableTracePointInstance)));
826806
827- // and that Unsubscribe will be called on the binding
828- EXPECT_CALL (*this ->mock_proxy_event_binding_ , Unsubscribe ());
829-
830807 // When a Proxy containing a ProxyEvent is created based on a lola deployment
831808 this ->CreateProxy ();
832809
@@ -857,7 +834,6 @@ TYPED_TEST(ProxyEventTracingUnsubscribeFixture,
857834
858835 ProxyEventTracingData expected_enabled_trace_points{};
859836 expected_enabled_trace_points.enable_unsubscribe = true ;
860- expected_enabled_trace_points.enable_subscribe = true ;
861837 expected_enabled_trace_points.enable_call_receive_handler = true ;
862838
863839 const tracing::ServiceElementInstanceIdentifierView expected_service_element_instance_identifier_view =
@@ -878,27 +854,6 @@ TYPED_TEST(ProxyEventTracingUnsubscribeFixture,
878854 typename ProxyEventTracingFixture<TypeParam>::TracePointType>(
879855 expected_enabled_trace_points, kServiceIdentifierStringView , kServiceElementName , kInstanceSpecifierStringView );
880856
881- // Expect that GetSubscriptionState returns kNotSubscribed then kSubscribed
882- EXPECT_CALL (*this ->mock_proxy_event_binding_ , GetSubscriptionState ())
883- .WillOnce (Return (SubscriptionState::kNotSubscribed ))
884- .WillOnce (Return (SubscriptionState::kSubscribed ));
885-
886- // Expect that a trace call relating to Subscribe is called
887- tracing::ITracingRuntime::TracePointType subscribe_trace_point_type{
888- ProxyEventTracingFixture<TypeParam>::TracePointType::SUBSCRIBE};
889- EXPECT_CALL (tracing_runtime_mock,
890- Trace (BindingType::kLoLa ,
891- expected_service_element_instance_identifier_view,
892- subscribe_trace_point_type,
893- std::optional<tracing::ITracingRuntime::TracePointDataId>{},
894- _,
895- _))
896- .WillOnce (Return (Result<void >{}));
897-
898-
899- // and that Subscribe will be called on the binding
900- EXPECT_CALL (*this ->mock_proxy_event_binding_ , Subscribe (max_sample_count));
901-
902857 // Then a trace call relating to Unsubscribe should be called containing the correct max_sample_count which returns
903858 // an error
904859 tracing::ITracingRuntime::TracePointType trace_point_type{
@@ -912,9 +867,6 @@ TYPED_TEST(ProxyEventTracingUnsubscribeFixture,
912867 0U ))
913868 .WillOnce (Return (MakeUnexpected (tracing::TraceErrorCode::TraceErrorDisableAllTracePoints)));
914869
915- // and that Unsubscribe will be called on the binding
916- EXPECT_CALL (*this ->mock_proxy_event_binding_ , Unsubscribe ());
917-
918870 // When a Proxy containing a ProxyEvent is created based on a lola deployment
919871 this ->CreateProxy ();
920872
0 commit comments