Skip to content

Commit

Permalink
deepsource
Browse files Browse the repository at this point in the history
  • Loading branch information
kasey committed Oct 4, 2024
1 parent 81504c8 commit 7dcdaca
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
2 changes: 1 addition & 1 deletion beacon-chain/blockchain/testing/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func (w *EventFeedWrapper) Send(value interface{}) int {
return w.feed.Send(value)
}

// WAitForSubscription allows test to wait for the feed to have a subscription before beginning to send events.
// WaitForSubscription allows test to wait for the feed to have a subscription before beginning to send events.
func (w *EventFeedWrapper) WaitForSubscription(ctx context.Context) error {
select {
case <-w.subscribed:
Expand Down
15 changes: 0 additions & 15 deletions beacon-chain/rpc/eth/events/events_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,6 @@ import (
sse "github.com/r3labs/sse/v2"
)

type flushableResponseRecorder struct {
*httptest.ResponseRecorder
flushed bool
}

func (f *flushableResponseRecorder) Flush() {
f.flushed = true
}

func NewFlushabaleResponseRecorder() *flushableResponseRecorder {
return &flushableResponseRecorder{
ResponseRecorder: httptest.NewRecorder(),
}
}

func requireAllEventsReceived(t *testing.T, stn, opn *mockChain.EventFeedWrapper, events []*feed.Event, req *topicRequest, s *Server, w *StreamingResponseWriterRecorder) {
// maxBufferSize param copied from sse lib client code
sseR := sse.NewEventStreamReader(w.Body(), 1<<24)
Expand Down

0 comments on commit 7dcdaca

Please sign in to comment.