Skip to content

Error starting escalus story when user have offline messages #197

@pdorofiejczyk

Description

@pdorofiejczyk

I'm trying to test offline messages using escalus. When I'm trying to start escalus story for user who have offline messages, I'm getting following error:

     ** (ErlangError) Erlang error: {:assertion_failed, :assert, :is_presence, {:xmlel, "message", [{"xml:lang", "en"}, {"to", "[email protected]/res1"}, {"from", "[email protected]/res1"}], [{:xmlel, "archived", [{"by", "[email protected]"}, {"id", "8512ba7a-04fd-11e9-bc0e-69dacdbc2072"}, {"xmlns", "urn:xmpp:mam:tmp"}], []}, {:xmlel, "stanza-id", [{"by", "[email protected]"}, {"id", "8512ba7a-04fd-11e9-bc0e-69dacdbc2072"}, {"xmlns", "urn:xmpp:sid:0"}], []}, {:xmlel, "seq", [{"id", "2"}, {"xmlns", "urn:message:seq"}], []}, {:xmlel, "delay", [{"from", "example2.com"}, {"stamp", "2018-12-21T08:50:51.830393Z"}, {"xmlns", "urn:xmpp:delay"}], [xmlcdata: "Offline storage"]}, {:xmlel, "body", [], [xmlcdata: "offline message"]}]}, '<message xml:lang=\'en\' to=\'[email protected]/res1\' from=\'[email protected]/res1\'><archived by=\'[email protected]\' id=\'8512ba7a-04fd-11e9-bc0e-69dacdbc2072\' xmlns=\'urn:xmpp:mam:tmp\'/><stanza-id by=\'[email protected]\' id=\'8512ba7a-04fd-11e9-bc0e-69dacdbc2072\' xmlns=\'urn:xmpp:sid:0\'/><seq id=\'2\' xmlns=\'urn:message:seq\'/><delay from=\'example2.com\' stamp=\'2018-12-21T08:50:51.830393Z\' xmlns=\'urn:xmpp:delay\'>Offline storage</delay><body>offline message</body></message>'}

Short investigation shows that escalus story aways wait for presences after starting client (https://github.com/esl/escalus/blob/master/src/escalus_story.erl#L136) but this behaviour is not fully correct in my case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions