Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

add a simple test

chrislu114ac39917bf
diff --git a/weed/util/queue_test.go b/weed/util/queue_test.go
new file mode 100644
index 0000000000..a79552893e
--- /dev/null
+++ b/weed/util/queue_test.go
@@ -0,0 +1,22 @@
+package util
+
+import (
+ "github.com/stretchr/testify/assert"
+ "testing"
+)
+
+func TestNewQueue(t *testing.T) {
+
+ q := NewQueue[int]()
+
+ for i := 0; i < 10; i++ {
+ q.Enqueue(i)
+ }
+
+ assert.Equal(t, q.Len(), 10)
+
+ for i := 0; i < 10; i++ {
+ assert.Equal(t, q.Dequeue(), i)
+ }
+
+}