File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,11 @@ func (f *FakeSubscriptionWriter) Complete() {
51
51
f .messageCountOnComplete = len (f .writtenMessages )
52
52
}
53
53
54
+ // Heartbeat writes directly to the writtenMessages slice, as the real implementations implicitly flush
54
55
func (f * FakeSubscriptionWriter ) Heartbeat () error {
56
+ f .mu .Lock ()
57
+ defer f .mu .Unlock ()
58
+ f .writtenMessages = append (f .writtenMessages , string ("heartbeat" ))
55
59
return nil
56
60
}
57
61
Original file line number Diff line number Diff line change @@ -4778,6 +4778,9 @@ func (s *SubscriptionRecorder) Complete() {
4778
4778
}
4779
4779
4780
4780
func (s * SubscriptionRecorder ) Heartbeat () error {
4781
+ s .mux .Lock ()
4782
+ defer s .mux .Unlock ()
4783
+ s .messages = append (s .messages , "heartbeat" )
4781
4784
return nil
4782
4785
}
4783
4786
You can’t perform that action at this time.
0 commit comments