1
0
mirror of https://github.com/NUTtech/bell.git synced 2024-11-24 08:12:15 +02:00

issue-14: change queueSize type to uint

This commit is contained in:
lowit 2022-04-28 15:37:51 +03:00 committed by lowitea
parent 49ae09c397
commit 618cf47420
2 changed files with 4 additions and 4 deletions

View File

@ -24,7 +24,7 @@ type Events struct {
sync.RWMutex
channels map[string][]chan Message
wg sync.WaitGroup
queueSize int
queueSize uint
}
// New constructor for Events
@ -33,7 +33,7 @@ func New() *Events {
}
// Queue set events queue size
func (e *Events) Queue(size int) *Events {
func (e *Events) Queue(size uint) *Events {
e.Lock()
defer e.Unlock()
@ -180,6 +180,6 @@ func Wait() {
}
// Queue set events queue size
func Queue(size int) {
func Queue(size uint) {
globalState.Queue(size)
}

View File

@ -124,7 +124,7 @@ func TestWait(t *testing.T) {
// TestQueue checking function for set queue size
func TestQueue(t *testing.T) {
size := 6
var size uint = 6
Queue(size)
assert.Equal(t, size, globalState.queueSize)
}