ruma / homeserver

A Matrix homeserver written in Rust.
https://www.ruma.io/
1.08k stars 41 forks source link

Failures when asserting array elements in json response #140

Closed mujx closed 7 years ago

mujx commented 7 years ago

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.

farodin91 commented 7 years ago

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.

mujx commented 7 years ago

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

mujx commented 7 years ago

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

mujx commented 7 years ago

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

farodin91 commented 7 years ago

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