From 552b9ecbca35e370e5e79b2f1934dc29880700dd Mon Sep 17 00:00:00 2001 From: Gaston Thea Date: Tue, 10 Dec 2024 13:33:54 -0300 Subject: [PATCH] Minor changes to UC tests --- .../integration/userconsent/UserConsentModeDebugTest.kt | 5 +++-- .../tests/integration/userconsent/UserConsentModeNoneTest.kt | 2 +- .../integration/userconsent/UserConsentModeOptimizedTest.kt | 5 +++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/androidTest/java/tests/integration/userconsent/UserConsentModeDebugTest.kt b/src/androidTest/java/tests/integration/userconsent/UserConsentModeDebugTest.kt index c86df4698..16b224947 100644 --- a/src/androidTest/java/tests/integration/userconsent/UserConsentModeDebugTest.kt +++ b/src/androidTest/java/tests/integration/userconsent/UserConsentModeDebugTest.kt @@ -199,7 +199,8 @@ class UserConsentModeDebugTest { mEventDao = splitRoomDatabase.eventDao() val dispatcher: HttpResponseMockDispatcher = buildDispatcher() val config = TestableSplitConfigBuilder().ready(30000) - .trafficType("client") + .trafficType("account") + .enableDebug() .impressionsMode(ImpressionsMode.DEBUG) .impressionsRefreshRate(3) .eventFlushInterval(3) @@ -224,7 +225,7 @@ class UserConsentModeDebugTest { return HttpStreamResponseMock(200, null) } - override fun getResponse(uri: URI, method: HttpMethod, body: String): HttpResponseMock { + override fun getResponse(uri: URI, method: HttpMethod, body: String?): HttpResponseMock { println(uri.path) return if (uri.path.contains("/" + IntegrationHelper.ServicePath.MEMBERSHIPS)) { HttpResponseMock(200, IntegrationHelper.emptyAllSegments()) diff --git a/src/androidTest/java/tests/integration/userconsent/UserConsentModeNoneTest.kt b/src/androidTest/java/tests/integration/userconsent/UserConsentModeNoneTest.kt index ee8ab250a..fd8e7b4cc 100644 --- a/src/androidTest/java/tests/integration/userconsent/UserConsentModeNoneTest.kt +++ b/src/androidTest/java/tests/integration/userconsent/UserConsentModeNoneTest.kt @@ -202,7 +202,7 @@ class UserConsentModeNoneTest { mCountDao = splitRoomDatabase.impressionsCountDao() val dispatcher: HttpResponseMockDispatcher = buildDispatcher() val config = TestableSplitConfigBuilder().ready(30000) - .trafficType("client") + .trafficType("account") .impressionsMode(ImpressionsMode.NONE) .impressionsRefreshRate(3) .eventFlushInterval(3) diff --git a/src/androidTest/java/tests/integration/userconsent/UserConsentModeOptimizedTest.kt b/src/androidTest/java/tests/integration/userconsent/UserConsentModeOptimizedTest.kt index 686b3436e..ea7580626 100644 --- a/src/androidTest/java/tests/integration/userconsent/UserConsentModeOptimizedTest.kt +++ b/src/androidTest/java/tests/integration/userconsent/UserConsentModeOptimizedTest.kt @@ -209,11 +209,12 @@ class UserConsentModeOptimizedTest { mCountDao = splitRoomDatabase.impressionsCountDao() val dispatcher: HttpResponseMockDispatcher = buildDispatcher() val config = TestableSplitConfigBuilder().ready(30000) - .trafficType("client") + .trafficType("account") .impressionsMode(ImpressionsMode.OPTIMIZED) .impressionsRefreshRate(3) .impressionsCountersRefreshRate(3) .mtkRefreshRate(3) + .enableDebug() .eventFlushInterval(3) .userConsent(userConsent) .build() @@ -236,7 +237,7 @@ class UserConsentModeOptimizedTest { return HttpStreamResponseMock(200, null) } - override fun getResponse(uri: URI, method: HttpMethod, body: String): HttpResponseMock { + override fun getResponse(uri: URI, method: HttpMethod, body: String?): HttpResponseMock { println(uri.path) return if (uri.path.contains("/" + IntegrationHelper.ServicePath.MEMBERSHIPS)) { HttpResponseMock(200, IntegrationHelper.emptyAllSegments())