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

=== Config value:

    [{watchdog,<0.27106.1>},
     {{ejabberd_cwd,mongooseim@localhost},
      "/home/circleci/project/_build/mim1/rel/mongooseim"},
     {mam_backend,rdbms},
     {mim_data_dir,"/home/circleci/project/big_tests/tests/rest_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_SUITE.logs/run.2022-03-04_11.25.01/rest_suite.messages_are_archived.150018.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@88d84ff17c71.2022-03-04_11.16.52/big_tests.tests.rest_SUITE.logs/run.2022-03-04_11.25.01/log_private/"},
     {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@88d84ff17c71.2022-03-04_11.16.52"

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


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

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

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



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



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

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



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



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



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



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



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



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

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



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



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

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



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



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



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



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



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



*** User 2022-03-04 11:25:01.355 ***
REST request:
Code: 204
Req: {<0.27342.1>,<<"/api/messages">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"80bedd295a1d3aed">>}],
      <<"{\"to\":\"alice_messages_are_archived_1789@domain.example.com\",\"caller\":\"bob_messages_are_archived_1789@domain.example.com\",\"body\":\"hello from Bob\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Fri, 04 Mar 2022 11:25:00 GMT">>},
          {<<"content-type">>,<<"application/json">>}],
         <<>>,112,14536}
Params: #{body =>
              <<"{\"to\":\"alice_messages_are_archived_1789@domain.example.com\",\"caller\":\"bob_messages_are_archived_1789@domain.example.com\",\"body\":\"hello from Bob\"}">>,
          method => <<"POST">>,path => <<"/api/messages">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}

Could not find element wait_for_parallel_writer in Config.


*** User 2022-03-04 11:25:01.367 ***
REST request:
Code: 204
Req: {<0.27376.1>,<<"/api/messages">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"beeee6a23aa116e6">>}],
      <<"{\"to\":\"bob_messages_are_archived_1789@domain.example.com\",\"caller\":\"alice_messages_are_archived_1789@domain.example.com\",\"body\":\"hello from Alice\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Fri, 04 Mar 2022 11:25:00 GMT">>},
          {<<"content-type">>,<<"application/json">>}],
         <<>>,112,11126}
Params: #{body =>
              <<"{\"to\":\"bob_messages_are_archived_1789@domain.example.com\",\"caller\":\"alice_messages_are_archived_1789@domain.example.com\",\"body\":\"hello from Alice\"}">>,
          method => <<"POST">>,path => <<"/api/messages">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}

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 2022-03-04 11:25:01.376 ***
REST request:
Code: 200
Req: {<0.27390.1>,
      <<"/api/messages/alice_messages_are_archived_1789@domain.example.com/bob_messages_are_archived_1789@domain.example.com?limit=10">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"2be9c3a8881087d7">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Fri, 04 Mar 2022 11:25:00 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"289">>}],
         <<"[{\"timestamp\":1646393101,\"sender\":\"bob_messages_are_archived_1789@domain.example.com\",\"message_id\":\"cfdc06d3698e2836\",\"body\":\"hello from Bob\"},{\"timestamp\":1646393101,\"sender\":\"alice_messages_are_archived_1789@domain.example.com\",\"message_id\":\"efc6641ee07c00a6\",\"body\":\"hello from Alice\"}]">>,
         414,7518}
Params: #{body => <<>>,method => <<"GET">>,
          path =>
              <<"/api/messages/alice_messages_are_archived_1789@domain.example.com/bob_messages_are_archived_1789@domain.example.com?limit=10">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}

Could not find element wait_for_parallel_writer in Config.


*** User 2022-03-04 11:25:01.380 ***
REST request:
Code: 200
Req: {<0.27398.1>,
      <<"/api/messages/alice_messages_are_archived_1789@domain.example.com/bob_messages_are_archived_1789@domain.example.com">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"f00d6bfe382d4394">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Fri, 04 Mar 2022 11:25:00 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"289">>}],
         <<"[{\"timestamp\":1646393101,\"sender\":\"bob_messages_are_archived_1789@domain.example.com\",\"message_id\":\"cfdc06d3698e2836\",\"body\":\"hello from Bob\"},{\"timestamp\":1646393101,\"sender\":\"alice_messages_are_archived_1789@domain.example.com\",\"message_id\":\"efc6641ee07c00a6\",\"body\":\"hello from Alice\"}]">>,
         414,3463}
Params: #{body => <<>>,method => <<"GET">>,
          path =>
              <<"/api/messages/alice_messages_are_archived_1789@domain.example.com/bob_messages_are_archived_1789@domain.example.com">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}

Could not find element archive_wait in Config.


*** User 2022-03-04 11:25:01.384 ***
REST request:
Code: 200
Req: {<0.27402.1>,
      <<"/api/messages/alice_messages_are_archived_1789@domain.example.com">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"e57376a8f12f1747">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Fri, 04 Mar 2022 11:25:00 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"289">>}],
         <<"[{\"timestamp\":1646393101,\"sender\":\"bob_messages_are_archived_1789@domain.example.com\",\"message_id\":\"cfdc06d3698e2836\",\"body\":\"hello from Bob\"},{\"timestamp\":1646393101,\"sender\":\"alice_messages_are_archived_1789@domain.example.com\",\"message_id\":\"efc6641ee07c00a6\",\"body\":\"hello from Alice\"}]">>,
         414,3235}
Params: #{body => <<>>,method => <<"GET">>,
          path =>
              <<"/api/messages/alice_messages_are_archived_1789@domain.example.com">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


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

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

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

*** User 2022-03-04 11:25:01.385 ***
alicE_messages_are_archived_1789@domain.example.com/res1 in
</stream:stream>
*** CT 2022-03-04 11:25:01.387 *** View log from node ejabberd2@localhost when finished ejabberd2@localhost_646.html
*** CT 2022-03-04 11:25:01.439 *** View log from node mongooseim@localhost when finished mongooseim@localhost_2410.html



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