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

=== Config value:

    [{watchdog,<0.9268.2>},
     {muc_light_host,<<"muclight.localhost">>},
     {mam_backend,rdbms},
     {mim_data_dir,"/home/circleci/project/big_tests/tests/rest_client_SUITE_data"},
     {preset,"odbc_mssql_mnesia"},
     {tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@43a5deef6262.2022-01-27_15.25.11/big_tests.tests.rest_client_SUITE.logs/run.2022-01-27_15.37.00/rest_client_suite.messages_can_be_paginated.121091.html"},
     {tc_group_properties,[{name,messages},{repeat_until_all_ok,3},parallel]},
     {tc_group_path,[]},
     {data_dir,"/home/circleci/project/big_tests/_build/default/lib/mongoose_tests/ebin/rest_client_SUITE_data/"},
     {priv_dir,"/home/circleci/project/big_tests/ct_report/ct_run.test@43a5deef6262.2022-01-27_15.25.11/big_tests.tests.rest_client_SUITE.logs/run.2022-01-27_15.37.00/log_private/"},
     {{saved_modules,mongooseim@localhost,<<"localhost">>},
      #{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@43a5deef6262.2022-01-27_15.25.11"

=== Started at 2022-01-27 15:37:00


*** CT 2022-01-27 15:37:00.692 *** View log from node mongooseim@localhost when started mongooseim@localhost_5806.html
*** CT 2022-01-27 15:37:00.693 *** View log from node ejabberd2@localhost when started ejabberd2@localhost_2385.html

*** User 2022-01-27 15:37:00.716 ***
alicE_messages_can_be_paginated_2154@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-27 15:37:00.716 ***
alicE_messages_can_be_paginated_2154@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='2c9e6c4422bab780' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-01-27 15:37:00.716 ***
alicE_messages_can_be_paginated_2154@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-27 15:37:00.716 ***
alicE_messages_can_be_paginated_2154@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX21lc3NhZ2VzX2Nhbl9iZV9wYWdpbmF0ZWRfMjE1NABtYXR5Z3J5c2E=</auth>



*** User 2022-01-27 15:37:00.717 ***
alicE_messages_can_be_paginated_2154@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-01-27 15:37:00.717 ***
alicE_messages_can_be_paginated_2154@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-27 15:37:00.718 ***
alicE_messages_can_be_paginated_2154@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='9a5ceb794b0552dd' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-01-27 15:37:00.718 ***
alicE_messages_can_be_paginated_2154@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-27 15:37:00.718 ***
alicE_messages_can_be_paginated_2154@localhost/res1 out
<iq type='set' id='b19ec9faa0740c427e38910f03c46a4a'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-01-27 15:37:00.718 ***
alicE_messages_can_be_paginated_2154@localhost/res1 in
<iq id='b19ec9faa0740c427e38910f03c46a4a' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alicE_messages_can_be_paginated_2154@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-01-27 15:37:00.718 ***
alicE_messages_can_be_paginated_2154@localhost/res1 out
<iq type='set' id='2a3aa07ac7d7a7ddd328f8ac46a95226'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 15:37:00.719 ***
alicE_messages_can_be_paginated_2154@localhost/res1 in
<iq type='result' id='2a3aa07ac7d7a7ddd328f8ac46a95226'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 15:37:00.719 ***
alicE_messages_can_be_paginated_2154@localhost/res1 out
<presence/>



*** User 2022-01-27 15:37:00.721 ***
alicE_messages_can_be_paginated_2154@localhost/res1 in
<presence from='alicE_messages_can_be_paginated_2154@localhost/res1' to='alice_messages_can_be_paginated_2154@localhost/res1' xml:lang='en'/>



*** User 2022-01-27 15:37:00.722 ***
bOb_messages_can_be_paginated_2154@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-27 15:37:00.722 ***
bOb_messages_can_be_paginated_2154@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='9036e0c2838cb404' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-01-27 15:37:00.722 ***
bOb_messages_can_be_paginated_2154@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-27 15:37:00.722 ***
bOb_messages_can_be_paginated_2154@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9tZXNzYWdlc19jYW5fYmVfcGFnaW5hdGVkXzIxNTQAbWFrcm9saWth</auth>



*** User 2022-01-27 15:37:00.723 ***
bOb_messages_can_be_paginated_2154@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-01-27 15:37:00.723 ***
bOb_messages_can_be_paginated_2154@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-27 15:37:00.724 ***
bOb_messages_can_be_paginated_2154@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='b1cc1ecd2db3154f' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-01-27 15:37:00.724 ***
bOb_messages_can_be_paginated_2154@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-27 15:37:00.724 ***
bOb_messages_can_be_paginated_2154@localhost/res1 out
<iq type='set' id='5fb87ba88402211ca9474729155de0e1'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-01-27 15:37:00.724 ***
bOb_messages_can_be_paginated_2154@localhost/res1 in
<iq id='5fb87ba88402211ca9474729155de0e1' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bOb_messages_can_be_paginated_2154@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-01-27 15:37:00.724 ***
bOb_messages_can_be_paginated_2154@localhost/res1 out
<iq type='set' id='ad4f45eb2e3f451b9a0d5bc3bbb2196e'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 15:37:00.727 ***
bOb_messages_can_be_paginated_2154@localhost/res1 in
<iq type='result' id='ad4f45eb2e3f451b9a0d5bc3bbb2196e'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 15:37:00.730 ***
bOb_messages_can_be_paginated_2154@localhost/res1 out
<presence/>



*** User 2022-01-27 15:37:00.732 ***
bOb_messages_can_be_paginated_2154@localhost/res1 in
<presence from='bOb_messages_can_be_paginated_2154@localhost/res1' to='bob_messages_can_be_paginated_2154@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-27 15:37:00.906 ***
REST request:
Code: 200
Req: {<0.9390.2>,
      <<"/api/messages/bob_messages_can_be_paginated_2154@localhost?limit=10">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"e3b684dc243a8f88">>},
       {<<"authorization">>,
        <<"Basic YWxpY2VfbWVzc2FnZXNfY2FuX2JlX3BhZ2luYXRlZF8yMTU0QGxvY2FsaG9zdDptYXR5Z3J5c2E=">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 15:37:00 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"769">>}],
         <<"[{\"to\":\"bOb_messages_can_be_paginated_2154@localhost\",\"timestamp\":1643018400000,\"id\":\"undefined\",\"from\":\"undefined\",\"body\":\"A\"},{\"to\":\"alicE_messages_can_be_paginated_2154@localhost\",\"timestamp\":1643018400000,\"id\":\"undefined\",\"from\":\"undefined\",\"body\":\"A\"},{\"to\":\"bOb_messages_can_be_paginated_2154@localhost\",\"timestamp\":1643104800000,\"id\":\"undefined\",\"from\":\"undefined\",\"body\":\"B\"},{\"to\":\"alicE_messages_can_be_paginated_2154@localhost\",\"timestamp\":1643104800000,\"id\":\"undefined\",\"from\":\"undefined\",\"body\":\"B\"},{\"to\":\"bOb_messages_can_be_paginated_2154@localhost\",\"timestamp\":1643191200000,\"id\":\"undefined\",\"from\":\"undefined\",\"body\":\"C\"},{\"to\":\"alicE_messages_can_be_paginated_2154@localhost\",\"timestamp\":1643191200000,\"id\":\"undefined\",\"from\":\"undefined\",\"body\":\"C\"}]">>,
         894,4304}
Params: #{body => <<>>,
          creds =>
              {<<"alice_messages_can_be_paginated_2154@localhost">>,
               <<"matygrysa">>},
          method => <<"GET">>,
          path =>
              <<"/api/messages/bob_messages_can_be_paginated_2154@localhost?limit=10">>,
          return_headers => true,role => client,
          server => #{node => mongooseim@localhost}}


*** User 2022-01-27 15:37:00.923 ***
REST request:
Code: 200
Req: {<0.9395.2>,
      <<"/api/messages/bob_messages_can_be_paginated_2154@localhost?limit=3">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"faccfe916b173a65">>},
       {<<"authorization">>,
        <<"Basic YWxpY2VfbWVzc2FnZXNfY2FuX2JlX3BhZ2luYXRlZF8yMTU0QGxvY2FsaG9zdDptYXR5Z3J5c2E=">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 15:37:00 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"386">>}],
         <<"[{\"to\":\"alicE_messages_can_be_paginated_2154@localhost\",\"timestamp\":1643104800000,\"id\":\"undefined\",\"from\":\"undefined\",\"body\":\"B\"},{\"to\":\"bOb_messages_can_be_paginated_2154@localhost\",\"timestamp\":1643191200000,\"id\":\"undefined\",\"from\":\"undefined\",\"body\":\"C\"},{\"to\":\"alicE_messages_can_be_paginated_2154@localhost\",\"timestamp\":1643191200000,\"id\":\"undefined\",\"from\":\"undefined\",\"body\":\"C\"}]">>,
         511,9703}
Params: #{body => <<>>,
          creds =>
              {<<"alice_messages_can_be_paginated_2154@localhost">>,
               <<"matygrysa">>},
          method => <<"GET">>,
          path =>
              <<"/api/messages/bob_messages_can_be_paginated_2154@localhost?limit=3">>,
          return_headers => true,role => client,
          server => #{node => mongooseim@localhost}}


*** User 2022-01-27 15:37:00.937 ***
REST request:
Code: 200
Req: {<0.9410.2>,
      <<"/api/messages/bob_messages_can_be_paginated_2154@localhost?before=1643155201000&limit=10">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"41c440b2c01ae24a">>},
       {<<"authorization">>,
        <<"Basic YWxpY2VfbWVzc2FnZXNfY2FuX2JlX3BhZ2luYXRlZF8yMTU0QGxvY2FsaG9zdDptYXR5Z3J5c2E=">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 15:37:00 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"513">>}],
         <<"[{\"to\":\"bOb_messages_can_be_paginated_2154@localhost\",\"timestamp\":1643018400000,\"id\":\"undefined\",\"from\":\"undefined\",\"body\":\"A\"},{\"to\":\"alicE_messages_can_be_paginated_2154@localhost\",\"timestamp\":1643018400000,\"id\":\"undefined\",\"from\":\"undefined\",\"body\":\"A\"},{\"to\":\"bOb_messages_can_be_paginated_2154@localhost\",\"timestamp\":1643104800000,\"id\":\"undefined\",\"from\":\"undefined\",\"body\":\"B\"},{\"to\":\"alicE_messages_can_be_paginated_2154@localhost\",\"timestamp\":1643104800000,\"id\":\"undefined\",\"from\":\"undefined\",\"body\":\"B\"}]">>,
         638,3535}
Params: #{body => <<>>,
          creds =>
              {<<"alice_messages_can_be_paginated_2154@localhost">>,
               <<"matygrysa">>},
          method => <<"GET">>,
          path =>
              <<"/api/messages/bob_messages_can_be_paginated_2154@localhost?before=1643155201000&limit=10">>,
          return_headers => true,role => client,
          server => #{node => mongooseim@localhost}}


*** System report during messages in rest_client_SUITE 2022-01-27 15:37:00.939 ***
=WARNING REPORT==== 27-Jan-2022::15:37:00.938996 ===
Description: "Authenticity is not established by certificate path validation"
     Reason: "Option {verify, verify_peer} and cacertfile/cacerts is missing"



*** User 2022-01-27 15:37:00.950 ***
REST request:
Code: 200
Req: {<0.9429.2>,
      <<"/api/messages/bob_messages_can_be_paginated_2154@localhost?before=1643155201000&limit=2">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"dc7cc42ed3cd2362">>},
       {<<"authorization">>,
        <<"Basic YWxpY2VfbWVzc2FnZXNfY2FuX2JlX3BhZ2luYXRlZF8yMTU0QGxvY2FsaG9zdDptYXR5Z3J5c2E=">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 15:37:00 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"257">>}],
         <<"[{\"to\":\"bOb_messages_can_be_paginated_2154@localhost\",\"timestamp\":1643104800000,\"id\":\"undefined\",\"from\":\"undefined\",\"body\":\"B\"},{\"to\":\"alicE_messages_can_be_paginated_2154@localhost\",\"timestamp\":1643104800000,\"id\":\"undefined\",\"from\":\"undefined\",\"body\":\"B\"}]">>,
         382,3300}
Params: #{body => <<>>,
          creds =>
              {<<"alice_messages_can_be_paginated_2154@localhost">>,
               <<"matygrysa">>},
          method => <<"GET">>,
          path =>
              <<"/api/messages/bob_messages_can_be_paginated_2154@localhost?before=1643155201000&limit=2">>,
          return_headers => true,role => client,
          server => #{node => mongooseim@localhost}}


*** User 2022-01-27 15:37:00.950 ***
bOb_messages_can_be_paginated_2154@localhost/res1 out
</stream:stream>

*** User 2022-01-27 15:37:00.950 ***
bOb_messages_can_be_paginated_2154@localhost/res1 in
</stream:stream>

*** User 2022-01-27 15:37:00.950 ***
alicE_messages_can_be_paginated_2154@localhost/res1 out
</stream:stream>

*** User 2022-01-27 15:37:00.950 ***
alicE_messages_can_be_paginated_2154@localhost/res1 in
</stream:stream>
*** CT 2022-01-27 15:37:00.953 *** View log from node ejabberd2@localhost when finished ejabberd2@localhost_2385.html
*** CT 2022-01-27 15:37:00.957 *** View log from node mongooseim@localhost when finished mongooseim@localhost_5807.html



=== Ended at 2022-01-27 15:37:00
=== successfully completed test case
=== === Returned value: ok