From 8e46de74a383e266934ad186406c069e16588826 Mon Sep 17 00:00:00 2001 From: Aaron Jacobs Date: Fri, 20 Mar 2015 13:47:47 +1100 Subject: [PATCH] Fixed my misunderstanding of dup. --- samples/flushfs/flush_fs_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/samples/flushfs/flush_fs_test.go b/samples/flushfs/flush_fs_test.go index 7c7a410..3a8322c 100644 --- a/samples/flushfs/flush_fs_test.go +++ b/samples/flushfs/flush_fs_test.go @@ -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()) }