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