=== Test case: rest_client_SUITE:messages_with_user_are_archived/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_with_user_are_archived.148994.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.697 *** View log from node mongooseim@localhost when started mongooseim@localhost_5806.html
*** CT 2022-01-27 15:37:00.697 *** View log from node ejabberd2@localhost when started ejabberd2@localhost_2385.html

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

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



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



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

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



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



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



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



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



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



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

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



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



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

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



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



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



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



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



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



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

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



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



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

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



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



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



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



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



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



*** User 2022-01-27 15:37:00.781 ***
REST request:
Code: 200
Req: {<0.9346.2>,<<"/api/messages">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"189acc41d203ebf8">>},
       {<<"authorization">>,
        <<"Basic Ym9iX21lc3NhZ2VzX3dpdGhfdXNlcl9hcmVfYXJjaGl2ZWRfMjE1NkBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
      <<"{\"to\":\"alice_messages_with_user_are_archived_2156@localhost\",\"body\":\"hello, alice_messages_with_user_are_archived_2156@localhost it's me\"}">>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 15:37:00 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"45">>}],
         <<"{\"id\":\"df3dde15-6d61-467c-ac13-94200160b19f\"}">>,169,30675}
Params: #{body =>
              <<"{\"to\":\"alice_messages_with_user_are_archived_2156@localhost\",\"body\":\"hello, alice_messages_with_user_are_archived_2156@localhost it's me\"}">>,
          creds =>
              {<<"bob_messages_with_user_are_archived_2156@localhost">>,
               <<"makrolika">>},
          method => <<"POST">>,path => <<"/api/messages">>,
          return_headers => true,role => client,
          server => #{node => mongooseim@localhost}}


*** User 2022-01-27 15:37:00.832 ***
REST request:
Code: 200
Req: {<0.9371.2>,<<"/api/messages">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"bf403509fefcd7b0">>},
       {<<"authorization">>,
        <<"Basic YWxpY2VfbWVzc2FnZXNfd2l0aF91c2VyX2FyZV9hcmNoaXZlZF8yMTU2QGxvY2FsaG9zdDptYXR5Z3J5c2E=">>}],
      <<"{\"to\":\"bob_messages_with_user_are_archived_2156@localhost\",\"body\":\"hello, bob_messages_with_user_are_archived_2156@localhost it's me\"}">>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 15:37:00 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"45">>}],
         <<"{\"id\":\"2a1638db-4977-490b-9966-99af33bfa854\"}">>,169,42842}
Params: #{body =>
              <<"{\"to\":\"bob_messages_with_user_are_archived_2156@localhost\",\"body\":\"hello, bob_messages_with_user_are_archived_2156@localhost it's me\"}">>,
          creds =>
              {<<"alice_messages_with_user_are_archived_2156@localhost">>,
               <<"matygrysa">>},
          method => <<"POST">>,path => <<"/api/messages">>,
          return_headers => true,role => client,
          server => #{node => mongooseim@localhost}}

Could not find element wait_for_parallel_writer in Config.


*** User 2022-01-27 15:37:00.920 ***
REST request:
Code: 200
Req: {<0.9386.2>,<<"/api/messages">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"8a795649ed754f91">>},
       {<<"authorization">>,
        <<"Basic a2F0ZV9tZXNzYWdlc193aXRoX3VzZXJfYXJlX2FyY2hpdmVkXzIxNTZAbG9jYWxob3N0Om1ha3Jvd2U7cA==">>}],
      <<"{\"to\":\"alice_messages_with_user_are_archived_2156@localhost\",\"body\":\"hello, alice_messages_with_user_are_archived_2156@localhost it's me\"}">>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 15:37:00 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"45">>}],
         <<"{\"id\":\"cb9f0431-1bc7-4ed2-aa23-d7fa44677eb2\"}">>,169,81493}
Params: #{body =>
              <<"{\"to\":\"alice_messages_with_user_are_archived_2156@localhost\",\"body\":\"hello, alice_messages_with_user_are_archived_2156@localhost it's me\"}">>,
          creds =>
              {<<"kate_messages_with_user_are_archived_2156@localhost">>,
               <<"makrowe;p">>},
          method => <<"POST">>,path => <<"/api/messages">>,
          return_headers => true,role => client,
          server => #{node => mongooseim@localhost}}

Could not find element archive_wait in Config.


*** User 2022-01-27 15:37:00.932 ***
REST request:
Code: 200
Req: {<0.9405.2>,
      <<"/api/messages/kate_messages_with_user_are_archived_2156@localhost">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"1c118f4338512f46">>},
       {<<"authorization">>,
        <<"Basic YWxpY2VfbWVzc2FnZXNfd2l0aF91c2VyX2FyZV9hcmNoaXZlZF8yMTU2QGxvY2FsaG9zdDptYXR5Z3J5c2E=">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 15:37:00 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"271">>}],
         <<"[{\"to\":\"alice_messages_with_user_are_archived_2156@localhost\",\"timestamp\":1643297820840,\"id\":\"cb9f0431-1bc7-4ed2-aa23-d7fa44677eb2\",\"from\":\"kate_messages_with_user_are_archived_2156@localhost\",\"body\":\"hello, alice_messages_with_user_are_archived_2156@localhost it's me\"}]">>,
         396,3523}
Params: #{body => <<>>,
          creds =>
              {<<"alice_messages_with_user_are_archived_2156@localhost">>,
               <<"matygrysa">>},
          method => <<"GET">>,
          path =>
              <<"/api/messages/kate_messages_with_user_are_archived_2156@localhost">>,
          return_headers => true,role => client,
          server => #{node => mongooseim@localhost}}


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

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

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

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

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

*** User 2022-01-27 15:37:00.933 ***
alicE_messages_with_user_are_archived_2156@localhost/res1 in
</stream:stream>
*** CT 2022-01-27 15:37:00.936 *** View log from node ejabberd2@localhost when finished ejabberd2@localhost_2385.html
*** CT 2022-01-27 15:37:00.938 *** 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