Port changes from 30rooms/70publicroomslist.pl to 50federation/40publicroomlist.pl to fix flaky test.
Port changes from 30rooms/70publicroomslist.pl to 50federation/40publicroomlist.pl to fix flaky test.

matrix-org/sytest,matrix-org/sytest