aboutsummaryrefslogtreecommitdiff
path: root/weed/storage/volume_read_test.go
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2023-03-14 22:02:49 -0700
committerchrislu <chris.lu@gmail.com>2023-03-14 22:02:49 -0700
commit0454bb2d88add5a6ff0d9189cdba368a2a6ae13c (patch)
tree8fff99bc050932c27eebc5046151b7d494755c06 /weed/storage/volume_read_test.go
parent2268d382637e6ff3ce19d4ea9cd76ffd9e05b67e (diff)
downloadseaweedfs-0454bb2d88add5a6ff0d9189cdba368a2a6ae13c.tar.xz
seaweedfs-0454bb2d88add5a6ff0d9189cdba368a2a6ae13c.zip
fix test
when size is zero, the "LastModified" is not written
Diffstat (limited to 'weed/storage/volume_read_test.go')
-rw-r--r--weed/storage/volume_read_test.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/weed/storage/volume_read_test.go b/weed/storage/volume_read_test.go
index 02c514083..7e0bcb359 100644
--- a/weed/storage/volume_read_test.go
+++ b/weed/storage/volume_read_test.go
@@ -41,7 +41,9 @@ func TestReadNeedMetaWithWritesAndUpdates(t *testing.T) {
testNeedle.Flags = 0x08
v.readNeedleMetaAt(testNeedle, writeInfos[i].offset, writeInfos[i].size)
actualLastModifiedTime := testNeedle.LastModified
- assert.Equal(t, expectedLastUpdateTime, actualLastModifiedTime, "The two words should be the same.")
+ if writeInfos[i].size != 0 {
+ assert.Equal(t, expectedLastUpdateTime, actualLastModifiedTime, "The two words should be the same.")
+ }
expectedLastUpdateTime += 2000
}
}