Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
platform_packages_modules_Connectivity
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LMODroid
platform_packages_modules_Connectivity
Commits
5c3c3af9
Commit
5c3c3af9
authored
3 years ago
by
Paul Hu
Committed by
Gerrit Code Review
3 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Remove NsdSettings from test"
parents
f575d053
850bd91c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/unit/java/com/android/server/NsdServiceTest.java
+1
-8
1 addition, 8 deletions
tests/unit/java/com/android/server/NsdServiceTest.java
with
1 addition
and
8 deletions
tests/unit/java/com/android/server/NsdServiceTest.java
+
1
−
8
View file @
5c3c3af9
...
...
@@ -92,7 +92,6 @@ public class NsdServiceTest {
public
TestRule
compatChangeRule
=
new
PlatformCompatChangeRule
();
@Mock
Context
mContext
;
@Mock
ContentResolver
mResolver
;
@Mock
NsdService
.
NsdSettings
mSettings
;
NativeCallbackReceiver
mDaemonCallback
;
@Spy
DaemonConnection
mDaemon
=
new
DaemonConnection
(
mDaemonCallback
);
HandlerThread
mThread
;
...
...
@@ -129,7 +128,6 @@ public class NsdServiceTest {
@Test
@DisableCompatChanges
(
NsdManager
.
RUN_NATIVE_NSD_ONLY_IF_LEGACY_APPS
)
public
void
testPreSClients
()
throws
Exception
{
when
(
mSettings
.
isEnabled
()).
thenReturn
(
true
);
NsdService
service
=
makeService
();
// Pre S client connected, the daemon should be started.
...
...
@@ -160,7 +158,6 @@ public class NsdServiceTest {
@Test
@EnableCompatChanges
(
NsdManager
.
RUN_NATIVE_NSD_ONLY_IF_LEGACY_APPS
)
public
void
testNoDaemonStartedWhenClientsConnect
()
throws
Exception
{
when
(
mSettings
.
isEnabled
()).
thenReturn
(
true
);
final
NsdService
service
=
makeService
();
// Creating an NsdManager will not cause any cmds executed, which means
...
...
@@ -197,7 +194,6 @@ public class NsdServiceTest {
@Test
@EnableCompatChanges
(
NsdManager
.
RUN_NATIVE_NSD_ONLY_IF_LEGACY_APPS
)
public
void
testClientRequestsAreGCedAtDisconnection
()
throws
Exception
{
when
(
mSettings
.
isEnabled
()).
thenReturn
(
true
);
NsdService
service
=
makeService
();
NsdManager
client
=
connectClient
(
service
);
...
...
@@ -242,8 +238,6 @@ public class NsdServiceTest {
@Test
@EnableCompatChanges
(
NsdManager
.
RUN_NATIVE_NSD_ONLY_IF_LEGACY_APPS
)
public
void
testCleanupDelayNoRequestActive
()
throws
Exception
{
when
(
mSettings
.
isEnabled
()).
thenReturn
(
true
);
NsdService
service
=
makeService
();
NsdManager
client
=
connectClient
(
service
);
...
...
@@ -277,8 +271,7 @@ public class NsdServiceTest {
mDaemonCallback
=
callback
;
return
mDaemon
;
};
final
NsdService
service
=
new
NsdService
(
mContext
,
mSettings
,
mHandler
,
supplier
,
CLEANUP_DELAY_MS
)
{
final
NsdService
service
=
new
NsdService
(
mContext
,
mHandler
,
supplier
,
CLEANUP_DELAY_MS
)
{
@Override
public
INsdServiceConnector
connect
(
INsdManagerCallback
baseCb
)
{
// Wrap the callback in a transparent mock, to mock asBinder returning a
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment