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) {
|
2017-04-26 09:56:07 +00:00
|
|
|
lq := NewQueue(observer.DATA_QUEUE, 5)
|
2017-04-26 06:58:38 +00:00
|
|
|
|
2017-04-26 09:56:07 +00:00
|
|
|
observer.Notify(observer.DATA_QUEUE.String(), "data")
|
2017-04-26 06:58:38 +00:00
|
|
|
|
|
|
|
re := lq.GetItems()
|
|
|
|
|
|
|
|
for it, val := range re {
|
|
|
|
fmt.Println(val)
|
|
|
|
fmt.Println(it)
|
|
|
|
}
|
|
|
|
}
|