Skip to content

A platform for community discussion. Free, open, simple.

FIX: flaky post_alerter_spec.rb because of missing order (#10000)

Krzysztof Kotlarekf993d8a197f4
diff --git a/app/services/post_alerter.rb b/app/services/post_alerter.rb
index 79d8b7e71ba..24d8b48265e 100644
--- a/app/services/post_alerter.rb
+++ b/app/services/post_alerter.rb
@@ -463,6 +463,7 @@ class PostAlerter
.where("push_url IS NOT NULL AND push_url <> ''")
.where("position(push_url IN ?) > 0", SiteSetting.allowed_user_api_push_urls)
.where("revoked_at IS NULL")
+ .order(client_id: :asc)
.pluck(:client_id, :push_url)
if clients.length > 0