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

=== Config value:

    [{watchdog,<0.80134.0>},
     {{ejabberd_cwd,mongooseim@localhost},
      "/home/circleci/project/_build/mim1/rel/mongooseim"},
     {mam_backend,rdbms},
     {preset,"pgsql_cets"},
     {mim_data_dir,"/home/circleci/project/big_tests/tests/rest_SUITE_data"},
     {tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@def112168c16.2024-04-23_11.32.54/big_tests.tests.rest_SUITE.logs/run.2024-04-23_11.46.57/rest_suite.messages_are_archived.88964.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@def112168c16.2024-04-23_11.32.54/big_tests.tests.rest_SUITE.logs/run.2024-04-23_11.46.57/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_sic => #{iqdisc => one_queue},
        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_amp => #{},
        mod_disco =>
            #{iqdisc => one_queue,server_info => [],extra_domains => [],
              users_can_see_hidden_services => false},
        mod_presence => #{},
        mod_stream_management =>
            #{buffer => true,ack => true,backend => cets,
              stale_h =>
                  #{enabled => false,repeat_after => 1800,geriatric => 3600},
              buffer_max => 100,ack_freq => 1,resume_timeout => 600},
        mod_adhoc => #{iqdisc => one_queue,report_commands_node => false},
        mod_cache_users =>
            #{strategy => fifo,number_of_segments => 5,time_to_live => 2},
        mod_bosh =>
            #{backend => cets,inactivity => 30,max_pause => 120,
              max_wait => infinity,server_acks => false},
        mod_carboncopy => #{iqdisc => no_queue}}},
     {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@def112168c16.2024-04-23_11.32.54"

=== Started at 2024-04-23 11:46:57


*** CT 2024-04-23 11:46:57.388 *** View log from node mongooseim@localhost when started🔗 mongooseim@localhost_4506.html

*** User 2024-04-23 11:46:57.478 ***🔗
alicE_messages_are_archived_2933@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-04-23 11:46:57.479 ***🔗
alicE_messages_are_archived_2933@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='fa6f542b30456cd6' from='localhost' version='1.0' xml:lang='en'>

*** User 2024-04-23 11:46:57.479 ***🔗
alicE_messages_are_archived_2933@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-04-23 11:46:57.479 ***🔗
alicE_messages_are_archived_2933@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX21lc3NhZ2VzX2FyZV9hcmNoaXZlZF8yOTMzAG1hdHlncnlzYQ==</auth>



*** User 2024-04-23 11:46:57.481 ***🔗
alicE_messages_are_archived_2933@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2024-04-23 11:46:57.481 ***🔗
alicE_messages_are_archived_2933@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-04-23 11:46:57.481 ***🔗
alicE_messages_are_archived_2933@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='06f554ecfefca6dd' from='localhost' version='1.0' xml:lang='en' to='alice_messages_are_archived_2933@localhost'>

*** User 2024-04-23 11:46:57.482 ***🔗
alicE_messages_are_archived_2933@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-04-23 11:46:57.482 ***🔗
alicE_messages_are_archived_2933@localhost/res1 out
<iq type='set' id='ec8806612489aafce9cd1efc4dabdc90'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2024-04-23 11:46:57.482 ***🔗
alicE_messages_are_archived_2933@localhost/res1 in
<iq id='ec8806612489aafce9cd1efc4dabdc90' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alice_messages_are_archived_2933@localhost/res1</jid>
	</bind>
</iq>



*** User 2024-04-23 11:46:57.482 ***🔗
alice_messages_are_archived_2933@localhost/res1 out
<iq type='set' id='d1303a3956e485037c5b7bc9a90eba35'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-23 11:46:57.484 ***🔗
alice_messages_are_archived_2933@localhost/res1 in
<iq from='localhost' to='alice_messages_are_archived_2933@localhost/res1' id='d1303a3956e485037c5b7bc9a90eba35' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-23 11:46:57.485 ***🔗
alice_messages_are_archived_2933@localhost/res1 out
<presence/>



*** User 2024-04-23 11:46:57.489 ***🔗
alice_messages_are_archived_2933@localhost/res1 in
<presence from='alice_messages_are_archived_2933@localhost/res1' to='alice_messages_are_archived_2933@localhost/res1'/>



*** User 2024-04-23 11:46:57.490 ***🔗
bOb_messages_are_archived_2933@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-04-23 11:46:57.490 ***🔗
bOb_messages_are_archived_2933@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='8788fd9b64e69fcc' from='localhost' version='1.0' xml:lang='en'>

*** User 2024-04-23 11:46:57.490 ***🔗
bOb_messages_are_archived_2933@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-04-23 11:46:57.491 ***🔗
bOb_messages_are_archived_2933@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9tZXNzYWdlc19hcmVfYXJjaGl2ZWRfMjkzMwBtYWtyb2xpa2E=</auth>



*** User 2024-04-23 11:46:57.493 ***🔗
bOb_messages_are_archived_2933@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2024-04-23 11:46:57.493 ***🔗
bOb_messages_are_archived_2933@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-04-23 11:46:57.493 ***🔗
bOb_messages_are_archived_2933@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='fa2da8ae8e29e48c' from='localhost' version='1.0' xml:lang='en' to='bob_messages_are_archived_2933@localhost'>

*** User 2024-04-23 11:46:57.494 ***🔗
bOb_messages_are_archived_2933@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-04-23 11:46:57.494 ***🔗
bOb_messages_are_archived_2933@localhost/res1 out
<iq type='set' id='9c545b850e94356128a94188463cc736'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2024-04-23 11:46:57.495 ***🔗
bOb_messages_are_archived_2933@localhost/res1 in
<iq id='9c545b850e94356128a94188463cc736' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bob_messages_are_archived_2933@localhost/res1</jid>
	</bind>
</iq>



*** User 2024-04-23 11:46:57.495 ***🔗
bob_messages_are_archived_2933@localhost/res1 out
<iq type='set' id='1e7a7cc4b97c52c3df05742e35f0e954'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-23 11:46:57.495 ***🔗
bob_messages_are_archived_2933@localhost/res1 in
<iq from='localhost' to='bob_messages_are_archived_2933@localhost/res1' id='1e7a7cc4b97c52c3df05742e35f0e954' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-23 11:46:57.496 ***🔗
bob_messages_are_archived_2933@localhost/res1 out
<presence/>



*** User 2024-04-23 11:46:57.557 ***🔗
bob_messages_are_archived_2933@localhost/res1 in
<presence from='bob_messages_are_archived_2933@localhost/res1' to='bob_messages_are_archived_2933@localhost/res1'/>



*** User 2024-04-23 11:46:57.571 ***🔗
REST request:
Code: 204
Req: {<0.80454.0>,<<"/api/messages">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"0402eb1ce3913854">>}],
      <<"{\"body\":\"hello from Bob\",\"to\":\"alice_messages_are_archived_2933@localhost\",\"caller\":\"bob_messages_are_archived_2933@localhost\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Tue, 23 Apr 2024 11:46:56 GMT">>}],
         <<>>,80,12834}
Params: #{path => <<"/api/messages">>,
          server => #{node => mongooseim@localhost},
          method => <<"POST">>,
          body =>
              <<"{\"body\":\"hello from Bob\",\"to\":\"alice_messages_are_archived_2933@localhost\",\"caller\":\"bob_messages_are_archived_2933@localhost\"}">>,
          role => admin,return_headers => true}

Could not find element wait_for_parallel_writer in Config.

Could not find element archive_wait in Config.


*** User 2024-04-23 11:46:57.577 ***🔗
REST request:
Code: 204
Req: {<0.80470.0>,<<"/api/messages">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"5640e6853c693fd6">>}],
      <<"{\"body\":\"hello from Alice\",\"to\":\"bob_messages_are_archived_2933@localhost\",\"caller\":\"alice_messages_are_archived_2933@localhost\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Tue, 23 Apr 2024 11:46:56 GMT">>}],
         <<>>,80,4800}
Params: #{path => <<"/api/messages">>,
          server => #{node => mongooseim@localhost},
          method => <<"POST">>,
          body =>
              <<"{\"body\":\"hello from Alice\",\"to\":\"bob_messages_are_archived_2933@localhost\",\"caller\":\"alice_messages_are_archived_2933@localhost\"}">>,
          role => admin,return_headers => true}

Could not find element wait_for_parallel_writer in Config.

Could not find element archive_wait in Config.


*** User 2024-04-23 11:46:57.581 ***🔗
REST request:
Code: 200
Req: {<0.80476.0>,
      <<"/api/messages/alice_messages_are_archived_2933@localhost/bob_messages_are_archived_2933@localhost?limit=10">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"1bafa21d8d371319">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Tue, 23 Apr 2024 11:46:56 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"271">>}],
         <<"[{\"message_id\":\"a56fe2b0d9bfdeb9\",\"sender\":\"bob_messages_are_archived_2933@localhost\",\"body\":\"hello from Bob\",\"timestamp\":1713872818},{\"message_id\":\"ee07c3686264e90c\",\"sender\":\"alice_messages_are_archived_2933@localhost\",\"body\":\"hello from Alice\",\"timestamp\":1713872818}]">>,
         396,2124}
Params: #{path =>
              <<"/api/messages/alice_messages_are_archived_2933@localhost/bob_messages_are_archived_2933@localhost?limit=10">>,
          server => #{node => mongooseim@localhost},
          method => <<"GET">>,body => <<>>,role => admin,
          return_headers => true}

Could not find element wait_for_parallel_writer in Config.

Could not find element archive_wait in Config.


*** User 2024-04-23 11:46:57.583 ***🔗
REST request:
Code: 200
Req: {<0.80478.0>,
      <<"/api/messages/alice_messages_are_archived_2933@localhost/bob_messages_are_archived_2933@localhost">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"10b502550081f7e0">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Tue, 23 Apr 2024 11:46:56 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"271">>}],
         <<"[{\"message_id\":\"a56fe2b0d9bfdeb9\",\"sender\":\"bob_messages_are_archived_2933@localhost\",\"body\":\"hello from Bob\",\"timestamp\":1713872818},{\"message_id\":\"ee07c3686264e90c\",\"sender\":\"alice_messages_are_archived_2933@localhost\",\"body\":\"hello from Alice\",\"timestamp\":1713872818}]">>,
         396,847}
Params: #{path =>
              <<"/api/messages/alice_messages_are_archived_2933@localhost/bob_messages_are_archived_2933@localhost">>,
          server => #{node => mongooseim@localhost},
          method => <<"GET">>,body => <<>>,role => admin,
          return_headers => true}


*** User 2024-04-23 11:46:57.585 ***🔗
REST request:
Code: 200
Req: {<0.80480.0>,
      <<"/api/messages/alice_messages_are_archived_2933@localhost">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"9740df4ba2315d04">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Tue, 23 Apr 2024 11:46:56 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"271">>}],
         <<"[{\"message_id\":\"a56fe2b0d9bfdeb9\",\"sender\":\"bob_messages_are_archived_2933@localhost\",\"body\":\"hello from Bob\",\"timestamp\":1713872818},{\"message_id\":\"ee07c3686264e90c\",\"sender\":\"alice_messages_are_archived_2933@localhost\",\"body\":\"hello from Alice\",\"timestamp\":1713872818}]">>,
         396,1308}
Params: #{path =>
              <<"/api/messages/alice_messages_are_archived_2933@localhost">>,
          server => #{node => mongooseim@localhost},
          method => <<"GET">>,body => <<>>,role => admin,
          return_headers => true}


*** User 2024-04-23 11:46:57.585 ***🔗
bob_messages_are_archived_2933@localhost/res1 out
</stream:stream>

*** User 2024-04-23 11:46:57.586 ***🔗
bob_messages_are_archived_2933@localhost/res1 in
</stream:stream>

*** User 2024-04-23 11:46:57.586 ***🔗
alice_messages_are_archived_2933@localhost/res1 out
</stream:stream>

*** User 2024-04-23 11:46:57.586 ***🔗
alice_messages_are_archived_2933@localhost/res1 in
</stream:stream>
*** CT 2024-04-23 11:46:57.588 *** View log from node mongooseim@localhost when finished🔗 mongooseim@localhost_4506.html



=== Ended at 2024-04-23 11:46:57
=== successfully completed test case
=== === Returned value: ok