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

Remove junit.framework #13805

Closed

Conversation

jamesonwilliams
Copy link
Contributor

@jamesonwilliams jamesonwilliams commented Nov 20, 2024

Contributor checklist

  • Local development machine for JVM tests
  • My contribution is fully baked and ready to be merged as is
  • I ensure that all the open issues my contribution fixes are mentioned in the commit message of my first commit using the Fixes #1234 syntax

Description

The junit.framework is leftover from JUnit 3, although most of the Android community uses the JUnit 4.x series. JUnit 4.x uses the import org.junit.

I did a global replace-all of some common junit.framework imports and replaced them with their org.junit analogs.

TestCase is a one special case; it is necessary to add @Test on functions in classes that wear extends TestCase.

In a few places I fixed the order of expected/actual calls to assertEquals(...) (again through a regular expression that automatically swapped them.)

In a few places I added assertThrows where there had been a try/catch construct used haphazardly instead

At the end of all this, this is the result:

$ rg junit\.framework
microbenchmark/benchmark-proguard-rules.pro:-dontnote junit.framework.**

Also, this passes:

./gradlew qa
[...snip...]
BUILD SUCCESSFUL in 3m 2s

@greyson-signal
Copy link
Contributor

Awesome, thanks so much! I'll sleep happier knowing I won't have to remember which assert to import :)

@jamesonwilliams jamesonwilliams deleted the remove-junit.framework branch November 21, 2024 20:51
TheTechZone pushed a commit to Cerenia/Signal-Android that referenced this pull request Jan 6, 2025
AbandonedCart pushed a commit to SamSprung/Signal-Android that referenced this pull request Jan 31, 2025
Fix mark registration complete flag.

Add extra catch to adding system contact links.

Update translations and other static files.

Bump version to 7.25.1

Fix bad active state check for subscriptions.

Bump version to 7.25.2

Remove old donation jobs.

Update libsignal-net integration to match libsignal v0.62.0.

Add MediaTTL to subscriptions configuration and wire in.

Normalize receipt labeling.

Add a .tool-versions to indicate which version of java should be used.

Add backup specific strings for token redemption error.

Add copy for paid-tier-pending dialog.

Update to actions/upload-artifact v4.

Include unregistered users in blocked sync message.

Detect storage space issues during restore.

Hardcode auto-provisioning in Gradle to off.

Fix restore/transfer string typos.

Resolve some gradle 8 deprecations.

Resolves signalapp#13788

Remove unreachable dependencies from verification-metadata.xml

I did this by clearing the components entries:

perl -i -0777 -pe 's/<components>.*?<\/components>//gs'  gradle/verification-metadata.xml

And then regenerating them:

./gradlew --write-verification-metadata sha256 qa --rerun-tasks

Resolves signalapp#13791

Convert some Java tests to Kotlin.

Resolves signalapp#13792

Switch to using toml version catalogs.

Resolves signalapp#13792

Prevent displaying AppSettings content until self is non-null.

Display proper error when call link deletion fails due to call link being in use.

Convert InternalValues to kotlin.

Implement checkin job for backups.

Change the JobDatabase to use a different error handler.

Relates to signalapp#13762

Remove redundant zkcCredential=true

Add deletion method to ArchiveApi.

Sync the MediaRootBackupKey during linking.

Fix link+sync uploads.

Update link+sync ui.

Remove mockito usage from android tests.

Rotate the link+sync flag.

Update bug_report.yaml

Resolves signalapp#13803

Remove junit.framework

Resolves signalapp#13805

Remove BaseUnitTest.java

Resolves signalapp#13804

Make LibSignalChatConnection Only Use Each ChatService Once

Introduce AEP and SSRE2.

Added a Storage Service Playground screen.

Update backup string (digit -> character).

Utilize fixed test address for mockwebserver.

Improve error reporting in storage service playground.

Allow stories to be embedded with link previews that do not have titles.

Update translations and other static files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants