Clarified the expectations in a couple of tests.

Aaron Jacobs 2015-03-17 16:14:37 +11:00
parent 255dbdc3a0
commit 40519818d5
1 changed files with 6 additions and 5 deletions

View File

@ -446,15 +446,16 @@ func (t *AttributeCachingTest) StatRenumberStat() {
ExpectEq(t.fs.BarID(), getInodeID(barAfter))
func (t *AttributeCachingTest) StatMtimeStat() {
func (t *AttributeCachingTest) StatMtimeStat_ViaPath() {
newMtime := t.initialMtime.Add(time.Second)
fooAfter, dirAfter, barAfter := t.statAll()
// We should see the new attributes, since the entry had to be looked up
// again and the new attributes were returned with the entry.
// 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
// that the mtime will be fresh.
ExpectThat(fooAfter.ModTime(), timeutil.TimeEq(newMtime))
ExpectThat(dirAfter.ModTime(), timeutil.TimeEq(newMtime))
ExpectThat(barAfter.ModTime(), timeutil.TimeEq(newMtime))
@ -490,7 +491,7 @@ func (t *AttributeCachingTest) StatMtimeStat_ViaFileDescriptor() {
ExpectThat(barAfter.ModTime(), timeutil.TimeEq(newMtime))
func (t *AttributeCachingTest) StatRenumberMtimeStat() {
func (t *AttributeCachingTest) StatRenumberMtimeStat_ViaPath() {
newMtime := t.initialMtime.Add(time.Second)
@ -500,7 +501,7 @@ func (t *AttributeCachingTest) StatRenumberMtimeStat() {
// We should see new everything, because this is the first time the new
// inodes have been encountered. Entries for the old ones should not have
// been cached.
// been cached, because we have entry caching disabled.
ExpectEq(t.fs.FooID(), getInodeID(fooAfter))
ExpectEq(t.fs.DirID(), getInodeID(dirAfter))
ExpectEq(t.fs.BarID(), getInodeID(barAfter))