22 lines
333 B
Go
22 lines
333 B
Go
|
package queue
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"loafle.com/overflow/agent_api/observer"
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
func TestNewLoafleQueue(t *testing.T) {
|
||
|
lq := NewLoafleQueue(EVENT_TYPE, 5)
|
||
|
typeEvent := lq.StringType(EVENT_TYPE)
|
||
|
|
||
|
observer.Notify(typeEvent, "data")
|
||
|
|
||
|
re := lq.GetItems()
|
||
|
|
||
|
for it, val := range re {
|
||
|
fmt.Println(val)
|
||
|
fmt.Println(it)
|
||
|
}
|
||
|
}
|