Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dCache
nfs4j
Commits
7a091bad
Commit
7a091bad
authored
Jan 18, 2022
by
Tigran Mkrtchyan
☕
Browse files
src: dont use guava's Sets
Less dependency on guava Acked-by: Lea Morschel Target: master
parent
55410441
Pipeline
#19386
passed with stage
in 1 minute and 41 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
core/src/test/java/org/dcache/nfs/v4/OperationGETATTRTest.java
View file @
7a091bad
package
org.dcache.nfs.v4
;
import
com.google.common.collect.Sets
;
import
java.io.IOException
;
import
java.net.InetSocketAddress
;
import
java.net.URISyntaxException
;
import
java.util.EnumSet
;
import
java.util.Optional
;
import
org.dcache.nfs.ExportFile
;
import
org.dcache.nfs.v4.xdr.fattr4_fs_layout_types
;
...
...
@@ -33,7 +33,7 @@ public class OperationGETATTRTest {
RpcTransport
transport
=
mock
(
RpcTransport
.
class
);
ExportFile
exportFile
=
new
ExportFile
(
ClassLoader
.
getSystemResource
(
"org/dcache/nfs/exports"
).
toURI
());
given
(
dm
.
getLayoutTypes
()).
willReturn
(
Sets
.
newHashSet
(
layouttype4
.
values
()
));
given
(
dm
.
getLayoutTypes
()).
willReturn
(
EnumSet
.
allOf
(
layouttype4
.
class
));
given
(
transport
.
getRemoteSocketAddress
()).
willReturn
(
new
InetSocketAddress
(
"172.16.4.1"
,
0
));
given
(
call
.
getCredential
()).
willReturn
(
new
RpcAuthTypeNone
());
...
...
core/src/test/java/org/dcache/nfs/v4/OperationGETDEVICEINFOTest.java
View file @
7a091bad
package
org.dcache.nfs.v4
;
import
com.google.common.collect.Sets
;
import
java.io.IOException
;
import
java.net.URISyntaxException
;
import
java.util.EnumSet
;
import
org.dcache.nfs.v4.xdr.COMPOUND4args
;
import
org.dcache.nfs.v4.xdr.COMPOUND4res
;
import
org.dcache.nfs.v4.xdr.device_addr4
;
...
...
@@ -30,7 +31,7 @@ public class OperationGETDEVICEINFOTest {
NFSv41DeviceManager
dm
=
mock
(
NFSv41DeviceManager
.
class
);
given
(
dm
.
getDeviceInfo
(
any
(),
any
())).
willReturn
(
mock
(
device_addr4
.
class
));
given
(
dm
.
getLayoutTypes
()).
willReturn
(
Sets
.
newHashSet
(
layouttype4
.
values
()
));
given
(
dm
.
getLayoutTypes
()).
willReturn
(
EnumSet
.
allOf
(
layouttype4
.
class
));
CompoundContext
context
=
new
CompoundContextBuilder
()
.
withDeviceManager
(
dm
)
.
withCall
(
generateRpcCall
())
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment