Skip to content

Conversation

@MGaetan89
Copy link
Member

Follow-up PR of #9020 and #9027

@MGaetan89 MGaetan89 force-pushed the remove_legacy_code branch from 45f5eb2 to 2f49086 Compare May 1, 2024 14:58
@utzcoz
Copy link
Member

utzcoz commented May 2, 2024

@MGaetan89 Please check CI logs to check whether there are extra adaption we need to do for this PR. Thanks.

@utzcoz
Copy link
Member

utzcoz commented May 3, 2024

@MGaetan89 Please rebase your PR based on latest master branch as I merged some commits to make CI green.

@MGaetan89 MGaetan89 force-pushed the remove_legacy_code branch from b3a8c79 to 7e43cab Compare May 3, 2024 12:11
@MGaetan89
Copy link
Member Author

@MGaetan89 Please rebase your PR based on latest master branch as I merged some commits to make CI green.

Done. I'll check the remaining failures this weekend.

@utzcoz
Copy link
Member

utzcoz commented May 3, 2024

@MGaetan89 I think you can reproduce them locally and fix them.

@MGaetan89
Copy link
Member Author

@utzcoz @hoisie the Tests / build step failed because of an out of memory error. Could either of you please restart it?

Caused by: java.lang.RuntimeException: java.lang.OutOfMemoryError: Java heap space

@utzcoz
Copy link
Member

utzcoz commented May 18, 2024

@MGaetan89 Please rebase and we can check whether it can merged now.

@MGaetan89 MGaetan89 force-pushed the remove_legacy_code branch from ef61138 to 1f4e106 Compare May 19, 2024 07:55
@MGaetan89
Copy link
Member Author

@MGaetan89 Please rebase and we can check whether it can merged now.

Done. Looks like there are still some failing tests. I'm investigating now

@utzcoz
Copy link
Member

utzcoz commented May 19, 2024

I recommend you to run these tests locally to ensure they can all pass as this PR changes a lot of code before pushing again.

@MGaetan89 MGaetan89 force-pushed the remove_legacy_code branch from 1f4e106 to f38d68d Compare May 23, 2024 20:09
@MGaetan89
Copy link
Member Author

MGaetan89 commented May 23, 2024

@utzcoz I fixed the tests in ShadowContextImplTest, but there seem to be a memory issue now. Could you restart the failing job please?

Also, I noticed that testapp is the only module left with minSdk set to 19. Should I bump it to 21?

@utzcoz
Copy link
Member

utzcoz commented May 24, 2024

Also, I noticed that testapp is the only module left with minSdk set to 19. Should I bump it to 21?

@MGaetan89 I think yes. But you can open a new PR to cleanup.

@MGaetan89
Copy link
Member Author

We're getting closer!
Now it's the emulator that failed to start 😅

Error: Timeout waiting for emulator to boot.

MGaetan89 added a commit to MGaetan89/robolectric that referenced this pull request May 24, 2024
This aligns it with the other modules, which are already using `minSdk` 21.
As discussed in robolectric#9036 (comment)
@utzcoz
Copy link
Member

utzcoz commented May 24, 2024

I think it might be related to cache or Emulator. I deleted the cache, and tried it again.

@MGaetan89
Copy link
Member Author

MGaetan89 commented May 24, 2024

Same result, and it happens as well in #9106

In the log, I see the following error message:

ERROR | Not enough space to create userdata partition. Available: 6957.617188 MB at /home/runner/.android/avd/../avd/test.avd, need 7372.800000 MB.

Since Linux runners have 14Gb of storage, maybe there are other caches taking up all the space?

@utzcoz
Copy link
Member

utzcoz commented May 24, 2024

@MGaetan89 In my opinion, other caches are necessary? Actually, SDK34 uses aosp_atd with a smaller disk usage.

@utzcoz
Copy link
Member

utzcoz commented May 24, 2024

  # As long as there are some space issues with the CI runners.
  - name: Free Disk Space
    uses: jlumbroso/free-disk-space@0add001504c51b93b35ac8e81d252bdd47e4ef07
    with:
      android: true
      dotnet: true
      haskell: true
      large-packages: true
      docker-images: true
      swap-storage: true
      tool-cache: false

@MGaetan89 What about integrating this action to freeup disk space by removing unused files bound by GitHub Action images?

@utzcoz
Copy link
Member

utzcoz commented May 24, 2024

Maybe another commit in this PR

@MGaetan89 MGaetan89 force-pushed the remove_legacy_code branch from fe072d6 to eac7f98 Compare May 24, 2024 07:11
@MGaetan89
Copy link
Member Author

Done in eac7f98

I'll squash my commits once the build is completed.

@utzcoz
Copy link
Member

utzcoz commented May 24, 2024

@MGaetan89 Please fix commit message warnings.

@MGaetan89 MGaetan89 force-pushed the remove_legacy_code branch from eac7f98 to e3b602e Compare May 24, 2024 07:20
@MGaetan89 MGaetan89 force-pushed the remove_legacy_code branch from e3b602e to c49e5cb Compare May 24, 2024 07:32
@MGaetan89
Copy link
Member Author

@utzcoz your suggestion seems to be working fine, thank you!
The downside is that it adds about 2min to each instrumentation test job. But we can investigate CI optimisation in a dedicated PR.

I've squashed my commits together, so the build should be successful soon 🤞🏻

@utzcoz utzcoz requested review from brettchabot and hoisie May 24, 2024 09:34
@utzcoz
Copy link
Member

utzcoz commented May 24, 2024

@MGaetan89 Thanks. Maybe we need another PR to migrate test expected to assertThrows brought by this PR. This one LGTM. cc @brettchabot and @hoisie for this extra cleanup PR.

@utzcoz utzcoz merged commit c51c71d into robolectric:master May 24, 2024
@MGaetan89 MGaetan89 deleted the remove_legacy_code branch May 24, 2024 09:38
MGaetan89 added a commit to MGaetan89/robolectric that referenced this pull request May 24, 2024
This aligns it with the other modules, which are already using `minSdk` 21.
As discussed in robolectric#9036 (comment)
utzcoz pushed a commit that referenced this pull request May 24, 2024
This aligns it with the other modules, which are already using `minSdk` 21.
As discussed in #9036 (comment)
MGaetan89 added a commit to MGaetan89/robolectric that referenced this pull request May 24, 2024
This PR replaces usages of `@Test(expected = <exception>)` with `assertThrows()`.
It also replaces `try`/`catch` with `assertThrows()`.

As suggested in robolectric#9036 (comment)
MGaetan89 added a commit to MGaetan89/robolectric that referenced this pull request May 24, 2024
This PR replaces usages of `@Test(expected = <exception>)` with `assertThrows()`.
It also replaces `try`/`catch` with `assertThrows()`.

As suggested in robolectric#9036 (comment)
MGaetan89 added a commit to MGaetan89/robolectric that referenced this pull request May 24, 2024
This PR replaces usages of `@Test(expected = <exception>)` with `assertThrows()`.
It also replaces `try`/`catch` with `assertThrows()`.

As suggested in robolectric#9036 (comment)
utzcoz pushed a commit that referenced this pull request May 24, 2024
This PR replaces usages of `@Test(expected = <exception>)` with `assertThrows()`.
It also replaces `try`/`catch` with `assertThrows()`.

As suggested in #9036 (comment)
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