=== Test case: rest_SUITE:messages_can_be_paginated/1 (click for source code)

=== Config value:

    [{watchdog,<0.7719.2>},
     {{ejabberd_cwd,mongooseim@localhost},
      "/home/circleci/project/_build/mim1/rel/mongooseim"},
     {mam_backend,rdbms},
     {mim_data_dir,"/home/circleci/project/big_tests/tests/rest_SUITE_data"},
     {preset,"odbc_mssql_mnesia"},
     {tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@ebe8a8f9fc53.2022-01-25_16.21.59/big_tests.tests.rest_SUITE.logs/run.2022-01-25_16.34.19/rest_suite.messages_can_be_paginated.38533.html"},
     {tc_group_properties,[{name,admin},parallel]},
     {tc_group_path,[]},
     {data_dir,"/home/circleci/project/big_tests/_build/default/lib/mongoose_tests/ebin/rest_SUITE_data/"},
     {priv_dir,"/home/circleci/project/big_tests/ct_report/ct_run.test@ebe8a8f9fc53.2022-01-25_16.21.59/big_tests.tests.rest_SUITE.logs/run.2022-01-25_16.34.19/log_private/"},
     {escalus_users,[{alice,[{username,<<"alicE">>},
                             {server,<<"localhost">>},
                             {password,<<"matygrysa">>}]},
                     {bob,[{username,<<"bOb">>},
                           {server,<<"localhost">>},
                           {password,<<"makrolika">>}]}]}]

=== Current directory is "/home/circleci/project/big_tests/ct_report/ct_run.test@ebe8a8f9fc53.2022-01-25_16.21.59"

=== Started at 2022-01-25 16:34:20


*** CT 2022-01-25 16:34:20.056 *** View log from node mongooseim@localhost when started mongooseim@localhost_5708.html
*** CT 2022-01-25 16:34:20.057 *** View log from node ejabberd2@localhost when started ejabberd2@localhost_2377.html

*** User 2022-01-25 16:34:20.079 ***
alicE_messages_can_be_paginated_2210@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-01-25 16:34:20.080 ***
alicE_messages_can_be_paginated_2210@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='0d72c703c8351acb' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-01-25 16:34:20.080 ***
alicE_messages_can_be_paginated_2210@localhost/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-25 16:34:20.080 ***
alicE_messages_can_be_paginated_2210@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX21lc3NhZ2VzX2Nhbl9iZV9wYWdpbmF0ZWRfMjIxMABtYXR5Z3J5c2E=</auth>



*** User 2022-01-25 16:34:20.082 ***
alicE_messages_can_be_paginated_2210@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-01-25 16:34:20.082 ***
alicE_messages_can_be_paginated_2210@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-01-25 16:34:20.082 ***
alicE_messages_can_be_paginated_2210@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='270a0543760960d7' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-01-25 16:34:20.082 ***
alicE_messages_can_be_paginated_2210@localhost/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-25 16:34:20.082 ***
alicE_messages_can_be_paginated_2210@localhost/res1 out
<iq type='set' id='cccd8128fb9095d24f29c8fce706865f'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-01-25 16:34:20.082 ***
alicE_messages_can_be_paginated_2210@localhost/res1 in
<iq id='cccd8128fb9095d24f29c8fce706865f' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alicE_messages_can_be_paginated_2210@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-01-25 16:34:20.083 ***
alicE_messages_can_be_paginated_2210@localhost/res1 out
<iq type='set' id='6fd936d3f424555d9eae87a8a353f337'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-25 16:34:20.083 ***
alicE_messages_can_be_paginated_2210@localhost/res1 in
<iq type='result' id='6fd936d3f424555d9eae87a8a353f337'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-25 16:34:20.083 ***
alicE_messages_can_be_paginated_2210@localhost/res1 out
<presence/>



*** User 2022-01-25 16:34:20.087 ***
alicE_messages_can_be_paginated_2210@localhost/res1 in
<presence from='alicE_messages_can_be_paginated_2210@localhost/res1' to='alice_messages_can_be_paginated_2210@localhost/res1' xml:lang='en'/>



*** User 2022-01-25 16:34:20.088 ***
bOb_messages_can_be_paginated_2210@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-01-25 16:34:20.088 ***
bOb_messages_can_be_paginated_2210@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='77496ced2d7172e8' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-01-25 16:34:20.088 ***
bOb_messages_can_be_paginated_2210@localhost/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-25 16:34:20.088 ***
bOb_messages_can_be_paginated_2210@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9tZXNzYWdlc19jYW5fYmVfcGFnaW5hdGVkXzIyMTAAbWFrcm9saWth</auth>



*** User 2022-01-25 16:34:20.130 ***
bOb_messages_can_be_paginated_2210@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-01-25 16:34:20.131 ***
bOb_messages_can_be_paginated_2210@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-01-25 16:34:20.131 ***
bOb_messages_can_be_paginated_2210@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='1b0640373d5e52a7' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-01-25 16:34:20.131 ***
bOb_messages_can_be_paginated_2210@localhost/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-25 16:34:20.131 ***
bOb_messages_can_be_paginated_2210@localhost/res1 out
<iq type='set' id='e296f4ce949b7edb897be0c23bfa5c1e'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-01-25 16:34:20.131 ***
bOb_messages_can_be_paginated_2210@localhost/res1 in
<iq id='e296f4ce949b7edb897be0c23bfa5c1e' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bOb_messages_can_be_paginated_2210@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-01-25 16:34:20.131 ***
bOb_messages_can_be_paginated_2210@localhost/res1 out
<iq type='set' id='7b9953935c43003bb9c2d8f2fab05952'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-25 16:34:20.132 ***
bOb_messages_can_be_paginated_2210@localhost/res1 in
<iq type='result' id='7b9953935c43003bb9c2d8f2fab05952'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-25 16:34:20.132 ***
bOb_messages_can_be_paginated_2210@localhost/res1 out
<presence/>



*** User 2022-01-25 16:34:20.138 ***
bOb_messages_can_be_paginated_2210@localhost/res1 in
<presence from='bOb_messages_can_be_paginated_2210@localhost/res1' to='bob_messages_can_be_paginated_2210@localhost/res1' xml:lang='en'/>


Could not find element wait_for_parallel_writer in Config.

Could not find element archive_wait in Config.


*** User 2022-01-25 16:34:20.257 ***
REST request:
Code: 200
Req: {<0.8016.2>,
      <<"/api/messages/alice_messages_can_be_paginated_2210@localhost/bob_messages_can_be_paginated_2210@localhost?limit=10">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"d662c1a02f4573f8">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Tue, 25 Jan 2022 16:34:19 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"655">>}],
         <<"[{\"timestamp\":1642845600,\"sender\":\"alice_messages_can_be_paginated_2210@localhost\",\"message_id\":\"\",\"body\":\"A\"},{\"timestamp\":1642845600,\"sender\":\"bob_messages_can_be_paginated_2210@localhost\",\"message_id\":\"\",\"body\":\"A\"},{\"timestamp\":1642932000,\"sender\":\"alice_messages_can_be_paginated_2210@localhost\",\"message_id\":\"\",\"body\":\"B\"},{\"timestamp\":1642932000,\"sender\":\"bob_messages_can_be_paginated_2210@localhost\",\"message_id\":\"\",\"body\":\"B\"},{\"timestamp\":1643018400,\"sender\":\"alice_messages_can_be_paginated_2210@localhost\",\"message_id\":\"\",\"body\":\"C\"},{\"timestamp\":1643018400,\"sender\":\"bob_messages_can_be_paginated_2210@localhost\",\"message_id\":\"\",\"body\":\"C\"}]">>,
         780,3260}
Params: #{body => <<>>,method => <<"GET">>,
          path =>
              <<"/api/messages/alice_messages_can_be_paginated_2210@localhost/bob_messages_can_be_paginated_2210@localhost?limit=10">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-01-25 16:34:20.260 ***
REST request:
Code: 200
Req: {<0.8021.2>,
      <<"/api/messages/alice_messages_can_be_paginated_2210@localhost/bob_messages_can_be_paginated_2210@localhost?limit=3">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"4707c35dac9054f7">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Tue, 25 Jan 2022 16:34:19 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"327">>}],
         <<"[{\"timestamp\":1642932000,\"sender\":\"bob_messages_can_be_paginated_2210@localhost\",\"message_id\":\"\",\"body\":\"B\"},{\"timestamp\":1643018400,\"sender\":\"alice_messages_can_be_paginated_2210@localhost\",\"message_id\":\"\",\"body\":\"C\"},{\"timestamp\":1643018400,\"sender\":\"bob_messages_can_be_paginated_2210@localhost\",\"message_id\":\"\",\"body\":\"C\"}]">>,
         452,2283}
Params: #{body => <<>>,method => <<"GET">>,
          path =>
              <<"/api/messages/alice_messages_can_be_paginated_2210@localhost/bob_messages_can_be_paginated_2210@localhost?limit=3">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-01-25 16:34:20.267 ***
REST request:
Code: 200
Req: {<0.8026.2>,
      <<"/api/messages/alice_messages_can_be_paginated_2210@localhost/bob_messages_can_be_paginated_2210@localhost?before=1642982401&limit=10">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"0e5ff29a322ead6f">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Tue, 25 Jan 2022 16:34:19 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"437">>}],
         <<"[{\"timestamp\":1642845600,\"sender\":\"alice_messages_can_be_paginated_2210@localhost\",\"message_id\":\"\",\"body\":\"A\"},{\"timestamp\":1642845600,\"sender\":\"bob_messages_can_be_paginated_2210@localhost\",\"message_id\":\"\",\"body\":\"A\"},{\"timestamp\":1642932000,\"sender\":\"alice_messages_can_be_paginated_2210@localhost\",\"message_id\":\"\",\"body\":\"B\"},{\"timestamp\":1642932000,\"sender\":\"bob_messages_can_be_paginated_2210@localhost\",\"message_id\":\"\",\"body\":\"B\"}]">>,
         562,5540}
Params: #{body => <<>>,method => <<"GET">>,
          path =>
              <<"/api/messages/alice_messages_can_be_paginated_2210@localhost/bob_messages_can_be_paginated_2210@localhost?before=1642982401&limit=10">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-01-25 16:34:20.270 ***
REST request:
Code: 200
Req: {<0.8028.2>,
      <<"/api/messages/alice_messages_can_be_paginated_2210@localhost/bob_messages_can_be_paginated_2210@localhost?before=1642982401&limit=2">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"3049dc6908ef12bf">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Tue, 25 Jan 2022 16:34:19 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"219">>}],
         <<"[{\"timestamp\":1642932000,\"sender\":\"alice_messages_can_be_paginated_2210@localhost\",\"message_id\":\"\",\"body\":\"B\"},{\"timestamp\":1642932000,\"sender\":\"bob_messages_can_be_paginated_2210@localhost\",\"message_id\":\"\",\"body\":\"B\"}]">>,
         344,2409}
Params: #{body => <<>>,method => <<"GET">>,
          path =>
              <<"/api/messages/alice_messages_can_be_paginated_2210@localhost/bob_messages_can_be_paginated_2210@localhost?before=1642982401&limit=2">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-01-25 16:34:20.270 ***
bOb_messages_can_be_paginated_2210@localhost/res1 out
</stream:stream>

*** User 2022-01-25 16:34:20.271 ***
bOb_messages_can_be_paginated_2210@localhost/res1 in
</stream:stream>

*** User 2022-01-25 16:34:20.271 ***
alicE_messages_can_be_paginated_2210@localhost/res1 out
</stream:stream>

*** User 2022-01-25 16:34:20.271 ***
alicE_messages_can_be_paginated_2210@localhost/res1 in
</stream:stream>
*** CT 2022-01-25 16:34:20.273 *** View log from node ejabberd2@localhost when finished ejabberd2@localhost_2377.html
*** CT 2022-01-25 16:34:20.274 *** View log from node mongooseim@localhost when finished mongooseim@localhost_5730.html



=== Ended at 2022-01-25 16:34:20
=== successfully completed test case
=== === Returned value: ok