Skip to content

Commit b635ff0

Browse files
committed
added time
1 parent cc342f1 commit b635ff0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

example/integration_test/session_tests/manual_session_test.dart

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,13 @@ void main() {
2929
// Second begin session call should not work
3030
await Countly.instance.sessions.beginSession();
3131

32+
await tester.pump(Duration(seconds: 2));
33+
3234
// Update calls now should work
3335
await Countly.instance.sessions.updateSession();
36+
await tester.pump(Duration(seconds: 2));
3437
await Countly.instance.sessions.updateSession();
38+
await tester.pump(Duration(seconds: 2));
3539

3640
// End session call should work
3741
await Countly.instance.sessions.endSession();
@@ -66,10 +70,11 @@ void main() {
6670
if (i == 0) {
6771
expect(queryParams['begin_session']?[0], '1');
6872
} else if (i == 1 || i == 2) {
69-
expect(queryParams['session_duration']?[0], '0');
73+
expect(queryParams['session_duration']?[0], '2');
7074
expect(queryParams['end_session'], null);
7175
} else if (i == 3) {
7276
expect(queryParams['end_session']?[0], '1');
77+
expect(queryParams['session_duration']?[0], '2');
7378
}
7479
print('RQ.$i: $queryParams');
7580
print('========================');

0 commit comments

Comments
 (0)