=== Test case: graphql_stanza_SUITE:get_last_messages_with/1 (click for source code)

=== Config value:

    [{schema_endpoint,admin},
     {listener_opts,[{password,<<"secret">>},
                     {schema_endpoint,<<"admin">>},
                     {username,<<"admin">>}]},
     {watchdog,<0.16587.0>},
     {mim_data_dir,"/home/circleci/project/big_tests/tests/graphql_stanza_SUITE_data"},
     {preset,"odbc_mssql_mnesia"},
     {tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@998557c7e1d1.2022-01-27_12.27.57/big_tests.tests.graphql_stanza_SUITE.logs/run.2022-01-27_12.30.43/graphql_stanza_suite.get_last_messages_with.21891.html"},
     {tc_group_properties,[{name,admin_stanza_category},parallel]},
     {tc_group_path,[]},
     {data_dir,"/home/circleci/project/big_tests/_build/default/lib/mongoose_tests/ebin/graphql_stanza_SUITE_data/"},
     {priv_dir,"/home/circleci/project/big_tests/ct_report/ct_run.test@998557c7e1d1.2022-01-27_12.27.57/big_tests.tests.graphql_stanza_SUITE.logs/run.2022-01-27_12.30.43/log_private/"},
     {{saved_modules,mongooseim@localhost,<<"test type">>},
      #{mod_adhoc => [],mod_amp => [],mod_bosh => [],
        mod_cache_users => [{number_of_segments,5},{time_to_live,2}],
        mod_carboncopy => [],mod_commands => [],
        mod_disco => [{users_can_see_hidden_services,false}],
        mod_muc_commands => [],mod_muc_light_commands => [],
        mod_register =>
            [{access,register},
             {ip_access,[{allow,"127.0.0.0/8"},{deny,"0.0.0.0/0"}]},
             {welcome_message,{[],[]}}],
        mod_roster => [{backend,rdbms}],
        mod_sic => [],mod_stream_management => [],
        mod_vcard => [{backend,rdbms},{host,{prefix,<<"vjud.">>}}]}}]

=== Current directory is "/home/circleci/project/big_tests/ct_report/ct_run.test@998557c7e1d1.2022-01-27_12.27.57"

=== Started at 2022-01-27 12:30:43


*** CT 2022-01-27 12:30:43.416 *** View log from node mongooseim@localhost when started mongooseim@localhost_875.html
*** CT 2022-01-27 12:30:43.417 *** View log from node ejabberd2@localhost when started ejabberd2@localhost_538.html

*** User 2022-01-27 12:30:43.565 ***
alicE_get_last_messages_with_711@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-01-27 12:30:43.565 ***
alicE_get_last_messages_with_711@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='618c49f10b8a159c' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-01-27 12:30:43.565 ***
alicE_get_last_messages_with_711@domain.example.com/res1 in
<stream:features>
	<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
	<compression xmlns='http://jabber.org/features/compress'>
		<method>zlib</method>
	</compression>
	<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
		<mechanism>SCRAM-SHA-256</mechanism>
		<mechanism>PLAIN</mechanism>
	</mechanisms>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2022-01-27 12:30:43.565 ***
alicE_get_last_messages_with_711@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX2dldF9sYXN0X21lc3NhZ2VzX3dpdGhfNzExAG1hdHlncnlzYQ==</auth>



*** User 2022-01-27 12:30:43.567 ***
alicE_get_last_messages_with_711@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-01-27 12:30:43.567 ***
alicE_get_last_messages_with_711@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-01-27 12:30:43.567 ***
alicE_get_last_messages_with_711@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='897045282004f2c3' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-01-27 12:30:43.568 ***
alicE_get_last_messages_with_711@domain.example.com/res1 in
<stream:features>
	<compression xmlns='http://jabber.org/features/compress'>
		<method>zlib</method>
	</compression>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2022-01-27 12:30:43.568 ***
alicE_get_last_messages_with_711@domain.example.com/res1 out
<iq type='set' id='08d54fb33a34393f7f6198242eddab70'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-01-27 12:30:43.569 ***
alicE_get_last_messages_with_711@domain.example.com/res1 in
<iq id='08d54fb33a34393f7f6198242eddab70' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alicE_get_last_messages_with_711@domain.example.com/res1</jid>
	</bind>
</iq>



*** User 2022-01-27 12:30:43.569 ***
alicE_get_last_messages_with_711@domain.example.com/res1 out
<iq type='set' id='0c1b880a92b5bcfb7cd586a23761e890'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 12:30:43.569 ***
alicE_get_last_messages_with_711@domain.example.com/res1 in
<iq type='result' id='0c1b880a92b5bcfb7cd586a23761e890'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 12:30:43.569 ***
alicE_get_last_messages_with_711@domain.example.com/res1 out
<presence/>



*** User 2022-01-27 12:30:43.572 ***
alicE_get_last_messages_with_711@domain.example.com/res1 in
<presence from='alicE_get_last_messages_with_711@domain.example.com/res1' to='alice_get_last_messages_with_711@domain.example.com/res1' xml:lang='en'/>



*** User 2022-01-27 12:30:43.573 ***
bOb_get_last_messages_with_711@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-01-27 12:30:43.573 ***
bOb_get_last_messages_with_711@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='364637a2f3cfc433' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-01-27 12:30:43.573 ***
bOb_get_last_messages_with_711@domain.example.com/res1 in
<stream:features>
	<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
	<compression xmlns='http://jabber.org/features/compress'>
		<method>zlib</method>
	</compression>
	<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
		<mechanism>SCRAM-SHA-256</mechanism>
		<mechanism>PLAIN</mechanism>
	</mechanisms>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2022-01-27 12:30:43.573 ***
bOb_get_last_messages_with_711@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9nZXRfbGFzdF9tZXNzYWdlc193aXRoXzcxMQBtYWtyb2xpa2E=</auth>



*** User 2022-01-27 12:30:43.579 ***
bOb_get_last_messages_with_711@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-01-27 12:30:43.579 ***
bOb_get_last_messages_with_711@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-01-27 12:30:43.580 ***
bOb_get_last_messages_with_711@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='00a394a4fed85425' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-01-27 12:30:43.580 ***
bOb_get_last_messages_with_711@domain.example.com/res1 in
<stream:features>
	<compression xmlns='http://jabber.org/features/compress'>
		<method>zlib</method>
	</compression>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2022-01-27 12:30:43.580 ***
bOb_get_last_messages_with_711@domain.example.com/res1 out
<iq type='set' id='c8a6a93b34e0e7288a8911b9e210246c'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-01-27 12:30:43.580 ***
bOb_get_last_messages_with_711@domain.example.com/res1 in
<iq id='c8a6a93b34e0e7288a8911b9e210246c' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bOb_get_last_messages_with_711@domain.example.com/res1</jid>
	</bind>
</iq>



*** User 2022-01-27 12:30:43.580 ***
bOb_get_last_messages_with_711@domain.example.com/res1 out
<iq type='set' id='45bd8d74542ebbbb5c38ff9d3ae526c6'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 12:30:43.581 ***
bOb_get_last_messages_with_711@domain.example.com/res1 in
<iq type='result' id='45bd8d74542ebbbb5c38ff9d3ae526c6'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 12:30:43.581 ***
bOb_get_last_messages_with_711@domain.example.com/res1 out
<presence/>



*** User 2022-01-27 12:30:43.594 ***
bOb_get_last_messages_with_711@domain.example.com/res1 in
<presence from='bOb_get_last_messages_with_711@domain.example.com/res1' to='bob_get_last_messages_with_711@domain.example.com/res1' xml:lang='en'/>



*** User 2022-01-27 12:30:43.595 ***
kate_get_last_messages_with_711@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-01-27 12:30:43.596 ***
kate_get_last_messages_with_711@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='706b39336dfe8f4d' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-01-27 12:30:43.596 ***
kate_get_last_messages_with_711@domain.example.com/res1 in
<stream:features>
	<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
	<compression xmlns='http://jabber.org/features/compress'>
		<method>zlib</method>
	</compression>
	<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
		<mechanism>SCRAM-SHA-256</mechanism>
		<mechanism>PLAIN</mechanism>
	</mechanisms>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2022-01-27 12:30:43.596 ***
kate_get_last_messages_with_711@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGthdGVfZ2V0X2xhc3RfbWVzc2FnZXNfd2l0aF83MTEAbWFrcm93ZTtw</auth>



*** User 2022-01-27 12:30:43.612 ***
kate_get_last_messages_with_711@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-01-27 12:30:43.612 ***
kate_get_last_messages_with_711@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-01-27 12:30:43.613 ***
kate_get_last_messages_with_711@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='3dba3aa4a9ee3c95' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-01-27 12:30:43.613 ***
kate_get_last_messages_with_711@domain.example.com/res1 in
<stream:features>
	<compression xmlns='http://jabber.org/features/compress'>
		<method>zlib</method>
	</compression>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2022-01-27 12:30:43.613 ***
kate_get_last_messages_with_711@domain.example.com/res1 out
<iq type='set' id='3212d0c9de3a3407e9c8b415c0957f51'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-01-27 12:30:43.613 ***
kate_get_last_messages_with_711@domain.example.com/res1 in
<iq id='3212d0c9de3a3407e9c8b415c0957f51' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>kate_get_last_messages_with_711@domain.example.com/res1</jid>
	</bind>
</iq>



*** User 2022-01-27 12:30:43.613 ***
kate_get_last_messages_with_711@domain.example.com/res1 out
<iq type='set' id='978276381042c9d0172d4adc00fbfaee'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 12:30:43.614 ***
kate_get_last_messages_with_711@domain.example.com/res1 in
<iq type='result' id='978276381042c9d0172d4adc00fbfaee'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 12:30:43.614 ***
kate_get_last_messages_with_711@domain.example.com/res1 out
<presence/>



*** User 2022-01-27 12:30:43.616 ***
kate_get_last_messages_with_711@domain.example.com/res1 in
<presence from='kate_get_last_messages_with_711@domain.example.com/res1' to='kate_get_last_messages_with_711@domain.example.com/res1' xml:lang='en'/>



*** User 2022-01-27 12:30:43.653 ***
REST request:
Code: 200
Req: {<0.16825.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"c802e465edf28cd7">>},
       {<<"authorization">>,<<"Basic YWRtaW46c2VjcmV0">>}],
      <<"{\"variables\":{\"to\":\"bOb_get_last_messages_with_711@domain.example.com\",\"from\":\"alicE_get_last_messages_with_711@domain.example.com/res1\",\"body\":\"Hi!\"},\"query\":\"mutation M1($from: JID!, $to: JID!, $body: String!) { stanza { sendMessage(from: $from, to: $to, body: $body) { id } } }\",\"operationName\":\"M1\"}">>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"vary">>,<<"accept">>},
          {<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 12:30:42 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"57">>}],
         <<"{\"data\":{\"stanza\":{\"sendMessage\":{\"id\":\"BLKFFIK3EIG1\"}}}}">>,
         195,34047}
Params: #{body =>
              <<"{\"variables\":{\"to\":\"bOb_get_last_messages_with_711@domain.example.com\",\"from\":\"alicE_get_last_messages_with_711@domain.example.com/res1\",\"body\":\"Hi!\"},\"query\":\"mutation M1($from: JID!, $to: JID!, $body: String!) { stanza { sendMessage(from: $from, to: $to, body: $body) { id } } }\",\"operationName\":\"M1\"}">>,
          creds => {<<"admin">>,<<"secret">>},
          method => <<"POST">>,path => <<"/api/graphql">>,port => 5551,
          return_headers => true,return_maps => true,
          role => {graphql,<<"admin">>},
          server => #{node => mongooseim@localhost}}


*** User 2022-01-27 12:30:45.731 ***
REST request:
Code: 200
Req: {<0.16849.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"ff0d0dd3e93af721">>},
       {<<"authorization">>,<<"Basic YWRtaW46c2VjcmV0">>}],
      <<"{\"variables\":{\"to\":\"alicE_get_last_messages_with_711@domain.example.com\",\"from\":\"kate_get_last_messages_with_711@domain.example.com/res1\",\"body\":\"Hi!\"},\"query\":\"mutation M1($from: JID!, $to: JID!, $body: String!) { stanza { sendMessage(from: $from, to: $to, body: $body) { id } } }\",\"operationName\":\"M1\"}">>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"vary">>,<<"accept">>},
          {<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 12:30:44 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"57">>}],
         <<"{\"data\":{\"stanza\":{\"sendMessage\":{\"id\":\"BLKFFJ442R01\"}}}}">>,
         195,12439}
Params: #{body =>
              <<"{\"variables\":{\"to\":\"alicE_get_last_messages_with_711@domain.example.com\",\"from\":\"kate_get_last_messages_with_711@domain.example.com/res1\",\"body\":\"Hi!\"},\"query\":\"mutation M1($from: JID!, $to: JID!, $body: String!) { stanza { sendMessage(from: $from, to: $to, body: $body) { id } } }\",\"operationName\":\"M1\"}">>,
          creds => {<<"admin">>,<<"secret">>},
          method => <<"POST">>,path => <<"/api/graphql">>,port => 5551,
          return_headers => true,return_maps => true,
          role => {graphql,<<"admin">>},
          server => #{node => mongooseim@localhost}}


*** User 2022-01-27 12:30:47.862 ***
REST request:
Code: 200
Req: {<0.16851.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"78033f50569d17e3">>},
       {<<"authorization">>,<<"Basic YWRtaW46c2VjcmV0">>}],
      <<"{\"variables\":{\"with\":\"bOb_get_last_messages_with_711@domain.example.com\",\"caller\":\"alicE_get_last_messages_with_711@domain.example.com/res1\"},\"query\":\"query Q1($caller: JID!, $with: JID, $limit: Int, $before: DateTime) { stanza { getLastMessages(caller: $caller, with: $with,  limit: $limit, before: $before) { stanzas { stanza_id stanza sender timestamp } limit } } }\",\"operationName\":\"Q1\"}">>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"vary">>,<<"accept">>},
          {<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 12:30:47 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"403">>}],
         <<"{\"data\":{\"stanza\":{\"getLastMessages\":{\"stanzas\":[{\"timestamp\":\"2022-01-27T12:30:43.619657Z\",\"stanza_id\":\"BLKFFIK3EI81\",\"stanza\":\"Hi!\",\"sender\":\"alice_get_last_messages_with_711@domain.example.com/res1\"}],\"limit\":50}}}}">>,
         542,78627}
Params: #{body =>
              <<"{\"variables\":{\"with\":\"bOb_get_last_messages_with_711@domain.example.com\",\"caller\":\"alicE_get_last_messages_with_711@domain.example.com/res1\"},\"query\":\"query Q1($caller: JID!, $with: JID, $limit: Int, $before: DateTime) { stanza { getLastMessages(caller: $caller, with: $with,  limit: $limit, before: $before) { stanzas { stanza_id stanza sender timestamp } limit } } }\",\"operationName\":\"Q1\"}">>,
          creds => {<<"admin">>,<<"secret">>},
          method => <<"POST">>,path => <<"/api/graphql">>,port => 5551,
          return_headers => true,return_maps => true,
          role => {graphql,<<"admin">>},
          server => #{node => mongooseim@localhost}}


*** User 2022-01-27 12:30:47.863 ***
kate_get_last_messages_with_711@domain.example.com/res1 out
</stream:stream>

*** User 2022-01-27 12:30:47.863 ***
kate_get_last_messages_with_711@domain.example.com/res1 in
</stream:stream>

*** User 2022-01-27 12:30:47.863 ***
bOb_get_last_messages_with_711@domain.example.com/res1 out
</stream:stream>

*** User 2022-01-27 12:30:47.863 ***
bOb_get_last_messages_with_711@domain.example.com/res1 in
</stream:stream>

*** User 2022-01-27 12:30:47.863 ***
alicE_get_last_messages_with_711@domain.example.com/res1 out
</stream:stream>

*** User 2022-01-27 12:30:47.864 ***
alicE_get_last_messages_with_711@domain.example.com/res1 in
</stream:stream>
*** CT 2022-01-27 12:30:47.875 *** View log from node ejabberd2@localhost when finished ejabberd2@localhost_538.html
*** CT 2022-01-27 12:30:47.902 *** View log from node mongooseim@localhost when finished mongooseim@localhost_886.html



=== Ended at 2022-01-27 12:30:47
=== successfully completed test case
=== === Returned value: ok