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

Fix flaky ResultTest and build config warnings #785

Merged
merged 1 commit into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ android {
}
buildFeatures {
viewBinding = true
buildConfig = true
}
namespace 'org.openobservatory.ooniprobe'
}
Expand Down Expand Up @@ -176,7 +177,6 @@ dependencies {
testImplementation libs.androidx.runner
testImplementation libs.androidx.rules
testImplementation libs.mockito.core
testImplementation libs.mockito.inline
testImplementation libs.robolectric
testImplementation libs.faker
testImplementation libs.ooni.oonimkall
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@ public void onCreate() {

@Override
public int onStartCommand(Intent intent, int flags, int startId) {
@SuppressWarnings("unchecked")
ArrayList<AbstractSuite> testSuites = (ArrayList<AbstractSuite>) intent.getSerializableExtra("testSuites");
if (testSuites == null || testSuites.size() == 0)
if (testSuites == null || testSuites.isEmpty())
return START_STICKY_COMPATIBILITY;
boolean store_db = intent.getBooleanExtra("storeDB", true);
boolean unattended = intent.getBooleanExtra("unattended", false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public void readableFileSize() {
@Test
public void getLastResult() {
Result first = new Result("");
first.start_time = new Date(System.currentTimeMillis() - 1000);
first.save();
Result second = new Result("");
second.save();
Expand Down
1 change: 0 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
android.defaults.buildfeatures.buildconfig=true
android.enableJetifier=true
android.nonFinalResIds=false
android.nonTransitiveRClass=false
Expand Down
6 changes: 2 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ androidGradlePlugin = "8.5.1"
barista = "3.9.0"
countlySdk = "24.7.0"
faker = "2.0.4"
mockitoCore = "5.12.0"
mockitoInline = "5.2.0"
mockito = "5.12.0"
robolectric = "4.13"
fastlaneScreengrab = "2.1.1"
sentryAndroid = "7.11.0"
Expand Down Expand Up @@ -64,8 +63,7 @@ xanscale-localhost-toolkit = { module = "com.github.xanscale.LocalhostToolkit:ap
commons-io = { module = "commons-io:commons-io", version.ref = "commonsIo" }
kotlin-gradlePlugin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "kotlin" }

mockito-core = { module = "org.mockito:mockito-core", version.ref = "mockitoCore" }
mockito-inline = { module = "org.mockito:mockito-inline", version.ref = "mockitoInline" }
mockito-core = { module = "org.mockito:mockito-core", version.ref = "mockito" }

lottie = { module = "com.airbnb.android:lottie", version.ref = "lottie" }
markwon-core = { module = "io.noties.markwon:core", version.ref = "markwon" }
Expand Down
Loading