default_stream_groups: Keep list of streams sorted by stream name.

Since the list of streams returned by a query which is not sorted
can vary, the tests which use it become flaky.
NormalActionsTest.test_default_stream_groups_events became
flaky due to this and hopefully sorting the streams should
fix it.
This commit is contained in:
Aman Agrawal 2021-03-25 08:37:47 +00:00
parent 947ce2b79d
commit 4d43a1baa9

View File

@ -2999,7 +2999,7 @@ class DefaultStreamGroup(models.Model):
name=self.name,
id=self.id,
description=self.description,
streams=[stream.to_dict() for stream in self.streams.all()],
streams=[stream.to_dict() for stream in self.streams.all().order_by("name")],
)