File tree 2 files changed +6
-0
lines changed
2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change 143
143
allow ( offset_manager ) . to receive ( :set_default_offset )
144
144
allow ( offset_manager ) . to receive ( :mark_as_processed )
145
145
allow ( offset_manager ) . to receive ( :next_offset_for ) { 42 }
146
+ allow ( offset_manager ) . to receive ( :clear_offsets )
146
147
147
148
allow ( group ) . to receive ( :subscribe )
148
149
allow ( group ) . to receive ( :group_id )
151
152
allow ( group ) . to receive ( :subscribed_partitions ) { assigned_partitions }
152
153
allow ( group ) . to receive ( :assigned_to? ) { false }
153
154
allow ( group ) . to receive ( :assigned_to? ) . with ( 'greetings' , 0 ) { true }
155
+ allow ( group ) . to receive ( :generation_id ) { 1 }
156
+ allow ( group ) . to receive ( :join )
157
+ allow ( group ) . to receive ( :assigned_partitions ) { [ ] }
154
158
155
159
allow ( heartbeat ) . to receive ( :trigger )
156
160
157
161
allow ( fetcher ) . to receive ( :data? ) { fetched_batches . any? }
158
162
allow ( fetcher ) . to receive ( :poll ) { [ :batches , fetched_batches ] }
163
+ allow ( fetcher ) . to receive ( :reset )
159
164
160
165
consumer . subscribe ( "greetings" )
161
166
end
Original file line number Diff line number Diff line change 145
145
end
146
146
thread . abort_on_exception = true
147
147
148
+ sleep 2
148
149
messages_b . each { |i | producer . produce ( i . to_s , topic : topic_b ) }
149
150
producer . deliver_messages
150
151
You can’t perform that action at this time.
0 commit comments