Skip to content
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

Safeguard unit test threading #285

Merged
merged 5 commits into from
Nov 1, 2018
Merged

Conversation

Cliabhach
Copy link
Contributor

@Cliabhach Cliabhach commented Oct 17, 2018

Ideally, this will remove some flakiness from our tests in AppDataManagerTest.kt.

Said uncertainty was introduced by 9d41f30.

This PR also reduces the memory usage of the JVM build process (advice derived from https://discuss.circleci.com/t/circleci-2-0-android-with-kotlin/17531/2 ) and switches the version of the Android Gradle Plugin in use to the latest stable release (v3.2.1).

@Cliabhach Cliabhach force-pushed the pc-safeguard-unit-test-threading branch from 0c8c5d7 to 782ac6e Compare October 19, 2018 22:13
@Cliabhach
Copy link
Contributor Author

@caguilar187 Let me know how you feel about that latest change.

@Cliabhach
Copy link
Contributor Author

As requested offline by @caguilar187, I am running the full CircleCI integration multiple times against commit 782ac6e. If it passes 70+% of these runs, we will consider this a sufficiently-worthwhile improvement and thus worthy of being merged in.

@Cliabhach
Copy link
Contributor Author

We're looking at 50% success after 8 runs.....breakdown of failures as follows:

2 failures due to the daemon disappearing (tasks :welcome:packageDebugResources, :access_card:lint)
1 failure due to integer number too large: 7f0ff007c (task :welcome:kaptGenerateStubsDebugKotlin)
1 failure due to D8: Cannot allocate memory (task :app:transformDexArchiveWithExternalLibsDexMergerForDebug)

I personally believe all but the 'integer number too large' failure are affected by the memory allocated during compilation, especially of those modules running kapt. If we reduced the associated load by e.g. consolidating modules (as in #299) or re-evaluating the complexity of some of our database objects, I'm sure the failure rate would decrease as well. I'll now take the opportunity to rebase this branch on the latest dev.

@caguilar187 your thoughts?

@Cliabhach
Copy link
Contributor Author

I'll rebase on dev and try something different: the latest pre-release AGP version (3.4.0a2).

@Cliabhach Cliabhach force-pushed the pc-safeguard-unit-test-threading branch 3 times, most recently from 4551688 to f6b7132 Compare October 29, 2018 21:29
@Cliabhach Cliabhach force-pushed the pc-safeguard-unit-test-threading branch from f6b7132 to 03f2033 Compare October 31, 2018 17:08
@Cliabhach
Copy link
Contributor Author

We've reached 7/8 successes for this last commit.

@Cliabhach Cliabhach merged commit 105a20a into dev Nov 1, 2018
@Cliabhach Cliabhach deleted the pc-safeguard-unit-test-threading branch November 1, 2018 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants