MCPcopy Create free account
hub / github.com/allegro/bigcache / TestGetEntryFromEmptyQueue

Function TestGetEntryFromEmptyQueue

queue/bytes_queue_test.go:372–386  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

370}
371
372func TestGetEntryFromEmptyQueue(t *testing.T) {
373 t.Parallel()
374
375 // given
376 queue := NewBytesQueue(13, 0, false)
377
378 // when
379 result, err := queue.Get(1)
380 err2 := queue.CheckGet(1)
381
382 // then
383 assertEqual(t, err, err2)
384 assertEqual(t, []byte(nil), result)
385 assertEqual(t, "Empty queue", err.Error())
386}
387
388func TestMaxSizeLimit(t *testing.T) {
389 t.Parallel()

Callers

nothing calls this directly

Calls 5

GetMethod · 0.95
CheckGetMethod · 0.95
NewBytesQueueFunction · 0.85
assertEqualFunction · 0.70
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…