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

=== Config value:

    [{watchdog,<0.85383.0>},
     {{ejabberd_cwd,mongooseim@localhost},
      "/home/circleci/project/_build/mim1/rel/mongooseim"},
     {mam_backend,rdbms},
     {preset,"pgsql_mnesia"},
     {mim_data_dir,"/home/circleci/project/big_tests/tests/rest_SUITE_data"},
     {tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@3709086d5689.2024-02-27_12.00.42/big_tests.tests.rest_SUITE.logs/run.2024-02-27_12.17.01/rest_suite.messages_can_be_paginated.121860.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@3709086d5689.2024-02-27_12.00.42/big_tests.tests.rest_SUITE.logs/run.2024-02-27_12.17.01/log_private/"},
     {{saved_modules,mongooseim@localhost,<<"localhost">>},
      #{mod_vcard =>
            #{matches => 30,
              host => {prefix,<<"vjud.">>},
              search => true,iqdisc => parallel,backend => rdbms},
        mod_roster =>
            #{iqdisc => one_queue,backend => rdbms,versioning => false,
              store_current_id => false},
        mod_register =>
            #{access => register,iqdisc => one_queue,
              registration_watchers => [],password_strength => 0,
              ip_access => [{allow,"127.0.0.0/8"},{deny,"0.0.0.0/0"}]},
        mod_sic => #{iqdisc => one_queue},
        mod_amp => #{},mod_presence => #{},
        mod_disco =>
            #{iqdisc => one_queue,users_can_see_hidden_services => false,
              server_info => [],extra_domains => []},
        mod_stream_management =>
            #{buffer => true,ack => true,backend => mnesia,buffer_max => 100,
              stale_h =>
                  #{enabled => false,repeat_after => 1800,geriatric => 3600},
              ack_freq => 1,resume_timeout => 600},
        mod_adhoc => #{iqdisc => one_queue,report_commands_node => false},
        mod_carboncopy => #{iqdisc => no_queue},
        mod_cache_users =>
            #{strategy => fifo,number_of_segments => 5,time_to_live => 2},
        mod_bosh =>
            #{backend => mnesia,inactivity => 30,max_pause => 120,
              max_wait => infinity,server_acks => false}}},
     {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@3709086d5689.2024-02-27_12.00.42"

=== Started at 2024-02-27 12:17:01


*** CT 2024-02-27 12:17:01.991 *** View log from node mongooseim@localhost when started🔗 mongooseim@localhost_4842.html

*** User 2024-02-27 12:17:02.074 ***🔗
alicE_messages_can_be_paginated_3242@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2024-02-27 12:17:02.075 ***🔗
alicE_messages_can_be_paginated_3242@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='3f518ccdc337d15f' from='localhost' version='1.0' xml:lang='en'>

*** User 2024-02-27 12:17:02.076 ***🔗
alicE_messages_can_be_paginated_3242@localhost/res1 in
<stream:features>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
	<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
		<mechanism>SCRAM-SHA-256</mechanism>
		<mechanism>PLAIN</mechanism>
	</mechanisms>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2024-02-27 12:17:02.076 ***🔗
alicE_messages_can_be_paginated_3242@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX21lc3NhZ2VzX2Nhbl9iZV9wYWdpbmF0ZWRfMzI0MgBtYXR5Z3J5c2E=</auth>



*** User 2024-02-27 12:17:02.077 ***🔗
alicE_messages_can_be_paginated_3242@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2024-02-27 12:17:02.077 ***🔗
alicE_messages_can_be_paginated_3242@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2024-02-27 12:17:02.078 ***🔗
alicE_messages_can_be_paginated_3242@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='119a266807e8b710' from='localhost' version='1.0' xml:lang='en' to='alice_messages_can_be_paginated_3242@localhost'>

*** User 2024-02-27 12:17:02.078 ***🔗
alicE_messages_can_be_paginated_3242@localhost/res1 in
<stream:features>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2024-02-27 12:17:02.078 ***🔗
alicE_messages_can_be_paginated_3242@localhost/res1 out
<iq type='set' id='736f83c03cf9baa79c343f73b884ca08'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2024-02-27 12:17:02.078 ***🔗
alicE_messages_can_be_paginated_3242@localhost/res1 in
<iq id='736f83c03cf9baa79c343f73b884ca08' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alice_messages_can_be_paginated_3242@localhost/res1</jid>
	</bind>
</iq>



*** User 2024-02-27 12:17:02.078 ***🔗
alice_messages_can_be_paginated_3242@localhost/res1 out
<iq type='set' id='0ddd9f4c12c3aebb61ebd65d4cb95a02'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-02-27 12:17:02.079 ***🔗
alice_messages_can_be_paginated_3242@localhost/res1 in
<iq from='localhost' to='alice_messages_can_be_paginated_3242@localhost/res1' id='0ddd9f4c12c3aebb61ebd65d4cb95a02' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-02-27 12:17:02.079 ***🔗
alice_messages_can_be_paginated_3242@localhost/res1 out
<presence/>



*** User 2024-02-27 12:17:02.083 ***🔗
alice_messages_can_be_paginated_3242@localhost/res1 in
<presence from='alice_messages_can_be_paginated_3242@localhost/res1' to='alice_messages_can_be_paginated_3242@localhost/res1'/>



*** User 2024-02-27 12:17:02.083 ***🔗
bOb_messages_can_be_paginated_3242@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2024-02-27 12:17:02.084 ***🔗
bOb_messages_can_be_paginated_3242@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='563c28bb9bbe26d5' from='localhost' version='1.0' xml:lang='en'>

*** User 2024-02-27 12:17:02.084 ***🔗
bOb_messages_can_be_paginated_3242@localhost/res1 in
<stream:features>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
	<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
		<mechanism>SCRAM-SHA-256</mechanism>
		<mechanism>PLAIN</mechanism>
	</mechanisms>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2024-02-27 12:17:02.084 ***🔗
bOb_messages_can_be_paginated_3242@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9tZXNzYWdlc19jYW5fYmVfcGFnaW5hdGVkXzMyNDIAbWFrcm9saWth</auth>



*** User 2024-02-27 12:17:02.086 ***🔗
bOb_messages_can_be_paginated_3242@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2024-02-27 12:17:02.086 ***🔗
bOb_messages_can_be_paginated_3242@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2024-02-27 12:17:02.087 ***🔗
bOb_messages_can_be_paginated_3242@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='aec82aed868467a4' from='localhost' version='1.0' xml:lang='en' to='bob_messages_can_be_paginated_3242@localhost'>

*** User 2024-02-27 12:17:02.087 ***🔗
bOb_messages_can_be_paginated_3242@localhost/res1 in
<stream:features>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2024-02-27 12:17:02.087 ***🔗
bOb_messages_can_be_paginated_3242@localhost/res1 out
<iq type='set' id='581278723492ecde72324a7247b63cc2'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2024-02-27 12:17:02.088 ***🔗
bOb_messages_can_be_paginated_3242@localhost/res1 in
<iq id='581278723492ecde72324a7247b63cc2' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bob_messages_can_be_paginated_3242@localhost/res1</jid>
	</bind>
</iq>



*** User 2024-02-27 12:17:02.088 ***🔗
bob_messages_can_be_paginated_3242@localhost/res1 out
<iq type='set' id='8bf122466627122487d6e69a77180c77'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-02-27 12:17:02.089 ***🔗
bob_messages_can_be_paginated_3242@localhost/res1 in
<iq from='localhost' to='bob_messages_can_be_paginated_3242@localhost/res1' id='8bf122466627122487d6e69a77180c77' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-02-27 12:17:02.089 ***🔗
bob_messages_can_be_paginated_3242@localhost/res1 out
<presence/>



*** User 2024-02-27 12:17:02.091 ***🔗
bob_messages_can_be_paginated_3242@localhost/res1 in
<presence from='bob_messages_can_be_paginated_3242@localhost/res1' to='bob_messages_can_be_paginated_3242@localhost/res1'/>


Could not find element wait_for_parallel_writer in Config.

Could not find element archive_wait in Config.


*** User 2024-02-27 12:17:02.282 ***🔗
REST request:
Code: 200
Req: {<0.85774.0>,
      <<"/api/messages/alice_messages_can_be_paginated_3242@localhost/bob_messages_can_be_paginated_3242@localhost?limit=10">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"44e252e8086aa95a">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Tue, 27 Feb 2024 12:17:01 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"655">>}],
         <<"[{\"sender\":\"alice_messages_can_be_paginated_3242@localhost\",\"message_id\":\"\",\"body\":\"A\",\"timestamp\":1708768800},{\"sender\":\"bob_messages_can_be_paginated_3242@localhost\",\"message_id\":\"\",\"body\":\"A\",\"timestamp\":1708768800},{\"sender\":\"alice_messages_can_be_paginated_3242@localhost\",\"message_id\":\"\",\"body\":\"B\",\"timestamp\":1708855200},{\"sender\":\"bob_messages_can_be_paginated_3242@localhost\",\"message_id\":\"\",\"body\":\"B\",\"timestamp\":1708855200},{\"sender\":\"alice_messages_can_be_paginated_3242@localhost\",\"message_id\":\"\",\"body\":\"C\",\"timestamp\":1708941600},{\"sender\":\"bob_messages_can_be_paginated_3242@localhost\",\"message_id\":\"\",\"body\":\"C\",\"timestamp\":1708941600}]">>,
         780,2032}
Params: #{path =>
              <<"/api/messages/alice_messages_can_be_paginated_3242@localhost/bob_messages_can_be_paginated_3242@localhost?limit=10">>,
          server => #{node => mongooseim@localhost},
          method => <<"GET">>,body => <<>>,role => admin,
          return_headers => true}


*** User 2024-02-27 12:17:02.285 ***🔗
REST request:
Code: 200
Req: {<0.85776.0>,
      <<"/api/messages/alice_messages_can_be_paginated_3242@localhost/bob_messages_can_be_paginated_3242@localhost?limit=3">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"14dcec444b6bc812">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Tue, 27 Feb 2024 12:17:01 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"327">>}],
         <<"[{\"sender\":\"bob_messages_can_be_paginated_3242@localhost\",\"message_id\":\"\",\"body\":\"B\",\"timestamp\":1708855200},{\"sender\":\"alice_messages_can_be_paginated_3242@localhost\",\"message_id\":\"\",\"body\":\"C\",\"timestamp\":1708941600},{\"sender\":\"bob_messages_can_be_paginated_3242@localhost\",\"message_id\":\"\",\"body\":\"C\",\"timestamp\":1708941600}]">>,
         452,1370}
Params: #{path =>
              <<"/api/messages/alice_messages_can_be_paginated_3242@localhost/bob_messages_can_be_paginated_3242@localhost?limit=3">>,
          server => #{node => mongooseim@localhost},
          method => <<"GET">>,body => <<>>,role => admin,
          return_headers => true}


*** User 2024-02-27 12:17:02.288 ***🔗
REST request:
Code: 200
Req: {<0.85778.0>,
      <<"/api/messages/alice_messages_can_be_paginated_3242@localhost/bob_messages_can_be_paginated_3242@localhost?before=1708905601&limit=10">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"7d0a3fa42c9bd97f">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Tue, 27 Feb 2024 12:17:01 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"437">>}],
         <<"[{\"sender\":\"alice_messages_can_be_paginated_3242@localhost\",\"message_id\":\"\",\"body\":\"A\",\"timestamp\":1708768800},{\"sender\":\"bob_messages_can_be_paginated_3242@localhost\",\"message_id\":\"\",\"body\":\"A\",\"timestamp\":1708768800},{\"sender\":\"alice_messages_can_be_paginated_3242@localhost\",\"message_id\":\"\",\"body\":\"B\",\"timestamp\":1708855200},{\"sender\":\"bob_messages_can_be_paginated_3242@localhost\",\"message_id\":\"\",\"body\":\"B\",\"timestamp\":1708855200}]">>,
         562,1873}
Params: #{path =>
              <<"/api/messages/alice_messages_can_be_paginated_3242@localhost/bob_messages_can_be_paginated_3242@localhost?before=1708905601&limit=10">>,
          server => #{node => mongooseim@localhost},
          method => <<"GET">>,body => <<>>,role => admin,
          return_headers => true}


*** User 2024-02-27 12:17:02.290 ***🔗
REST request:
Code: 200
Req: {<0.85780.0>,
      <<"/api/messages/alice_messages_can_be_paginated_3242@localhost/bob_messages_can_be_paginated_3242@localhost?before=1708905601&limit=2">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"1d5c5348b58ed355">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Tue, 27 Feb 2024 12:17:01 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"219">>}],
         <<"[{\"sender\":\"alice_messages_can_be_paginated_3242@localhost\",\"message_id\":\"\",\"body\":\"B\",\"timestamp\":1708855200},{\"sender\":\"bob_messages_can_be_paginated_3242@localhost\",\"message_id\":\"\",\"body\":\"B\",\"timestamp\":1708855200}]">>,
         344,1149}
Params: #{path =>
              <<"/api/messages/alice_messages_can_be_paginated_3242@localhost/bob_messages_can_be_paginated_3242@localhost?before=1708905601&limit=2">>,
          server => #{node => mongooseim@localhost},
          method => <<"GET">>,body => <<>>,role => admin,
          return_headers => true}


*** User 2024-02-27 12:17:02.290 ***🔗
bob_messages_can_be_paginated_3242@localhost/res1 out
</stream:stream>

*** User 2024-02-27 12:17:02.291 ***🔗
bob_messages_can_be_paginated_3242@localhost/res1 in
</stream:stream>

*** User 2024-02-27 12:17:02.291 ***🔗
alice_messages_can_be_paginated_3242@localhost/res1 out
</stream:stream>

*** User 2024-02-27 12:17:02.291 ***🔗
alice_messages_can_be_paginated_3242@localhost/res1 in
</stream:stream>
*** CT 2024-02-27 12:17:02.293 *** View log from node mongooseim@localhost when finished🔗 mongooseim@localhost_4883.html



=== Ended at 2024-02-27 12:17:02
=== successfully completed test case
=== === Returned value: ok