@@ -169,21 +169,18 @@ def test_feedback_with_attachment_in_same_envelope(
169
169
mini_sentry .add_basic_project_config (
170
170
42 , extra = {"config" : {"features" : ["organizations:user-feedback-ingest" ]}}
171
171
)
172
- mini_sentry .set_global_config_option (
173
- "feedback.ingest-topic.rollout-rate" , 1.0 if use_feedback_topic else 0.0
174
- )
175
172
# Test will only pass with this option set
176
173
mini_sentry .set_global_config_option ("feedback.ingest-inline-attachments" , True )
177
174
178
175
if use_feedback_topic :
179
176
mini_sentry .set_global_config_option ("feedback.ingest-topic.rollout-rate" , 1.0 )
180
- feedback_consumer_ = feedback_consumer (timeout = 20 )
181
177
other_consumer = events_consumer (timeout = 20 )
178
+ feedback_consumer = feedback_consumer (timeout = 20 )
182
179
else :
183
180
mini_sentry .set_global_config_option ("feedback.ingest-topic.rollout-rate" , 0.0 )
184
- feedback_consumer_ = events_consumer (timeout = 20 )
185
181
other_consumer = feedback_consumer (timeout = 20 )
186
- attachments_consumer_ = attachments_consumer (timeout = 20 )
182
+ feedback_consumer = events_consumer (timeout = 20 )
183
+ attachments_consumer = attachments_consumer (timeout = 20 )
187
184
188
185
feedback = generate_feedback_sdk_event ()
189
186
event_id = feedback ["event_id" ]
@@ -213,14 +210,14 @@ def test_feedback_with_attachment_in_same_envelope(
213
210
# attachment data (relaxed version of test_attachments.py)
214
211
received_contents = {} # attachment id -> bytes
215
212
while set (received_contents .values ()) != {attachment_contents }:
216
- chunk , v = attachments_consumer_ .get_attachment_chunk ()
213
+ chunk , v = attachments_consumer .get_attachment_chunk ()
217
214
received_contents [v ["id" ]] = received_contents .get (v ["id" ], b"" ) + chunk
218
215
assert v ["event_id" ] == event_id
219
216
assert v ["project_id" ] == project_id
220
217
assert len (received_contents ) == 1
221
218
222
219
# attachment headers
223
- attachment_event = attachments_consumer_ .get_individual_attachment ()
220
+ attachment_event = attachments_consumer .get_individual_attachment ()
224
221
assert attachment_event ["event_id" ] == event_id
225
222
assert attachment_event ["project_id" ] == project_id
226
223
attachment = attachment_event ["attachment" ]
@@ -229,7 +226,7 @@ def test_feedback_with_attachment_in_same_envelope(
229
226
assert attachment ["size" ] == attachment_headers ["length" ]
230
227
231
228
# feedback event sent to correct topic
232
- event , message = feedback_consumer_ .get_event ()
229
+ event , message = feedback_consumer .get_event ()
233
230
assert event ["type" ] == "feedback"
234
231
235
232
parsed_feedback = json .loads (message ["payload" ])
@@ -240,4 +237,4 @@ def test_feedback_with_attachment_in_same_envelope(
240
237
other_consumer .assert_empty ()
241
238
242
239
# test message wasn't sent to attachments topic
243
- attachments_consumer_ .assert_empty ()
240
+ attachments_consumer .assert_empty ()
0 commit comments