dashbitco / broadway_cloud_pub_sub

A Broadway producer for Google Cloud Pub/Sub
Apache License 2.0
70 stars 24 forks source link

Test for missing publishTime in message #74

Closed kianmeng closed 2 years ago

josevalim commented 2 years ago

:green_heart: :blue_heart: :purple_heart: :yellow_heart: :heart:

mcrumm commented 2 years ago

Hi @kianmeng, thanks for the PR! It is my understanding that messages will always have a non-nil publishTime value. Did you experience different behaviour?

kianmeng commented 2 years ago

@mcrumm The missing test case was due to this particular function, https://github.com/dashbitco/broadway_cloud_pub_sub/blob/main/lib/broadway_cloud_pub_sub/pull_client.ex#L130

  defp parse_datetime(nil), do: nil
mcrumm commented 2 years ago

Got it, thanks! :)