Skip to content

Commit 278e918

Browse files
authored
buffer the logSource channel (#203)
1 parent 500d0d5 commit 278e918

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

logger_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1274,8 +1274,8 @@ func newFakeAgentAPI(t *testing.T) *fakeAgentAPI {
12741274
mux := drpcmux.New()
12751275
fakeAPI := &fakeAgentAPI{
12761276
disconnect: make(chan struct{}),
1277-
logs: make(chan []*proto.Log),
1278-
logSource: make(chan agentsdk.PostLogSourceRequest),
1277+
logs: make(chan []*proto.Log, 32),
1278+
logSource: make(chan agentsdk.PostLogSourceRequest, 32),
12791279
}
12801280
err := proto.DRPCRegisterAgent(mux, fakeAPI)
12811281
require.NoError(t, err)
@@ -1340,8 +1340,8 @@ func newFakeAgentAPI(t *testing.T) *fakeAgentAPI {
13401340
func newFailingAgentAPI(t *testing.T) *fakeAgentAPI {
13411341
fakeAPI := &fakeAgentAPI{
13421342
disconnect: make(chan struct{}),
1343-
logs: make(chan []*proto.Log),
1344-
logSource: make(chan agentsdk.PostLogSourceRequest),
1343+
logs: make(chan []*proto.Log, 32),
1344+
logSource: make(chan agentsdk.PostLogSourceRequest, 32),
13451345
}
13461346

13471347
// Create a server that always returns 401 Unauthorized errors

0 commit comments

Comments
 (0)