Merge "Use non-extended mockito for net-tests-utils" into main am: ec2a5cc5c5

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/3530432

Change-Id: I21c684067253b86c3e36e7863b5cbdfc25e138d8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Remi NGUYEN VAN 2025-03-11 19:23:44 -07:00 • committed by Automerger Merge Worker
commit f461ec9757
4 changed files with 6 additions and 15 deletions

View file

@ -51,11 +51,13 @@ java_defaults {
"src/**/*.kt",
],
static_libs: [
// Include mockito extended first so it takes precedence, as other libraries like
// TetheringCommonTests bundle non-extended mockito.
// TODO: use non-extended mockito in tethering tests instead
"mockito-target-extended-minus-junit4",
"TetheringCommonTests",
"androidx.test.rules",
"frameworks-base-testutils",
"mockito-target-extended-minus-junit4",
"net-tests-utils",
"testables",
"truth",
],

View file

@ -81,17 +81,6 @@ java_library {
},
}
java_defaults {
name: "lib_mockito_extended",
static_libs: [
"mockito-target-extended-minus-junit4",
],
jni_libs: [
"libdexmakerjvmtiagent",
"libstaticjvmtiagent",
],
}
java_library {
name: "net-utils-dnspacket-common",
srcs: [

View file

@ -25,7 +25,6 @@ java_library {
],
defaults: [
"framework-connectivity-test-defaults",
"lib_mockito_extended",
],
libs: [
"androidx.annotation_annotation",
@ -36,6 +35,7 @@ java_library {
"collector-device-lib",
"kotlin-reflect",
"libnanohttpd",
"mockito-target-minus-junit4",
"net-tests-utils-host-device-common",
"net-utils-device-common",
"net-utils-device-common-async",

View file

@ -65,7 +65,6 @@ import static android.text.format.DateUtils.HOUR_IN_MILLIS;
import static android.text.format.DateUtils.MINUTE_IN_MILLIS;
import static android.text.format.DateUtils.WEEK_IN_MILLIS;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.doThrow;
import static com.android.server.net.NetworkStatsEventLogger.POLL_REASON_RAT_CHANGED;
import static com.android.server.net.NetworkStatsEventLogger.PollEvent.pollReasonNameOf;
import static com.android.server.net.NetworkStatsService.ACTION_NETWORK_STATS_POLL;
@ -96,6 +95,7 @@ import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.reset;