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

=== Config value:

    [{watchdog,<0.73828.0>},
     {{ejabberd_cwd,mongooseim@localhost},
      "/home/circleci/project/_build/mim1/rel/mongooseim"},
     {mam_backend,rdbms},
     {preset,"mysql_redis"},
     {mim_data_dir,"/home/circleci/project/big_tests/tests/rest_SUITE_data"},
     {tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@f94a1e7ac885.2024-03-11_11.28.43/big_tests.tests.rest_SUITE.logs/run.2024-03-11_11.40.51/rest_suite.messages_are_archived.165251.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@f94a1e7ac885.2024-03-11_11.28.43/big_tests.tests.rest_SUITE.logs/run.2024-03-11_11.40.51/log_private/"},
     {{saved_modules,mongooseim@localhost,<<"test type">>},
      #{mod_vcard =>
            #{matches => 30,
              host => {prefix,<<"vjud.">>},
              search => true,backend => rdbms,iqdisc => parallel},
        mod_roster =>
            #{backend => rdbms,iqdisc => one_queue,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,users_can_see_hidden_services => false,
              server_info => [],extra_domains => []},
        mod_presence => #{},
        mod_stream_management =>
            #{buffer => true,ack => true,backend => mnesia,
              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_bosh =>
            #{backend => mnesia,inactivity => 30,max_pause => 120,
              max_wait => infinity,server_acks => false},
        mod_cache_users =>
            #{strategy => fifo,number_of_segments => 5,time_to_live => 2},
        mod_carboncopy => #{iqdisc => no_queue}}},
     {escalus_users,[{alice,[{username,<<"alicE">>},
                             {server,<<"domain.example.com">>},
                             {host,<<"localhost">>},
                             {password,<<"matygrysa">>}]},
                     {bob,[{username,<<"bOb">>},
                           {server,<<"domain.example.com">>},
                           {host,<<"localhost">>},
                           {password,<<"makrolika">>}]}]}]

=== Current directory is "/home/circleci/project/big_tests/ct_report/ct_run.test@f94a1e7ac885.2024-03-11_11.28.43"

=== Started at 2024-03-11 11:40:51


*** CT 2024-03-11 11:40:51.623 *** View log from node mongooseim@localhost when started🔗 mongooseim@localhost_2277.html

*** User 2024-03-11 11:40:51.707 ***🔗
alicE_messages_are_archived_2731@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 2024-03-11 11:40:51.708 ***🔗
alicE_messages_are_archived_2731@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='d71b2e508d9884ff' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2024-03-11 11:40:51.708 ***🔗
alicE_messages_are_archived_2731@domain.example.com/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-03-11 11:40:51.708 ***🔗
alicE_messages_are_archived_2731@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX21lc3NhZ2VzX2FyZV9hcmNoaXZlZF8yNzMxAG1hdHlncnlzYQ==</auth>



*** User 2024-03-11 11:40:51.710 ***🔗
alicE_messages_are_archived_2731@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2024-03-11 11:40:51.710 ***🔗
alicE_messages_are_archived_2731@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 2024-03-11 11:40:51.710 ***🔗
alicE_messages_are_archived_2731@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='88b35399f1f32e7d' from='domain.example.com' version='1.0' xml:lang='en' to='alice_messages_are_archived_2731@domain.example.com'>

*** User 2024-03-11 11:40:51.710 ***🔗
alicE_messages_are_archived_2731@domain.example.com/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-03-11 11:40:51.710 ***🔗
alicE_messages_are_archived_2731@domain.example.com/res1 out
<iq type='set' id='b51d5086456936e66fba7abedfad0861'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2024-03-11 11:40:51.711 ***🔗
alicE_messages_are_archived_2731@domain.example.com/res1 in
<iq id='b51d5086456936e66fba7abedfad0861' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alice_messages_are_archived_2731@domain.example.com/res1</jid>
	</bind>
</iq>



*** User 2024-03-11 11:40:51.711 ***🔗
alice_messages_are_archived_2731@domain.example.com/res1 out
<iq type='set' id='0bd1b3809a40683550e31e480551714f'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-03-11 11:40:51.712 ***🔗
alice_messages_are_archived_2731@domain.example.com/res1 in
<iq from='domain.example.com' to='alice_messages_are_archived_2731@domain.example.com/res1' id='0bd1b3809a40683550e31e480551714f' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-03-11 11:40:51.713 ***🔗
alice_messages_are_archived_2731@domain.example.com/res1 out
<presence/>



*** User 2024-03-11 11:40:51.717 ***🔗
alice_messages_are_archived_2731@domain.example.com/res1 in
<presence from='alice_messages_are_archived_2731@domain.example.com/res1' to='alice_messages_are_archived_2731@domain.example.com/res1'/>



*** User 2024-03-11 11:40:51.718 ***🔗
bOb_messages_are_archived_2731@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 2024-03-11 11:40:51.721 ***🔗
bOb_messages_are_archived_2731@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='4ad6dc650d4ab1d2' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2024-03-11 11:40:51.721 ***🔗
bOb_messages_are_archived_2731@domain.example.com/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-03-11 11:40:51.721 ***🔗
bOb_messages_are_archived_2731@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9tZXNzYWdlc19hcmVfYXJjaGl2ZWRfMjczMQBtYWtyb2xpa2E=</auth>



*** User 2024-03-11 11:40:51.764 ***🔗
bOb_messages_are_archived_2731@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2024-03-11 11:40:51.764 ***🔗
bOb_messages_are_archived_2731@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 2024-03-11 11:40:51.765 ***🔗
bOb_messages_are_archived_2731@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='a1d4c65777d6c9af' from='domain.example.com' version='1.0' xml:lang='en' to='bob_messages_are_archived_2731@domain.example.com'>

*** User 2024-03-11 11:40:51.765 ***🔗
bOb_messages_are_archived_2731@domain.example.com/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-03-11 11:40:51.766 ***🔗
bOb_messages_are_archived_2731@domain.example.com/res1 out
<iq type='set' id='aa1352f8a66e08a3c270ee430fcba61b'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2024-03-11 11:40:51.767 ***🔗
bOb_messages_are_archived_2731@domain.example.com/res1 in
<iq id='aa1352f8a66e08a3c270ee430fcba61b' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bob_messages_are_archived_2731@domain.example.com/res1</jid>
	</bind>
</iq>



*** User 2024-03-11 11:40:51.767 ***🔗
bob_messages_are_archived_2731@domain.example.com/res1 out
<iq type='set' id='57d243c92197582a226091ef33b54bd4'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-03-11 11:40:51.770 ***🔗
bob_messages_are_archived_2731@domain.example.com/res1 in
<iq from='domain.example.com' to='bob_messages_are_archived_2731@domain.example.com/res1' id='57d243c92197582a226091ef33b54bd4' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-03-11 11:40:51.770 ***🔗
bob_messages_are_archived_2731@domain.example.com/res1 out
<presence/>



*** User 2024-03-11 11:40:51.777 ***🔗
bob_messages_are_archived_2731@domain.example.com/res1 in
<presence from='bob_messages_are_archived_2731@domain.example.com/res1' to='bob_messages_are_archived_2731@domain.example.com/res1'/>



*** User 2024-03-11 11:40:51.806 ***🔗
REST request:
Code: 204
Req: {<0.74138.0>,<<"/api/messages">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"4b3f05a75792a535">>}],
      <<"{\"body\":\"hello from Bob\",\"to\":\"alice_messages_are_archived_2731@domain.example.com\",\"caller\":\"bob_messages_are_archived_2731@domain.example.com\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 11 Mar 2024 11:40:51 GMT">>}],
         <<>>,80,22288}
Params: #{path => <<"/api/messages">>,
          server => #{node => mongooseim@localhost},
          role => admin,method => <<"POST">>,
          body =>
              <<"{\"body\":\"hello from Bob\",\"to\":\"alice_messages_are_archived_2731@domain.example.com\",\"caller\":\"bob_messages_are_archived_2731@domain.example.com\"}">>,
          return_headers => true}

Could not find element wait_for_parallel_writer in Config.

Could not find element archive_wait in Config.


*** User 2024-03-11 11:40:51.814 ***🔗
REST request:
Code: 204
Req: {<0.74155.0>,<<"/api/messages">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"8d3daae21171f8b8">>}],
      <<"{\"body\":\"hello from Alice\",\"to\":\"bob_messages_are_archived_2731@domain.example.com\",\"caller\":\"alice_messages_are_archived_2731@domain.example.com\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 11 Mar 2024 11:40:51 GMT">>}],
         <<>>,80,6106}
Params: #{path => <<"/api/messages">>,
          server => #{node => mongooseim@localhost},
          role => admin,method => <<"POST">>,
          body =>
              <<"{\"body\":\"hello from Alice\",\"to\":\"bob_messages_are_archived_2731@domain.example.com\",\"caller\":\"alice_messages_are_archived_2731@domain.example.com\"}">>,
          return_headers => true}

Could not find element wait_for_parallel_writer in Config.


*** User 2024-03-11 11:40:51.818 ***🔗
REST request:
Code: 200
Req: {<0.74163.0>,
      <<"/api/messages/alice_messages_are_archived_2731@domain.example.com/bob_messages_are_archived_2731@domain.example.com?limit=10">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"adc1ec460eba614b">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 11 Mar 2024 11:40:51 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"289">>}],
         <<"[{\"message_id\":\"16c78f85a3532c71\",\"sender\":\"bob_messages_are_archived_2731@domain.example.com\",\"body\":\"hello from Bob\",\"timestamp\":1710157252},{\"message_id\":\"082e74c400ad2099\",\"sender\":\"alice_messages_are_archived_2731@domain.example.com\",\"body\":\"hello from Alice\",\"timestamp\":1710157252}]">>,
         414,2037}
Params: #{path =>
              <<"/api/messages/alice_messages_are_archived_2731@domain.example.com/bob_messages_are_archived_2731@domain.example.com?limit=10">>,
          server => #{node => mongooseim@localhost},
          role => admin,method => <<"GET">>,body => <<>>,
          return_headers => true}

Could not find element archive_wait in Config.

Could not find element wait_for_parallel_writer in Config.

Could not find element archive_wait in Config.


*** User 2024-03-11 11:40:51.822 ***🔗
REST request:
Code: 200
Req: {<0.74171.0>,
      <<"/api/messages/alice_messages_are_archived_2731@domain.example.com/bob_messages_are_archived_2731@domain.example.com">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"a525dfd2c0988c92">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 11 Mar 2024 11:40:51 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"289">>}],
         <<"[{\"message_id\":\"16c78f85a3532c71\",\"sender\":\"bob_messages_are_archived_2731@domain.example.com\",\"body\":\"hello from Bob\",\"timestamp\":1710157252},{\"message_id\":\"082e74c400ad2099\",\"sender\":\"alice_messages_are_archived_2731@domain.example.com\",\"body\":\"hello from Alice\",\"timestamp\":1710157252}]">>,
         414,1803}
Params: #{path =>
              <<"/api/messages/alice_messages_are_archived_2731@domain.example.com/bob_messages_are_archived_2731@domain.example.com">>,
          server => #{node => mongooseim@localhost},
          role => admin,method => <<"GET">>,body => <<>>,
          return_headers => true}


*** User 2024-03-11 11:40:51.825 ***🔗
REST request:
Code: 200
Req: {<0.74173.0>,
      <<"/api/messages/alice_messages_are_archived_2731@domain.example.com">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"0b6a1af6d7daaa9a">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 11 Mar 2024 11:40:51 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"289">>}],
         <<"[{\"message_id\":\"16c78f85a3532c71\",\"sender\":\"bob_messages_are_archived_2731@domain.example.com\",\"body\":\"hello from Bob\",\"timestamp\":1710157252},{\"message_id\":\"082e74c400ad2099\",\"sender\":\"alice_messages_are_archived_2731@domain.example.com\",\"body\":\"hello from Alice\",\"timestamp\":1710157252}]">>,
         414,1701}
Params: #{path =>
              <<"/api/messages/alice_messages_are_archived_2731@domain.example.com">>,
          server => #{node => mongooseim@localhost},
          role => admin,method => <<"GET">>,body => <<>>,
          return_headers => true}


*** User 2024-03-11 11:40:51.825 ***🔗
bob_messages_are_archived_2731@domain.example.com/res1 out
</stream:stream>

*** User 2024-03-11 11:40:51.826 ***🔗
bob_messages_are_archived_2731@domain.example.com/res1 in
</stream:stream>

*** User 2024-03-11 11:40:51.826 ***🔗
alice_messages_are_archived_2731@domain.example.com/res1 out
</stream:stream>

*** User 2024-03-11 11:40:51.826 ***🔗
alice_messages_are_archived_2731@domain.example.com/res1 in
</stream:stream>
*** CT 2024-03-11 11:40:51.829 *** View log from node mongooseim@localhost when finished🔗 mongooseim@localhost_2277.html



=== Ended at 2024-03-11 11:40:51
=== successfully completed test case
=== === Returned value: ok