From 00b16db7cc823e8ef127fbc3e43d250cb428d03f Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 18 Dec 2020 16:06:30 +0100 Subject: [PATCH] Simplification of code --- .../matrix/android/sdk/common/CryptoTestHelper.kt | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/matrix-sdk-android/src/androidTest/java/org/matrix/android/sdk/common/CryptoTestHelper.kt b/matrix-sdk-android/src/androidTest/java/org/matrix/android/sdk/common/CryptoTestHelper.kt index f219986c49..3d5856fc64 100644 --- a/matrix-sdk-android/src/androidTest/java/org/matrix/android/sdk/common/CryptoTestHelper.kt +++ b/matrix-sdk-android/src/androidTest/java/org/matrix/android/sdk/common/CryptoTestHelper.kt @@ -397,13 +397,12 @@ class CryptoTestHelper(private val mTestHelper: CommonTestHelper) { val sessions = mutableListOf(aliceSession) for (index in 1 until numberOfMembers) { - mTestHelper - .createAccount("User_$index", defaultSessionParams) - .also { session -> mTestHelper.doSync(timeout = 600_000) { room.invite(session.myUserId, null, it) } } - .also { println("TEST -> " + it.myUserId + " invited") } - .also { session -> mTestHelper.doSync { session.joinRoom(room.roomId, null, emptyList(), it) } } - .also { println("TEST -> " + it.myUserId + " joined") } - .also { session -> sessions.add(session) } + val session = mTestHelper.createAccount("User_$index", defaultSessionParams) + mTestHelper.doSync(timeout = 600_000) { room.invite(session.myUserId, null, it) } + println("TEST -> " + session.myUserId + " invited") + mTestHelper.doSync { session.joinRoom(room.roomId, null, emptyList(), it) } + println("TEST -> " + session.myUserId + " joined") + sessions.add(session) } return CryptoTestData(roomId, sessions)