Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jacobsa-fuse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
jacobsa-fuse
Commits
8e46de74
Commit
8e46de74
authored
Mar 20, 2015
by
Aaron Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed my misunderstanding of dup.
parent
7de08bc1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
samples/flushfs/flush_fs_test.go
samples/flushfs/flush_fs_test.go
+6
-6
No files found.
samples/flushfs/flush_fs_test.go
View file @
8e46de74
...
...
@@ -466,7 +466,7 @@ func (t *FlushFSTest) Dup() {
AssertEq
(
nil
,
err
)
AssertEq
(
4
,
n
)
n
,
err
=
f2
.
Write
([]
byte
(
"
p
"
))
n
,
err
=
f2
.
Write
([]
byte
(
"
s
"
))
AssertEq
(
nil
,
err
)
AssertEq
(
1
,
n
)
...
...
@@ -479,15 +479,15 @@ func (t *FlushFSTest) Dup() {
f1
=
nil
AssertEq
(
nil
,
err
)
AssertThat
(
t
.
getFlushes
(),
ElementsAre
(
"
paco
"
))
AssertThat
(
t
.
getFlushes
(),
ElementsAre
(
"
tacos
"
))
AssertThat
(
t
.
getFsyncs
(),
ElementsAre
())
// Write some more contents via the other handle. Again, no further flushes.
n
,
err
=
f2
.
Write
([]
byte
(
"
orp
"
))
n
,
err
=
f2
.
Write
([]
byte
(
"
!
"
))
AssertEq
(
nil
,
err
)
AssertEq
(
3
,
n
)
AssertEq
(
1
,
n
)
AssertThat
(
t
.
getFlushes
(),
ElementsAre
(
"
paco
"
))
AssertThat
(
t
.
getFlushes
(),
ElementsAre
(
"
tacos
"
))
AssertThat
(
t
.
getFsyncs
(),
ElementsAre
())
// Close the handle. Now the new contents should be flushed.
...
...
@@ -495,7 +495,7 @@ func (t *FlushFSTest) Dup() {
f2
=
nil
AssertEq
(
nil
,
err
)
AssertThat
(
t
.
getFlushes
(),
ElementsAre
(
"
paco"
,
"porp
"
))
AssertThat
(
t
.
getFlushes
(),
ElementsAre
(
"
tacos"
,
"tacos!
"
))
AssertThat
(
t
.
getFsyncs
(),
ElementsAre
())
}
...
...
Write
Preview
Markdown
is supported
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