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

=== Config value:

    [{watchdog,<0.27985.1>},
     {muc_light_host,<<"muclight2.domain.example.com">>},
     {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@88d84ff17c71.2022-03-04_11.16.52/big_tests.tests.rest_client_SUITE.logs/run.2022-03-04_11.25.13/rest_client_suite.messages_can_be_paginated.88963.html"},
     {tc_group_properties,[{name,messages},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@88d84ff17c71.2022-03-04_11.16.52/big_tests.tests.rest_client_SUITE.logs/run.2022-03-04_11.25.13/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@88d84ff17c71.2022-03-04_11.16.52"

=== Started at 2022-03-04 11:25:13


*** CT 2022-03-04 11:25:13.736 *** View log from node mongooseim@localhost when started mongooseim@localhost_2518.html
*** CT 2022-03-04 11:25:13.736 *** View log from node ejabberd2@localhost when started ejabberd2@localhost_646.html

*** User 2022-03-04 11:25:13.747 ***
alicE_messages_can_be_paginated_1798@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-03-04 11:25:13.747 ***
alicE_messages_can_be_paginated_1798@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='e0ac49e598c14e6d' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-03-04 11:25:13.748 ***
alicE_messages_can_be_paginated_1798@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-03-04 11:25:13.748 ***
alicE_messages_can_be_paginated_1798@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX21lc3NhZ2VzX2Nhbl9iZV9wYWdpbmF0ZWRfMTc5OABtYXR5Z3J5c2E=</auth>



*** User 2022-03-04 11:25:13.749 ***
alicE_messages_can_be_paginated_1798@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-03-04 11:25:13.749 ***
alicE_messages_can_be_paginated_1798@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-03-04 11:25:13.749 ***
alicE_messages_can_be_paginated_1798@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='f4bbb3c7cb3e4b52' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-03-04 11:25:13.749 ***
alicE_messages_can_be_paginated_1798@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-03-04 11:25:13.749 ***
alicE_messages_can_be_paginated_1798@domain.example.com/res1 out
<iq type='set' id='d8cc83d6d58d71c2e673b05aebec2fcd'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-03-04 11:25:13.749 ***
alicE_messages_can_be_paginated_1798@domain.example.com/res1 in
<iq id='d8cc83d6d58d71c2e673b05aebec2fcd' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alicE_messages_can_be_paginated_1798@domain.example.com/res1</jid>
	</bind>
</iq>



*** User 2022-03-04 11:25:13.749 ***
alicE_messages_can_be_paginated_1798@domain.example.com/res1 out
<iq type='set' id='2d32ae764f58198e7ee29de9cc7a9381'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-04 11:25:13.749 ***
alicE_messages_can_be_paginated_1798@domain.example.com/res1 in
<iq type='result' id='2d32ae764f58198e7ee29de9cc7a9381'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-04 11:25:13.750 ***
alicE_messages_can_be_paginated_1798@domain.example.com/res1 out
<presence/>



*** User 2022-03-04 11:25:13.752 ***
alicE_messages_can_be_paginated_1798@domain.example.com/res1 in
<presence from='alicE_messages_can_be_paginated_1798@domain.example.com/res1' to='alice_messages_can_be_paginated_1798@domain.example.com/res1' xml:lang='en'/>



*** User 2022-03-04 11:25:13.752 ***
bOb_messages_can_be_paginated_1798@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-03-04 11:25:13.752 ***
bOb_messages_can_be_paginated_1798@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='bce32c366e66ca59' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-03-04 11:25:13.752 ***
bOb_messages_can_be_paginated_1798@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-03-04 11:25:13.752 ***
bOb_messages_can_be_paginated_1798@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9tZXNzYWdlc19jYW5fYmVfcGFnaW5hdGVkXzE3OTgAbWFrcm9saWth</auth>



*** User 2022-03-04 11:25:13.753 ***
bOb_messages_can_be_paginated_1798@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-03-04 11:25:13.753 ***
bOb_messages_can_be_paginated_1798@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-03-04 11:25:13.754 ***
bOb_messages_can_be_paginated_1798@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='f9824d9cbca62118' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-03-04 11:25:13.754 ***
bOb_messages_can_be_paginated_1798@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-03-04 11:25:13.754 ***
bOb_messages_can_be_paginated_1798@domain.example.com/res1 out
<iq type='set' id='5d8c4ece0658d9f909b6dc4f253c430f'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-03-04 11:25:13.754 ***
bOb_messages_can_be_paginated_1798@domain.example.com/res1 in
<iq id='5d8c4ece0658d9f909b6dc4f253c430f' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bOb_messages_can_be_paginated_1798@domain.example.com/res1</jid>
	</bind>
</iq>



*** User 2022-03-04 11:25:13.754 ***
bOb_messages_can_be_paginated_1798@domain.example.com/res1 out
<iq type='set' id='c984d24254ab534ceb345119fde4e7b4'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-04 11:25:13.754 ***
bOb_messages_can_be_paginated_1798@domain.example.com/res1 in
<iq type='result' id='c984d24254ab534ceb345119fde4e7b4'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-04 11:25:13.755 ***
bOb_messages_can_be_paginated_1798@domain.example.com/res1 out
<presence/>



*** User 2022-03-04 11:25:13.756 ***
bOb_messages_can_be_paginated_1798@domain.example.com/res1 in
<presence from='bOb_messages_can_be_paginated_1798@domain.example.com/res1' to='bob_messages_can_be_paginated_1798@domain.example.com/res1' xml:lang='en'/>


Could not find element wait_for_parallel_writer in Config.

Could not find element archive_wait in Config.


*** User 2022-03-04 11:25:13.864 ***
REST request:
Code: 200
Req: {<0.28102.1>,
      <<"/api/messages/bob_messages_can_be_paginated_1798@domain.example.com?limit=10">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"7e86223d6e61069b">>},
       {<<"authorization">>,
        <<"Basic YWxpY2VfbWVzc2FnZXNfY2FuX2JlX3BhZ2luYXRlZF8xNzk4QGRvbWFpbi5leGFtcGxlLmNvbTptYXR5Z3J5c2E=">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Fri, 04 Mar 2022 11:25:12 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"823">>}],
         <<"[{\"to\":\"bOb_messages_can_be_paginated_1798@domain.example.com\",\"timestamp\":1646128800000,\"id\":\"undefined\",\"from\":\"undefined\",\"body\":\"A\"},{\"to\":\"alicE_messages_can_be_paginated_1798@domain.example.com\",\"timestamp\":1646128800000,\"id\":\"undefined\",\"from\":\"undefined\",\"body\":\"A\"},{\"to\":\"bOb_messages_can_be_paginated_1798@domain.example.com\",\"timestamp\":1646215200000,\"id\":\"undefined\",\"from\":\"undefined\",\"body\":\"B\"},{\"to\":\"alicE_messages_can_be_paginated_1798@domain.example.com\",\"timestamp\":1646215200000,\"id\":\"undefined\",\"from\":\"undefined\",\"body\":\"B\"},{\"to\":\"bOb_messages_can_be_paginated_1798@domain.example.com\",\"timestamp\":1646301600000,\"id\":\"undefined\",\"from\":\"undefined\",\"body\":\"C\"},{\"to\":\"alicE_messages_can_be_paginated_1798@domain.example.com\",\"timestamp\":1646301600000,\"id\":\"undefined\",\"from\":\"undefined\",\"body\":\"C\"}]">>,
         948,3845}
Params: #{body => <<>>,
          creds =>
              {<<"alice_messages_can_be_paginated_1798@domain.example.com">>,
               <<"matygrysa">>},
          method => <<"GET">>,
          path =>
              <<"/api/messages/bob_messages_can_be_paginated_1798@domain.example.com?limit=10">>,
          return_headers => true,role => client,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-04 11:25:13.878 ***
REST request:
Code: 200
Req: {<0.28112.1>,
      <<"/api/messages/bob_messages_can_be_paginated_1798@domain.example.com?limit=3">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"b89794534c632810">>},
       {<<"authorization">>,
        <<"Basic YWxpY2VfbWVzc2FnZXNfY2FuX2JlX3BhZ2luYXRlZF8xNzk4QGRvbWFpbi5leGFtcGxlLmNvbTptYXR5Z3J5c2E=">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Fri, 04 Mar 2022 11:25:12 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"413">>}],
         <<"[{\"to\":\"alicE_messages_can_be_paginated_1798@domain.example.com\",\"timestamp\":1646215200000,\"id\":\"undefined\",\"from\":\"undefined\",\"body\":\"B\"},{\"to\":\"bOb_messages_can_be_paginated_1798@domain.example.com\",\"timestamp\":1646301600000,\"id\":\"undefined\",\"from\":\"undefined\",\"body\":\"C\"},{\"to\":\"alicE_messages_can_be_paginated_1798@domain.example.com\",\"timestamp\":1646301600000,\"id\":\"undefined\",\"from\":\"undefined\",\"body\":\"C\"}]">>,
         538,6196}
Params: #{body => <<>>,
          creds =>
              {<<"alice_messages_can_be_paginated_1798@domain.example.com">>,
               <<"matygrysa">>},
          method => <<"GET">>,
          path =>
              <<"/api/messages/bob_messages_can_be_paginated_1798@domain.example.com?limit=3">>,
          return_headers => true,role => client,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-04 11:25:13.887 ***
REST request:
Code: 200
Req: {<0.28122.1>,
      <<"/api/messages/bob_messages_can_be_paginated_1798@domain.example.com?before=1646265601000&limit=10">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"6d4a779f53fef173">>},
       {<<"authorization">>,
        <<"Basic YWxpY2VfbWVzc2FnZXNfY2FuX2JlX3BhZ2luYXRlZF8xNzk4QGRvbWFpbi5leGFtcGxlLmNvbTptYXR5Z3J5c2E=">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Fri, 04 Mar 2022 11:25:12 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"549">>}],
         <<"[{\"to\":\"bOb_messages_can_be_paginated_1798@domain.example.com\",\"timestamp\":1646128800000,\"id\":\"undefined\",\"from\":\"undefined\",\"body\":\"A\"},{\"to\":\"alicE_messages_can_be_paginated_1798@domain.example.com\",\"timestamp\":1646128800000,\"id\":\"undefined\",\"from\":\"undefined\",\"body\":\"A\"},{\"to\":\"bOb_messages_can_be_paginated_1798@domain.example.com\",\"timestamp\":1646215200000,\"id\":\"undefined\",\"from\":\"undefined\",\"body\":\"B\"},{\"to\":\"alicE_messages_can_be_paginated_1798@domain.example.com\",\"timestamp\":1646215200000,\"id\":\"undefined\",\"from\":\"undefined\",\"body\":\"B\"}]">>,
         674,2773}
Params: #{body => <<>>,
          creds =>
              {<<"alice_messages_can_be_paginated_1798@domain.example.com">>,
               <<"matygrysa">>},
          method => <<"GET">>,
          path =>
              <<"/api/messages/bob_messages_can_be_paginated_1798@domain.example.com?before=1646265601000&limit=10">>,
          return_headers => true,role => client,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-04 11:25:13.902 ***
REST request:
Code: 200
Req: {<0.28139.1>,
      <<"/api/messages/bob_messages_can_be_paginated_1798@domain.example.com?before=1646265601000&limit=2">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"2f641499f05690ab">>},
       {<<"authorization">>,
        <<"Basic YWxpY2VfbWVzc2FnZXNfY2FuX2JlX3BhZ2luYXRlZF8xNzk4QGRvbWFpbi5leGFtcGxlLmNvbTptYXR5Z3J5c2E=">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Fri, 04 Mar 2022 11:25:12 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"275">>}],
         <<"[{\"to\":\"bOb_messages_can_be_paginated_1798@domain.example.com\",\"timestamp\":1646215200000,\"id\":\"undefined\",\"from\":\"undefined\",\"body\":\"B\"},{\"to\":\"alicE_messages_can_be_paginated_1798@domain.example.com\",\"timestamp\":1646215200000,\"id\":\"undefined\",\"from\":\"undefined\",\"body\":\"B\"}]">>,
         400,2728}
Params: #{body => <<>>,
          creds =>
              {<<"alice_messages_can_be_paginated_1798@domain.example.com">>,
               <<"matygrysa">>},
          method => <<"GET">>,
          path =>
              <<"/api/messages/bob_messages_can_be_paginated_1798@domain.example.com?before=1646265601000&limit=2">>,
          return_headers => true,role => client,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-04 11:25:13.902 ***
bOb_messages_can_be_paginated_1798@domain.example.com/res1 out
</stream:stream>

*** User 2022-03-04 11:25:13.902 ***
bOb_messages_can_be_paginated_1798@domain.example.com/res1 in
</stream:stream>

*** User 2022-03-04 11:25:13.902 ***
alicE_messages_can_be_paginated_1798@domain.example.com/res1 out
</stream:stream>

*** User 2022-03-04 11:25:13.903 ***
alicE_messages_can_be_paginated_1798@domain.example.com/res1 in
</stream:stream>
*** CT 2022-03-04 11:25:13.905 *** View log from node ejabberd2@localhost when finished ejabberd2@localhost_646.html
*** CT 2022-03-04 11:25:13.906 *** View log from node mongooseim@localhost when finished mongooseim@localhost_2519.html



=== Ended at 2022-03-04 11:25:13
=== successfully completed test case
=== === Returned value: ok