test code push
This commit is contained in:
parent
5dfe829b88
commit
50f80fb220
2
queue.go
2
queue.go
|
@ -97,7 +97,7 @@ func (lq *LoafleQueue) Close() {
|
||||||
observer.Remove(lq.queueType, lq.eventChanel)
|
observer.Remove(lq.queueType, lq.eventChanel)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
func NewLoafleQueue(eventType EventType, interval time.Duration) *LoafleQueue {
|
func NewQueue(eventType EventType, interval time.Duration) *LoafleQueue {
|
||||||
items := make([]*item, 0)
|
items := make([]*item, 0)
|
||||||
event := make(chan interface{}, 0)
|
event := make(chan interface{}, 0)
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,8 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestNewLoafleQueue(t *testing.T) {
|
func TestNewQueue(t *testing.T) {
|
||||||
lq := NewLoafleQueue(EVENT_TYPE, 5)
|
lq := NewQueue(EVENT_TYPE, 5)
|
||||||
typeEvent := lq.StringType(EVENT_TYPE)
|
typeEvent := lq.StringType(EVENT_TYPE)
|
||||||
|
|
||||||
observer.Notify(typeEvent, "data")
|
observer.Notify(typeEvent, "data")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user