mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-18 12:08:32 +02:00
filer: avoid possible timeouts for updates and deletions
This commit is contained in:
1 parent
45156cc2fe
commit
621cdbdf58
4 files changed
+95
-27
No files matched your search
@@ -0,0 +1,25 @@
|
||||
package util
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestEnqueueAndConsume(t *testing.T) {
|
||||
|
||||
q := NewUnboundedQueue()
|
||||
|
||||
q.EnQueue("1", "2", "3")
|
||||
|
||||
f := func(items []string) {
|
||||
for _, t := range items {
|
||||
println(t)
|
||||
}
|
||||
println("-----------------------")
|
||||
}
|
||||
q.Consume(f)
|
||||
|
||||
q.Consume(f)
|
||||
|
||||
q.EnQueue("4", "5")
|
||||
q.EnQueue("6", "7")
|
||||
q.Consume(f)
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user