queue_go/queue_test.go

22 lines
318 B
Go
Raw Normal View History

2017-04-26 06:58:38 +00:00
package queue
import (
"fmt"
"loafle.com/overflow/agent_api/observer"
"testing"
)
2017-04-26 07:04:28 +00:00
func TestNewQueue(t *testing.T) {
lq := NewQueue(EVENT_TYPE, 5)
2017-04-26 08:07:49 +00:00
typeEvent := StringType(EVENT_TYPE)
2017-04-26 06:58:38 +00:00
observer.Notify(typeEvent, "data")
re := lq.GetItems()
for it, val := range re {
fmt.Println(val)
fmt.Println(it)
}
}