mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-25 16:30:25 +08:00
bfs:弹出BFile的时候确保没有正在被使用
This commit is contained in:
@@ -129,7 +129,7 @@ func TestFS_OpenFileWriter_Close(t *testing.T) {
|
||||
}
|
||||
|
||||
fs, openErr := bfs.OpenFS(Tea.Root+"/data/bfs/test", &bfs.FSOptions{
|
||||
MaxOpenFiles: 4 << 10,
|
||||
MaxOpenFiles: 99,
|
||||
})
|
||||
if openErr != nil {
|
||||
t.Fatal(openErr)
|
||||
@@ -138,9 +138,9 @@ func TestFS_OpenFileWriter_Close(t *testing.T) {
|
||||
_ = fs.Close()
|
||||
}()
|
||||
|
||||
var count = 10
|
||||
var count = 2
|
||||
if testutils.IsSingleTesting() {
|
||||
count = 1000
|
||||
count = 100
|
||||
}
|
||||
|
||||
for i := 0; i < count; i++ {
|
||||
@@ -165,7 +165,11 @@ func TestFS_OpenFileWriter_Close(t *testing.T) {
|
||||
t.Fatal("len(bNames)!=len(bMap)")
|
||||
}
|
||||
|
||||
t.Log("["+types.String(len(bNames))+"]", bNames)
|
||||
if len(bNames) < 10 {
|
||||
t.Log("["+types.String(len(bNames))+"]", bNames)
|
||||
} else {
|
||||
t.Log("["+types.String(len(bNames))+"]", bNames[:10], "...")
|
||||
}
|
||||
}
|
||||
|
||||
p()
|
||||
|
||||
Reference in New Issue
Block a user