=== Test case: presence_SUITE:subscribe/1 (click for source code)

=== Config value:

    [{watchdog,<0.30423.1>},
     {mim_data_dir,"/home/circleci/project/big_tests/tests/presence_SUITE_data"},
     {preset,"pgsql_mnesia"},
     {tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@df370d24fb6d.2022-05-11_08.56.40/big_tests.tests.presence_SUITE.logs/run.2022-05-11_09.04.17/presence_suite.subscribe.146434.html"},
     {tc_group_properties,[{name,subscribe_group},
                           {repeat_until_all_ok,3},
                           parallel]},
     {tc_group_path,[]},
     {data_dir,"/home/circleci/project/big_tests/_build/default/lib/mongoose_tests/ebin/presence_SUITE_data/"},
     {priv_dir,"/home/circleci/project/big_tests/ct_report/ct_run.test@df370d24fb6d.2022-05-11_08.56.40/big_tests.tests.presence_SUITE.logs/run.2022-05-11_09.04.17/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@df370d24fb6d.2022-05-11_08.56.40"

=== Started at 2022-05-11 09:04:18


*** CT 2022-05-11 09:04:18.901 *** View log from node mongooseim@localhost when started mongooseim@localhost_2410.html
*** CT 2022-05-11 09:04:18.902 *** View log from node ejabberd2@localhost when started ejabberd2@localhost_524.html

*** User 2022-05-11 09:04:18.916 ***
alicE_subscribe_1943@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-05-11 09:04:18.916 ***
alicE_subscribe_1943@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='4e59d968fd9dbf35' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-05-11 09:04:18.916 ***
alicE_subscribe_1943@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-05-11 09:04:18.916 ***
alicE_subscribe_1943@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX3N1YnNjcmliZV8xOTQzAG1hdHlncnlzYQ==</auth>



*** User 2022-05-11 09:04:18.917 ***
alicE_subscribe_1943@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-05-11 09:04:18.917 ***
alicE_subscribe_1943@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-05-11 09:04:18.918 ***
alicE_subscribe_1943@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='24cffbe8ff44b950' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-05-11 09:04:18.918 ***
alicE_subscribe_1943@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-05-11 09:04:18.918 ***
alicE_subscribe_1943@domain.example.com/res1 out
<iq type='set' id='62f4a490b6aa1164b42d68111e05e821'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-05-11 09:04:18.918 ***
alicE_subscribe_1943@domain.example.com/res1 in
<iq id='62f4a490b6aa1164b42d68111e05e821' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alicE_subscribe_1943@domain.example.com/res1</jid>
	</bind>
</iq>



*** User 2022-05-11 09:04:18.918 ***
alicE_subscribe_1943@domain.example.com/res1 out
<iq type='set' id='eed3cfc823897c848e3d9b8d6f85aa4d'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-05-11 09:04:18.919 ***
alicE_subscribe_1943@domain.example.com/res1 in
<iq type='result' id='eed3cfc823897c848e3d9b8d6f85aa4d'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-05-11 09:04:18.919 ***
alicE_subscribe_1943@domain.example.com/res1 out
<presence/>



*** User 2022-05-11 09:04:18.920 ***
alicE_subscribe_1943@domain.example.com/res1 in
<presence from='alicE_subscribe_1943@domain.example.com/res1' to='alice_subscribe_1943@domain.example.com/res1' xml:lang='en'/>



*** User 2022-05-11 09:04:18.921 ***
bOb_subscribe_1943@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-05-11 09:04:18.921 ***
bOb_subscribe_1943@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='a2a06041b7b1ba0c' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-05-11 09:04:18.921 ***
bOb_subscribe_1943@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-05-11 09:04:18.921 ***
bOb_subscribe_1943@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9zdWJzY3JpYmVfMTk0MwBtYWtyb2xpa2E=</auth>



*** User 2022-05-11 09:04:18.922 ***
bOb_subscribe_1943@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-05-11 09:04:18.922 ***
bOb_subscribe_1943@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-05-11 09:04:18.922 ***
bOb_subscribe_1943@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='b4240ef72aeb98ea' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-05-11 09:04:18.922 ***
bOb_subscribe_1943@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-05-11 09:04:18.922 ***
bOb_subscribe_1943@domain.example.com/res1 out
<iq type='set' id='aab13a8aa37f99d792863506a38deceb'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-05-11 09:04:18.923 ***
bOb_subscribe_1943@domain.example.com/res1 in
<iq id='aab13a8aa37f99d792863506a38deceb' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bOb_subscribe_1943@domain.example.com/res1</jid>
	</bind>
</iq>



*** User 2022-05-11 09:04:18.923 ***
bOb_subscribe_1943@domain.example.com/res1 out
<iq type='set' id='6196b3cd1877899d6c12f10cdc5a7794'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-05-11 09:04:18.923 ***
bOb_subscribe_1943@domain.example.com/res1 in
<iq type='result' id='6196b3cd1877899d6c12f10cdc5a7794'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-05-11 09:04:18.923 ***
bOb_subscribe_1943@domain.example.com/res1 out
<presence/>



*** User 2022-05-11 09:04:18.926 ***
bOb_subscribe_1943@domain.example.com/res1 in
<presence from='bOb_subscribe_1943@domain.example.com/res1' to='bob_subscribe_1943@domain.example.com/res1' xml:lang='en'/>



*** User 2022-05-11 09:04:18.926 ***
alicE_subscribe_1943@domain.example.com/res1 out
<iq type='set' id='bbe1c180d285c5765efcbfa813a32eee'>
	<query xmlns='jabber:iq:roster'>
		<item jid='bOb_subscribe_1943@domain.example.com' name='Bobby'>
			<group>friends</group>
		</item>
	</query>
</iq>



*** User 2022-05-11 09:04:18.932 ***
alicE_subscribe_1943@domain.example.com/res1 in
<iq from='alicE_subscribe_1943@domain.example.com' to='alicE_subscribe_1943@domain.example.com/res1' id='push7fa0d3cb058cc9cf' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item subscription='none' name='Bobby' jid='bob_subscribe_1943@domain.example.com'>
			<group>friends</group>
		</item>
	</query>
</iq>



*** User 2022-05-11 09:04:18.932 ***
alicE_subscribe_1943@domain.example.com/res1 in
<iq from='alicE_subscribe_1943@domain.example.com' to='alicE_subscribe_1943@domain.example.com/res1' id='bbe1c180d285c5765efcbfa813a32eee' type='result'/>



*** User 2022-05-11 09:04:18.932 ***
alicE_subscribe_1943@domain.example.com/res1 out
<iq to='alicE_subscribe_1943@domain.example.com' id='push7fa0d3cb058cc9cf' type='result'/>



*** User 2022-05-11 09:04:18.932 ***
alicE_subscribe_1943@domain.example.com/res1 out
<presence type='subscribe' to='bOb_subscribe_1943@domain.example.com'/>



*** User 2022-05-11 09:04:18.937 ***
alicE_subscribe_1943@domain.example.com/res1 in
<iq from='alicE_subscribe_1943@domain.example.com' to='alicE_subscribe_1943@domain.example.com/res1' id='pushb3d9d2b21015f2f1' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item ask='subscribe' subscription='none' name='Bobby' jid='bob_subscribe_1943@domain.example.com'>
			<group>friends</group>
		</item>
	</query>
</iq>



*** User 2022-05-11 09:04:18.938 ***
alicE_subscribe_1943@domain.example.com/res1 out
<iq to='alicE_subscribe_1943@domain.example.com' id='pushb3d9d2b21015f2f1' type='result'/>



*** User 2022-05-11 09:04:18.938 ***
bOb_subscribe_1943@domain.example.com/res1 in
<presence from='alicE_subscribe_1943@domain.example.com' to='bOb_subscribe_1943@domain.example.com/res1' xml:lang='en' type='subscribe'/>



*** User 2022-05-11 09:04:18.938 ***
bOb_subscribe_1943@domain.example.com/res1 out
<iq type='get' id='3c81fa4be2d81e91568d19fb77ce10e8'>
	<query xmlns='jabber:iq:roster'/>
</iq>



*** User 2022-05-11 09:04:18.942 ***
bOb_subscribe_1943@domain.example.com/res1 in
<iq from='bOb_subscribe_1943@domain.example.com' to='bOb_subscribe_1943@domain.example.com/res1' id='3c81fa4be2d81e91568d19fb77ce10e8' type='result'>
	<query xmlns='jabber:iq:roster'/>
</iq>



*** User 2022-05-11 09:04:18.942 ***
Roster: {xmlel,<<"iq">>,
               [{<<"from">>,<<"bOb_subscribe_1943@domain.example.com">>},
                {<<"to">>,<<"bOb_subscribe_1943@domain.example.com/res1">>},
                {<<"id">>,<<"3c81fa4be2d81e91568d19fb77ce10e8">>},
                {<<"type">>,<<"result">>}],
               [{xmlel,<<"query">>,
                       [{<<"xmlns">>,<<"jabber:iq:roster">>}],
                       []}]}

*** User 2022-05-11 09:04:18.942 ***
bOb_subscribe_1943@domain.example.com/res1 out
<iq type='set' id='bde0a9e782b56d2256c38b101f58811e'>
	<query xmlns='jabber:iq:roster'>
		<item jid='alicE_subscribe_1943@domain.example.com' name='Alice'>
			<group>enemies</group>
		</item>
	</query>
</iq>



*** User 2022-05-11 09:04:18.946 ***
bOb_subscribe_1943@domain.example.com/res1 in
<iq from='bOb_subscribe_1943@domain.example.com' to='bOb_subscribe_1943@domain.example.com/res1' id='push202b6882f28c42ad' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item subscription='none' name='Alice' jid='alice_subscribe_1943@domain.example.com'>
			<group>enemies</group>
		</item>
	</query>
</iq>



*** User 2022-05-11 09:04:18.946 ***
bOb_subscribe_1943@domain.example.com/res1 out
<iq to='bOb_subscribe_1943@domain.example.com' id='push202b6882f28c42ad' type='result'/>



*** User 2022-05-11 09:04:18.946 ***
bOb_subscribe_1943@domain.example.com/res1 in
<iq from='bOb_subscribe_1943@domain.example.com' to='bOb_subscribe_1943@domain.example.com/res1' id='bde0a9e782b56d2256c38b101f58811e' type='result'/>



*** User 2022-05-11 09:04:18.946 ***
bOb_subscribe_1943@domain.example.com/res1 out
<presence type='subscribed' to='alicE_subscribe_1943@domain.example.com'/>



*** User 2022-05-11 09:04:18.950 ***
alicE_subscribe_1943@domain.example.com/res1 in
<iq from='alicE_subscribe_1943@domain.example.com' to='alicE_subscribe_1943@domain.example.com/res1' id='pusha015a3e04948bf37' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item subscription='to' name='Bobby' jid='bob_subscribe_1943@domain.example.com'>
			<group>friends</group>
		</item>
	</query>
</iq>



*** User 2022-05-11 09:04:18.950 ***
alicE_subscribe_1943@domain.example.com/res1 in
<presence from='bOb_subscribe_1943@domain.example.com' to='alicE_subscribe_1943@domain.example.com/res1' xml:lang='en' type='subscribed'/>



*** User 2022-05-11 09:04:18.950 ***
alicE_subscribe_1943@domain.example.com/res1 in
<presence from='bOb_subscribe_1943@domain.example.com/res1' to='alice_subscribe_1943@domain.example.com/res1' xml:lang='en'/>



*** User 2022-05-11 09:04:18.950 ***
bOb_subscribe_1943@domain.example.com/res1 in
<iq from='bOb_subscribe_1943@domain.example.com' to='bOb_subscribe_1943@domain.example.com/res1' id='push3f3897679534fdc1' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item subscription='from' name='Alice' jid='alice_subscribe_1943@domain.example.com'>
			<group>enemies</group>
		</item>
	</query>
</iq>



*** User 2022-05-11 09:04:18.950 ***
bOb_subscribe_1943@domain.example.com/res1 out
<iq type='get' id='8c190183381e2ce0b6d69f9ddf9f6812'>
	<query xmlns='jabber:iq:roster'/>
</iq>



*** User 2022-05-11 09:04:18.979 ***
bOb_subscribe_1943@domain.example.com/res1 in
<iq from='bOb_subscribe_1943@domain.example.com' to='bOb_subscribe_1943@domain.example.com/res1' id='8c190183381e2ce0b6d69f9ddf9f6812' type='result'>
	<query xmlns='jabber:iq:roster'>
		<item subscription='from' name='Alice' jid='alice_subscribe_1943@domain.example.com'>
			<group>enemies</group>
		</item>
	</query>
</iq>



*** User 2022-05-11 09:04:18.979 ***
Roster: {xmlel,<<"iq">>,
            [{<<"from">>,<<"bOb_subscribe_1943@domain.example.com">>},
             {<<"to">>,<<"bOb_subscribe_1943@domain.example.com/res1">>},
             {<<"id">>,<<"8c190183381e2ce0b6d69f9ddf9f6812">>},
             {<<"type">>,<<"result">>}],
            [{xmlel,<<"query">>,
                 [{<<"xmlns">>,<<"jabber:iq:roster">>}],
                 [{xmlel,<<"item">>,
                      [{<<"subscription">>,<<"from">>},
                       {<<"name">>,<<"Alice">>},
                       {<<"jid">>,
                        <<"alice_subscribe_1943@domain.example.com">>}],
                      [{xmlel,<<"group">>,[],[{xmlcdata,<<"enemies">>}]}]}]}]}

*** User 2022-05-11 09:04:18.979 ***
bOb_subscribe_1943@domain.example.com/res1 out
<presence/>



*** User 2022-05-11 09:04:18.980 ***
alicE_subscribe_1943@domain.example.com/res1 in
<presence from='bOb_subscribe_1943@domain.example.com/res1' to='alice_subscribe_1943@domain.example.com/res1' xml:lang='en'/>



*** User 2022-05-11 09:04:18.980 ***
bOb_subscribe_1943@domain.example.com/res1 out
<presence type='unavailable'/>



*** User 2022-05-11 09:04:18.980 ***
alicE_subscribe_1943@domain.example.com/res1 in
<presence from='bOb_subscribe_1943@domain.example.com/res1' to='alice_subscribe_1943@domain.example.com/res1' xml:lang='en' type='unavailable'/>



*** User 2022-05-11 09:04:18.981 ***
bOb_subscribe_1943@domain.example.com/res1 out
</stream:stream>

*** User 2022-05-11 09:04:18.981 ***
bOb_subscribe_1943@domain.example.com/res1 in
</stream:stream>

*** User 2022-05-11 09:04:18.982 ***
alicE_subscribe_1943@domain.example.com/res1 out
</stream:stream>

*** User 2022-05-11 09:04:18.982 ***
alicE_subscribe_1943@domain.example.com/res1 in
</stream:stream>
*** CT 2022-05-11 09:04:18.995 *** View log from node ejabberd2@localhost when finished ejabberd2@localhost_524.html
*** CT 2022-05-11 09:04:18.996 *** View log from node mongooseim@localhost when finished mongooseim@localhost_2410.html



=== Ended at 2022-05-11 09:04:19
=== successfully completed test case
=== === Returned value: ok