Skip to content

Commit 1f25195

Browse files
authored
test: log message.data for debugging (#126)
* test: log message.data for debugging Flaky test from #124 suggests that `message.data` might have been deformed somehow. Adding a logging for the data passed to help debug next time something goes wrong. * chore: update for lint * chore: update message formatting * chore: remove extra print * chore: making lint happy
1 parent 6a3b706 commit 1f25195

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

securitycenter/snippets/snippets_notification_receiver.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ def receive_notifications(project_id, subscription_name):
2929
# TODO: subscription_name = "your-subscription-name"
3030

3131
def callback(message):
32-
print("Received message")
32+
33+
# Print the data received for debugging purpose if needed
34+
print(f"Received message: {message.data}")
3335

3436
notification_msg = NotificationMessage.from_json(message.data)
3537

0 commit comments

Comments
 (0)