Skip to content

Commit 25a6353

Browse files
fix: disable orientation for the test
1 parent b16d311 commit 25a6353

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

sdk/src/androidTest/java/ly/count/android/sdk/scUP_UserProfileTests.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -123,14 +123,14 @@ public void eventSaveScenario_changeDeviceIDWithoutMerge() throws JSONException
123123
/**
124124
* Related user properties should not be saved with session calls,
125125
* call order, user property before session, begin session, user property after begin session, update session, user property after update session, end session
126-
* generated request order begin_session + orientation + update_session + user properties + end_session
126+
* generated request order begin_session + update_session + user properties + end_session
127127
* manual sessions are enabled
128128
* UPDATE: session calls now trigger saving properties like events as well
129-
* UPDATED_REQUEST_ORDER: user property before session + begin_session + orientation + user property after begin session + update_session + user property after update session + end_session
129+
* UPDATED_REQUEST_ORDER: user property before session + begin_session + user property after begin session + update_session + user property after update session + end_session
130130
*/
131131
@Test
132132
public void eventSaveScenario_sessionCallsTriggersSave_M() throws JSONException, InterruptedException {
133-
Countly countly = new Countly().init(TestUtils.createBaseConfig().enableManualSessionControl());
133+
Countly countly = new Countly().init(TestUtils.createBaseConfig().enableManualSessionControl().setTrackOrientationChanges(false));
134134

135135
TestUtils.assertRQSize(0);
136136
countly.userProfile().setProperty("before_session", true);
@@ -147,20 +147,20 @@ public void eventSaveScenario_sessionCallsTriggersSave_M() throws JSONException,
147147
Thread.sleep(2000);
148148

149149
countly.sessions().updateSession();
150-
TestUtils.assertRQSize(5); // only begin session, orientation and update session requests, UPDATE: user property request after update session
150+
TestUtils.assertRQSize(4); // only begin session and update session requests, UPDATE: user property request after begin and update session
151151

152-
ModuleUserProfileTests.validateUserProfileRequest(3, 5, TestUtils.map(), TestUtils.map("after_begin_session", true));
153-
ModuleSessionsTests.validateSessionUpdateRequest(4, 2, TestUtils.commonDeviceId);
152+
ModuleUserProfileTests.validateUserProfileRequest(2, 4, TestUtils.map(), TestUtils.map("after_begin_session", true));
153+
ModuleSessionsTests.validateSessionUpdateRequest(3, 2, TestUtils.commonDeviceId);
154154

155155
countly.userProfile().setProperty("after_update_session", true);
156-
TestUtils.assertRQSize(5); // still begin session and update session requests
156+
TestUtils.assertRQSize(4); // still begin session and update session requests
157157
// no new user property request because it is validated along with update session
158158
Thread.sleep(2000);
159159

160160
countly.sessions().endSession();
161-
TestUtils.assertRQSize(7); // begin, update, user properties and end session requests
162-
ModuleUserProfileTests.validateUserProfileRequest(5, 7, TestUtils.map(), TestUtils.map("after_update_session", true));
163-
ModuleSessionsTests.validateSessionEndRequest(6, 2, TestUtils.commonDeviceId);
161+
TestUtils.assertRQSize(6); // begin, update, user properties and end session requests
162+
ModuleUserProfileTests.validateUserProfileRequest(4, 6, TestUtils.map(), TestUtils.map("after_update_session", true));
163+
ModuleSessionsTests.validateSessionEndRequest(5, 2, TestUtils.commonDeviceId);
164164
}
165165

166166
/**

0 commit comments

Comments
 (0)