-
Notifications
You must be signed in to change notification settings - Fork 738
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trying to fix integration tests #4842
Conversation
…ery very limited for that) - Split them in msdk and app test along with multiple smaller steps. - Mark the not working tests with @ignore so that they will not run neither local or on github actions - Add user friendly comment on PR to view the results
9221904
to
6a24e02
Compare
Matrix SDKIntegration Tests Results:
|
Undo 1 core usage Undo force-avd-creation
We will have to update the GitHub setting to make the actions required:
Also the action |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, thanks a lot for working on that.
Some comment/questions.
jobs: | ||
# Build Android Tests [Matrix SDK] | ||
build-android-test-matrix-sdk: | ||
name: Matrix SDK - Build Android Tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to keep this action since it is now done when we run the integration test?
It has been added (see the comment here) to ensure that the tests are compiling by making this action "Required" on every PRs.
But now I think we can put the test run "Required".
Thinking more about it, since this action is more reliable than the running of integration test, maybe we can keep it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly thats why I kept it. While its not 100% reliable I think we should keep it
@@ -29,6 +29,7 @@ def vanniktechEmoji = "0.8.0" | |||
def mockk = "1.12.1" | |||
def espresso = "3.4.0" | |||
def androidxTest = "1.4.0" | |||
def androidxOrchestrator = "1.4.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just update the value of androidxTest
above to 1.4.1
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, I read a bit fast the title at https://developer.android.com/jetpack/androidx/releases/test#core_141_2
Also confirmed that this should not be a problem to use various version by the sample at https://developer.android.com/jetpack/androidx/releases/test#declaring_dependencies
return | ||
} catch (t: Throwable) { | ||
caughtThrowable = t | ||
Log.e(TAG, description.displayName + ": run " + (i + 1) + " failed") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe also log the exception t
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also can we use Timber
here? (Maybe not)
matrix-sdk-android/src/androidTest/java/org/matrix/android/sdk/common/TestConstants.kt
Show resolved
Hide resolved
@@ -39,12 +41,14 @@ import org.matrix.android.sdk.internal.crypto.model.event.WithHeldCode | |||
|
|||
@RunWith(AndroidJUnit4::class) | |||
@FixMethodOrder(MethodSorters.JVM) | |||
@LargeTest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where are effectively use this annotation LargeTest
(and the other ones)? It's maybe not in this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we are not currently using those annotations. The plan is to start using this annotation to our tests when everything is annotated. I have annotated some of the tests but not all of them
@@ -528,7 +547,6 @@ class SASTest : InstrumentedTest { | |||
val aliceDeviceInfoFromBobPOV: CryptoDeviceInfo? = bobSession.cryptoService().getDeviceInfo(aliceSession.myUserId, aliceSession.cryptoService().getMyDevice().deviceId) | |||
|
|||
// latch wait a bit again | |||
Thread.sleep(1000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also remove the comment above
@@ -31,8 +33,13 @@ import org.matrix.android.sdk.common.CommonTestHelper | |||
import org.matrix.android.sdk.common.CryptoTestHelper | |||
import java.util.concurrent.CountDownLatch | |||
|
|||
/** !! Not working with the new timeline | |||
* Disabling it until the fix is made |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CC @ganfra
…github.com/vector-im/element-android into feature/aris/integration_tests_improvement
Ktlint Results👍 ✅ 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update
Fixing Integration test
The main problem is that GitHub actions is that it has limited resources and is not meant for that kind of jobs. In order to properly do a robust 100% solution we should welcome another CI/CD tool like Jenkins and trigger the build from here
For further improvements we should change the actual implementation of the integration tests along with the shared resources
On mac slave it works much better and consistent
As you can see here the tests can run and the results are published like below: