ruma / homeserver

A Matrix homeserver written in Rust.

Home Page:https://www.ruma.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failures when asserting array elements in json response

mujx opened this issue · comments

commented

I had some failures with sync::can_sync_a_room_with_a_single_message, here is particular.

The order of the elements in a json array is not guaranteed (I think is alphabetical) so we shouldn't use next to test the existence of the EventIds.

The Order of the array is important.
Possible we need to add a order to sql statement. I can lookup the spec later. This array represents the timeline.

commented

I added more events, and it works fine. Still can't figure out what caused the failures.

commented

I am closing this since I can't reproduce. It was probably an one time thing during development.

commented

I am re-opening because the travis build failed with this error.

I think my implementation of sync is incorrect. This need to be test more.