Fixed AttributeCachingTest.StatMtimeStat_ViaPath on OS X.
parent
038f8e49a2
commit
b851c516e3
|
@ -28,6 +28,7 @@ import (
|
||||||
"github.com/jacobsa/fuse"
|
"github.com/jacobsa/fuse"
|
||||||
"github.com/jacobsa/fuse/samples/cachingfs"
|
"github.com/jacobsa/fuse/samples/cachingfs"
|
||||||
"github.com/jacobsa/gcsfuse/timeutil"
|
"github.com/jacobsa/gcsfuse/timeutil"
|
||||||
|
. "github.com/jacobsa/oglematchers"
|
||||||
. "github.com/jacobsa/ogletest"
|
. "github.com/jacobsa/ogletest"
|
||||||
"golang.org/x/net/context"
|
"golang.org/x/net/context"
|
||||||
)
|
)
|
||||||
|
@ -470,11 +471,13 @@ func (t *AttributeCachingTest) StatMtimeStat_ViaPath() {
|
||||||
fooAfter, dirAfter, barAfter := t.statAll()
|
fooAfter, dirAfter, barAfter := t.statAll()
|
||||||
|
|
||||||
// Since we don't have entry caching enabled, the call above had to look up
|
// Since we don't have entry caching enabled, the call above had to look up
|
||||||
// the entry again. With the lookup we returned new attributes, so we expect
|
// the entry again. With the lookup we returned new attributes, so it's
|
||||||
// that the mtime will be fresh.
|
// possible that the mtime will be fresh. On Linux it appears to be, and on
|
||||||
ExpectThat(fooAfter.ModTime(), timeutil.TimeEq(newMtime))
|
// OS X it appears to not be.
|
||||||
ExpectThat(dirAfter.ModTime(), timeutil.TimeEq(newMtime))
|
m := AnyOf(timeutil.TimeEq(newMtime), timeutil.TimeEq(t.initialMtime))
|
||||||
ExpectThat(barAfter.ModTime(), timeutil.TimeEq(newMtime))
|
ExpectThat(fooAfter.ModTime(), m)
|
||||||
|
ExpectThat(dirAfter.ModTime(), m)
|
||||||
|
ExpectThat(barAfter.ModTime(), m)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *AttributeCachingTest) StatMtimeStat_ViaFileDescriptor() {
|
func (t *AttributeCachingTest) StatMtimeStat_ViaFileDescriptor() {
|
||||||
|
|
Loading…
Reference in New Issue