Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions errors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,8 @@ func TestErrorFromContext(t *testing.T) {
func TestContextStorage(t *testing.T) {
// Test smallContext for first 4 items.
t.Run("stores first 4 items in smallContext", func(t *testing.T) {
Configure(Config{DisablePooling: true})

err := New("test")

err.With("a", 1)
Expand All @@ -839,6 +841,8 @@ func TestContextStorage(t *testing.T) {

// Test expansion to map on 5th item.
t.Run("switches to map on 5th item", func(t *testing.T) {
Configure(Config{DisablePooling: true})

err := New("test")

err.With("a", 1)
Expand Down Expand Up @@ -883,6 +887,8 @@ func TestContextStorage(t *testing.T) {

// Test concurrent access safety.
t.Run("concurrent access", func(t *testing.T) {
Configure(Config{DisablePooling: true})

err := New("test")
var wg sync.WaitGroup
wg.Add(2)
Expand Down
Loading